background image
266 Chapter 5: Network Protocols
The number of subnets per network is defined by this formula:
2
number of subnet bits
The number of subnet bits is based on the mask and class of address. The number of subnet bits
is:
32 ­ (number of network bits) ­ (number of host bits)
NOTE
In some documents, the number of subnets is shown as 2 less than 2
number of subnet bits
, implying
two reserved cases. These two cases are no longer reserved, however, and can be used.
An algorithm may help, along with some samples.
Step 1
Write down the network number and mask in question.
Step 2
Write down the number of network bits based on Class A, B, and
C rules.
Step 3
Write down the number of host bits, which is equal to the number
of binary 0s in the mask.
Step 4
Write down the number of subnet bits. The network, host, and
subnet bits should total 32.
Step 5
Calculate 2
host bits
minus 2, and record this as the number of hosts
per subnet.
Step 6
Calculate 2
subnet bits
, and record this as the number of subnets in
this network.
Table 5-24 lists several examples. If the choices for the number of host and subnet bits is
confusing, convert the mask to binary and mark off the network bits based on class rules. Then
mark off the 0s at the end of the mask. The bits in between are the subnet bits.
Table 5-24
Examples of Number of Hosts per Subnet, and Number of Subnets
Network and Mask
Number of
Network
Bits
Number of
Host Bits
Number of
Subnet
Bits
Number of
Hosts per
Subnet
Number of
Subnets
10.0.0.0, 255.255.240.0
8
12
12
4094
4096
150.150.0.0,
255.255.248.0
16
11
5
2046
32
ch05.fm Page 266 Monday, March 20, 2000 5:06 PM