In many situations, we required a large number of subnets. For this purpose, an IP network required that has more hosts bits to borrow from. For example, the class B network address 18.104.22.168 has a default mask of 255.255.0.0 or /16 Prefix. So, this address has 16 network bits in the network portion and 16 host bits in the host portion. The 16 bits in the host portion are available to borrow for creating subnets.
The table in the figure below highlights all the possible scenarios for subnetting a /16 prefix. The total number of the host in a network with /16 prefix is ( 216-2 =65536 ). This is a large network, for better management and performance we can subnet this network according to our requirement. The table in the figure below highlights all the possible scenarios for subnetting a /16 prefix.
Example –You are a network administrator for a large enterprise that requires 60 sub-networks. You have the Public address 22.214.171.124/16.
Borrowing bits from the above mention /16 prefix network, it should start in the third octet, going from left to right. Borrow a single bit one by one until the calculation reaches to 60. You can also consult the table in the above figure which displays the number of subnets and also the number of host per subnet. We can also create a custom table for 60 subnets. The table below displays the number of subnets that can be created when borrowing bits from the third octet. Notice there is up to 14 host bits that can be borrowed in the Class B network.
IP Address – 126.96.36.199
Subnet Mask – 255.255.0.0 of /16
Network Bits (N) – 16
Host Bits (H) – 16
Required Sub-networks – 60
For 60 Sub-network, we have required to borrow 6 bits from the third octet. The prefix will be changed for each network from /16 + 6 =/22. The subnet mask will be 255.255.252.0 for each Sub-network and total with 6 borrowed bits we can make 64 subnets. For Network ID we will follow the following procedure.
There are 6 borrowed bits. The arrangement of these borrowed bits will be according to the network number like the following table.
|Network Number||Borrowed bits arrangement in the third octet||Remarks|
|0||00000000||The first six digits are the binary of the 0|
|1||00000100||The first six digits are the binary of the 1|
|2||00001000||The first six digits are the binary of the 2|
|3||00001100||The first six digits are the binary of the 3|
|50||11001000||The first six digits are the binary of the 50|
|62||11111000||The first six digits are the binary of the 62|
|63||11111100||The first six digits are the binary of the 63|
So we can derive the address ranges, network ID, Broadcast IP, First and Last Usable IP addresses with the help of these digits. For example, we have required the above mention parameters for the subnet number 20, subnet number 40, and Subnet number 55.
We can do the same process for All 64 sub-networks. So now we can use 50 sub-networks from the 64 sub-networks
Calculating the Hosts for subnets
To calculate hosts for each subnet, look at the third and fourth octet. After borrowing 6 bits for the subnet, there is two host bit remaining in the third octet and 8 host bits in the fourth octet and total of 10 bits that were in host portion. So, apply the host calculation formula. There are only 1026 usable host addresses that are available for each /22 subnet.