Determine the Number and Size of the Networks
Next, consider the number of subnets required and the number of host addresses needed on each subnet. Based on the network topology consisting of 5 LAN segments and 4 internetwork connections between routers, 9 subnets are required. The largest subnet requires 40 hosts. When designing an addressing scheme, you should anticipate growth in both the number of subnets and the hosts per subnet.
The 172.16.0.0/22 network address has 10 host bits. Because the largest subnet requires 40 hosts, a minimum of 6 host bits should be borrowed. This is determined by using this formula: 2^6 – 2 = 62 hosts. The 4 remaining host bits can be used to allocate subnets. Using the formula for determining subnets, this results in 16 subnets: 2^4 = 16. Because the example internetwork requires 9 subnets this will meet the requirement and allow for some additional growth.
When 4 bits are borrowed the new prefix length is /26 with a subnet mask of 255.255.255.192.
As shown in Figure 1, using the /26 prefix length, the 16 subnet addresses can be determined. Only the subnet portion of the address is incremented. The original 22 bits of the network address cannot change and the host portion will contain all 0 bits.
Note: Notice that because the subnet portion is in both the third and fourth octets that one or both of these values will vary in the subnet addresses.
As shown in Figure 2, the original 172.16.0.0/22 network was a single network with 10 host bits providing 1,022 usable addresses to assign to hosts. By borrowing 4 host bits, 16 subnets (0000 through 1111) can be created. Each subnet has 6 host bits or 62 usable host addresses per subnet.
As shown in Figure 3, the subnets can be assigned to the LAN segments and router-to-router connections.