In the previous examples, we considered an internetwork that required 3 subnets and one that required 5 subnets. To achieve the goal of creating four subnets we borrowed 2 bits from the 8 hosts bits available with an IP address that has a default mask of 255.255.255.0, or a /24 prefix. The resulting subnet mask was 255.255.255.192, and a total of 4 possible subnets were created. Applying the host calculation formula of 2^6-2, we determined that on each one of those 4 subnets we could have 62 host addresses to assign to nodes.

To acquire 5 subnets, we borrowed 3 bits from the 8 hosts bits available with an IP address that has a default mask of 255.255.255.0, or a /24 prefix. In borrowing those 3 bits from the host portion of the address, we left 5 hosts bits remaining. The resulting subnet mask was 255.255.255.224, with a total of 8 subnets create, and 30 host addresses per subnet.

Consider large organizations or campuses with an internetwork that requires 100 subnets. Just as in the previous examples, to achieve the goal of creating 100 subnets, we must borrow bits from the host portion of the IP address of the existing internetwork. As before, to calculate the number of subnets, we must look at the number of available host bits and use the subnet calculation formula 2^number of bits borrowed minus 2. Using the IP address of the last example, 192.168.10.0/24, we have 8 host bits; to create 100 subnets, we must borrow 7 bits.

Calculate the number of subnets if 7 bits are borrowed: 2^7=128 subnets.

However, borrowing 7 bits will leave just one remaining host bit and if we apply the host calculation formula, the result would be no hosts on these subnets. Calculate the number of hosts if one bit is remaining: 2^1=2, then subtract 2 for the network address and the network broadcast; the result 0 hosts (2^1-2=0).

In a situation requiring a larger number of subnets, an IP network is required that has more hosts bits to borrow from, such as an IP address with a default subnet mask of /16, or 255.255.0.0. Addresses that have a range of 128 - 191 in the first octet have a default mask of 255.255.0.0, or /16. Addresses in this range have 16 bits in the network portion and 16 bits in the host portion. These 16 bits are the bits that are available to borrow for creating subnets.

Using a new IP address of 172.16.0.0/16 address block, host bits must be borrowed to create at least 100 subnets. Starting from left to right with the first available host bit, we will borrow a single bit at a time until we reach the number of bits necessary to create 100 subnets. Borrowing 1 bit, we would create 2 subnets, borrowing 2 bits, we would create 4 subnets, 3 bits 8 subnets, and so on. Calculate the number of subnets created if 7 bits are borrowed using the formula 2^number of bits borrowed:

2^7 = 128 subnets

Borrowing 7 bits creates 128 subnets, as shown in the figure.

Recall that the subnet mask must change to reflect the borrowed bits. In this example, when 7 bits are borrowed, the mask is extended 7 bits into the third octet. In decimal, the mask is represented as 255.255.254.0, or a /23 prefix, because the third octet is 11111110 in binary and the fourth octet is 00000000 in binary. Subnetting will be done in the third octet, with the host bits in the third and fourth octets.