Subnetting Challenge

To make things interesting, let’s go through what I consider to be a tough subnetting question. To be honest, if you can follow this question and understand what you’re doing, there isn’t a subnetting question I can ask that you can’t answer. We’re going to go through it step-by-step, just to be sure that you’re clear on determining the correct subnet mask, and the ranges of hosts on the first, second, and last subnets.

In this scenario, we’re going to assume a network ID of You should already be familiar with its default mask. Our requirement is to have at least 4000 subnets. Our goal is to determine both the custom subnet mask, as well as the first, second, and last ranges of host IDs.

Let’s start with the custom subnet mask. Since we need 4000 subnets minimum, we need to determine how many bits are required. It should already be obvious that we’ll need to move beyond a single octet, since 8 bits will only provide a maximum of 256 subnets. If we try 10 bits, we come up with a value of 210-2 or 1022 subnets, obviously not enough. 11 bits provides 2046 subnets and 12 bits 4094 (212-2). Obviously 12 bits meets out requirement, so that’s what we’ll use.

Recall that the default subnet mask for the private network address is If we add an additional 12 bits, the mask becomes, as shown in the figure below.

Figure: Network, subnet, and host portions based on the custom subnet mask

Now that we know our custom mask, let’s determine how many hosts we can support per subnet. From the diagram above, we have 12 host bits remaining, giving us a maximum of 212-2, or 4094 hosts per subnet.

Our next goal is determining the first valid range of IP addresses. Don’t get thrown off by the fact that the subnet portion of the address spans one and a half octets. If we simply follow the same rules as before, we’ll be fine. In this case, set all 12 subnet bits the lowest non-zero value, and determine the first and last valid host addresses, as shown in the figure below.

Figure: Defining the IP address range for the first subnet.

Notice that the first valid range of IP addresses on subnet goes from up to The second subnet will start when we set the 12 bits of the subnet ID to 00000000 0010.

Figure: Defining the IP address range for the second subnet.

The second valid range of addresses becomes to The broadcast ID for this subnet is

The subnet IDs will continue to increase until the last range is reached – remember that this occurs when the subnet ID is set to the highest value that is not all binary 1 values – in this case, 11111111 1110.

Figure: Defining the IP address range for the last subnet.

As such, our last valid subnet is subnet ID, with an address range from up to Remember that in between the three subnets that we’ve looked at, another 4091 subnets exist.

Author: Dan DiNicolo

Dan DiNicolo is a freelance author, consultant, trainer, and the managing editor of He is the author of the CCNA Study Guide found on this site, as well as many books including the PC Magazine titles Windows XP Security Solutions and Windows Vista Security Solutions. Click here to contact Dan.