# Creating Subnets with a /16 prefix

In circumstances required a large number of subnets, an IP network required that has more hosts bits to borrow from. For example, the class B network address 172.16.0.0 has a default mask of 255.255.0.0, or /16. 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 highlights all the possible scenarios for subnetting a /16 prefix. The total number of host in a network with /16 prefix is ( 2^{16}-2 =65536 ). This is a large network, for better management and performance we can subnet this network according to our requirement. The table below highlights all the possible scenarios for subnetting a /16 prefix.

## Example – Creating 50 Subnets with a /16 Prefix

Think about that you are a network administrator for a large enterprise that requires 50 sub-networks. You have chosen the private address 172.16.0.0/16 as its internal network address.

Borrowing bits from a /16 address, it should start in the third octet, going from left to right. Borrow a single bit one by one until the number of bits necessary to create 50 subnets is reached.

The table in figure 1 display the number of subnets and the number of host per subnet. We can consult this table.we can also create a custom table for 50 subnets which are shown in figure 2. Which 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 Class B network.

#### IP Address – 172.16.0.0

#### Subnet Mask – 255.255.0.0 or /16

#### Network Bits (N) – 16

#### Host Bits (H) – 16

#### Required Sub-networks – 50

For 50 Sub-network we will be required to borrow 6 bits of the third octet. the prefix will be changed for each network from /16 + 6 =/22. Subnet mask will be 255.255.252.0 for each Sub-network. 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 is the binary of the 0 |

1 | 00000100 |
The First six digits is the binary of the 1 |

2 | 00001000 |
The First six digits is the binary of the 2 |

3 | 00001100 |
The First six digits is the binary of the 3 |

. | . | . |

. | . | . |

50 | 11001000 |
The First six digits is the binary of the 50 |

. | . | . |

. | . | . |

62 | 11111000 |
The First six digits is the binary of the 62 |

63 | 11111100 |
The First six digits is 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. The figures below illustrate the address ranges of different networks.

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 each subnet can support, 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 for a total of 10 bits that were not borrowed. So, apply the host calculation formula. There are only 1026 host addresses that are available for each /22 subnet.