In the examples given so far, the subnet spaces have fallen on octet boundaries. This arrangement is not
always the most practical or efficient choice. What if, for instance, you need to subnet a class B address
across 500 data links, each with a maximum of 100 hosts? This requirement is easily met, but only by
using nine bits in the subnet field: 29 – 2 = 510 available subnets, leaving seven bits for the host field, and
27 – 2 = 126 available hosts per subnet. No other bit combination will satisfy this requirement.
Notice, also, that there is no way to subnet a class C address on an octet boundary—doing so would use
up all of the last byte, leaving no room for host bits. The subnet bits and host bits must share the last
octet, as the following example shows.
Step 1:
Figure 2.15 shows the internetwork of Figure 2.13 but with a class C address of 192.168.100.0 assigned.
There are five data links; therefore, the address must be subnetted to provide for at least five subnet
addresses. The illustration also indicates the number of hosts (including router interfaces) that need to be
addressed on each subnet. The maximum host address requirement is 25 for the two ethernets. Therefore,
the full subnetting requirements are at least five subnets and at least 25 host addresses per subnet.
Figure 2.15. The network from Figure 2.13 but with a class C mask assigned. Subnetting an entire octet will
not work here; there would be no space left for host bits.
Step 2:
Applying the 2n – 2 formula, three subnet bits and five host bits will satisfy the requirements: 23 – 2 = 6
and 25 – 2 = 30. A class C mask with three bits of subnetting is represented as 255.255.255.224 in dotted
decimal.
Step 3:
Figure 2.16 shows the derivation of the subnet bits. The subnet mask derived in step 2 is written in binary,
and the IP address is written below it. Vertical lines are drawn as markers for the subnet space, and within
this space all possible bit combinations are written by counting up from zero in binary.
Step 4:
The last step is to calculate the host addresses available to each subnet. This step is done by choosing a
subnet and, keeping the network and subnet bits unchanged, writing all bit combinations in the host space
by counting up from zero in binary.