# Subnetting Based on Network Requirements

Sometimes a number of sub-networks required, with less importance on the number of host addresses per sub-network. For example, an organization wants to separate their network traffic based on internal structure or department setup. In this case, the number of subnets is most important in determining how many bits to borrow.

Remember the number of subnets created when bits are borrowed can be calculated using the formula 2^{n} (where n is the number of bits borrowed). The important thing is to balance the number of hosts required and the number of hosts needed for the largest subnet. The more bits borrowed to create additional subnets means fewer hosts per subnet.

## Examples Subnetting Based on Network Requirements

Good network administrators plan the network addressing scheme to accommodate the maximum number of hosts for each network and the number of subnets. The addressing scheme must allow for expansion in the number of host addresses per subnet and the total number of subnets.

In this example, an organization has allocated a network address of 130.10.0.0/23. As shown in Figure 1, the host portion consists of 9 bits. So the number of hosts is 2^{9}-2=510.

Now the organization tasks the network administrator to isolate the traffic of all departments from each other. The topology for the departments, shown in Figure 2, consists of 4 LAN segments and one router segment. So 5 subnets required for this topology. The largest subnet requires 55 hosts and the smallest segment requires 20 hosts.

The 130.10.0.0/23 network address has 9 host bits as shown in Figure 1. The largest subnet requires 55 hosts, a minimum of 6 host bits required to provide addressing for 55 hosts. The formula for determining a host, we already discuss which is: 2^{6} – 2 = 62 hosts. So if we required 6 bits for host portion then we can borrow 3 bits from host portion for subnetting. We can determine the subnet using the formula: 2^{3} = 8. Therefore, the first 3 bits of the host portion can used to assign subnets, as shown in Figure 3. When 2 bits borrowed, the new prefix length is /26 with a subnet mask of 255.255.255.192. So, the example internetwork requires 5 subnets and the available subnet is 8, this will allow for some additional growth.