Netmask – NETGEAR PS100 User Manual
Page 129
NetGear Print Server Manual
120
Class B addresses can have up to 65,354 hosts on a network. Class B addresses use a 16-bit network
number and a 16-bit node number. Class B addresses are in this range:
128.1.x.x to 191.254.x.x.
Class C addresses can have 254 hosts on a network. Class C addresses use 24 bits for the network
address and 8 bits for the node. They are in this range:
192.0.1.x to 223.255.254.x.
Class D addresses are used for multicasts (messages sent to many hosts). Class D addresses are in this
range:
224.0.0.0 to 239.255.255.255.
Class E addresses are for experimental use.
This addressing structure allows IP to uniquely identify each physical network and each node on each
physical network.
For each unique value of the network portion of the address, the base address of the range (host
address of all zeros) is known as the network address and is not usually assigned to a host. Also, the
top address of the range (host address of all ones) is not assigned but is used as the broadcast address
for sending a packet simultaneously to all hosts with the same network address.
Netmask
In each of the above address classes, the size of the two parts (network address and host address) is
implied by the class. This partitioning scheme can also be expressed by a netmask associated with the
IP address. A netmask is a 32-bit quantity that, when logically ANDed with an IP address, yields the
network address. For instance, the netmasks for Class A, B, and C addresses are 255.0.0.0, 255.255.0.0,
and 255.255.255.0, respectively.
For example, the address 192.168.170.237 is a Class C IP address whose network portion is the upper
24 bits. When ANDed with the Class C netmask, as shown here, only the network portion of the
address remains:
11000000 10101000 10101010 11101101 (192.168.170.237)
ANDed with:
11111111 11111111 11111111 00000000 (255.255.255.0)
Equals:
11000000 10101000 10101010 00000000 (192.168.170.0)
As a shorter alternative to dotted-decimal notation, the netmask may also be expressed in terms of the
number of ones from the left. This number is appended to the IP address, following a backward slash
( / ), as "/n." In the example, the address could be written as 192.168.170.237/24, indicating that the
netmask is 24 ones followed by 8 zeros.