Defining Custom Subnet Masks

In this section we’re going to look at the process for custom subnetting Class A, B, and C network addresses. The good news is that the process is all just mechanics – if you follow the steps, you will always be able to define a custom subnet mask that meets your requirements.

When defining a custom mask, we always start with the default mask for the class of address that we’re working with. For a Class A address, the default mask is Recall that when the default subnet mask is used, it means that no subnetting is currently taking place.

In order to define sub-networks, we’ll need to play around with the value of the subnet mask. The extent to which the mask is changed will impact both how many subnets we can have, and how many host addresses will be available on each subnet. Creating a custom mask is accomplished by what I refer to as “stealing bits”. We’re literally going to create another division within the address space in order to identify our subnets.
Consider the basic example in the figure below. In it, the subnet mask clearly defines the boundary between the network and host portion of the IP address shown.

Figure: Subnet mask defining the division between the network and host portions of an IP address.

In order to define subnets, we’ll need to extend the subnet mask. Notice that currently, the boundary between the network and the host portion of an address is defined by where the binary 1s stop – again, you really need to look at this in binary, or it really won’t make sense. To create our custom mask, we’re actually going to start replacing some of the subnet mask 0s with 1s, beginning on the left and moving to the right. In this way, we are “stealing” bits from the host portion of the address space, in what is referred to as “high order”.

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.