Subnetting Example with a /16 prefix

In many situations, we required a large number of subnets. For this purpose, an IP network requires more host bits to borrow from. For example, the class B network address 130.20.0.0 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 hosts in a network with a/16 prefix is ( 216-2 =65536 ). This is an extensive network. We can subnet this network according to our requirements for better management and performance.

 

/16 prefix

Example: You are a network administrator for a large enterprise that requires 60 sub-networks. Your Public address is 130.20.0.0/16.

Borrowing bits from those mentioned above/16 prefix network should start in the third octet, going from left to right. Borrow a single bit one by one until the calculation reaches 60. You can also consult the table in the above figure, which displays the number of subnets and the number of hosts per subnet. We can also create a custom table for 60 subnets. The table below displays the number of subnets that can be made when borrowing bits from the third octet. Notice that the Class B network can borrow up to 14 host bits.

IP Address – 130.20.0.0

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 are required to borrow 6 bits from the third octet. Each network’s prefix will change

from /16 + 6 =/22. The subnet mask will be 255.255.252.0 for each Subnetwork, and with 6 borrowed bits, we can make 64 subnets. For Network ID, we will follow the following procedure. 

There are 6 borrowed bits. These borrowed bits will be arranged according to the network number, as in the following table.

Network NumberBorrowed bits arrangement in the third octetRemarks
000000000 The first six digits are the binary of the 0
100000100 The first six digits are the binary of the 1
200001000 The first six digits are the binary of the 2
300001100 The first six digits are the binary of the 3
...
...
5011001000 The first six digits are the binary of the 50
...
...
6211111000 The first six digits are the binary of the 62
6311111100The first six digits are the binary of the 63

These digits help us derive the address ranges, network ID, Broadcast IP, and First and Last Usable IP addresses. For example, we have required the abovementioned parameters for subnet numbers 20, 40, and 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 octets. After borrowing 6 bits for the subnet, two host bits remain in the third octet and 8 host bits in the fourth octet, for 10 bits in the host portion. So, apply the host calculation formula. There are only 1026 usable host addresses available for each /22 subnet.