The Netmask defines what portion of the Network Address must match for that route to be used. When the mask is written in binary a 1 is significant (must match) and a 0 need not match. For example, a 255.255.255.255 mask is used for a host entry. The mask of all 255s (all 1s) means that the destination address of the packet to be routed must exactly match the Network Address for this route to be used. For another example, the Network Address 157.57.8.0 has a netmask of 255.255.248.0. This netmask means the first two octets must match exactly, the first 5 bits of the third octet must match (248=11111000) and the last octet does not matter. Since 8 in the decimal number system is equivalent to 00001000 in binary, a match would have to start with 00001. Thus, any address of 157.57 and the third octet of 8 through 15 (15=00001111) will use this route. This is a netmask for a subnet route and is therefore called the subnet mask.
IP-adressen består af en netadresse og en maskin-adresse. Hvis vi holder os til en klasse C, så vil den sidste byte i en IP-adresse være maskin-adressen og de tre første byte netadresse. Det viser man ved at sætte subnetmasken til 255.255.255. Hvis du konverterer 255 til binært får du 11111111. Netadressen er altså alle de bytes, hvor subnetmasken er 1. Hvis du har en undernetsmaske på 255.255.255.128 vil den første bit af den sidste byte høre med til netadressen og du har da kun 128 adresser til rådighed for maskin-adressen.
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.