We’ve already looked at the basic idea of a subnet mask – we know that it is used to define the separation between the network and host portion of an IP address. The next step is looking at how we can define a custom mask to meet the requirements of a particular network. Before we go there, we need to define what subnetting is really all about.

If you’re already familiar with Windows, you have probably experienced how some versions will automatically populate the subnet mask field after you’ve entered an IP address. By default, the subnet mask provided is usually the default mask for the class of address that you’ve entered. The default subnet mask is used in cases where you are not subnetting a network – meaning the entire address range is considered to be part of one big, single network.

When you custom subnet a network, what you are actually doing is logically breaking up the IP address space into a number of smaller (or sub) networks. Reasons for doing this vary, but generally fall into a three main categories. These include:

  • Facilitating better performance. By breaking one big network up into smaller networks, traffic on each network is reduced, resulting in better performance.
  • Simplifying management. In cases where a network is broken down into smaller networks, management complexity is reduced, making troubleshooting and monitoring easier.
  • Spanning geographical distances. Because many network environments today consist of geographically dispersed but interconnected networks, subnetting allows remote locations (and the WAN links between networks) to be considered as individual networks, resulting in better performance.

Defining a custom subnet mask isn’t terribly difficult, but there are a number of factors that you will need to consider prior to getting started. Most of these factors center on properly characterizing the network, as well as accounting for future growth. In order to accomplish this, you need to be aware of the following:

  • Each subnet that you define will require a unique subnet ID, as will each WAN link.
  • Each host and each router interface will require a unique IP address

Consider the simple network in the diagram below. Notice that it consists of two small LANs with a dedicated WAN link between the locations.

Figure: Small Company with 2 LANs and 1 WAN link.

Given the scenario above, how do we calculate how many subnets we require? You should immediately assume one subnet for each LAN and one for the WAN link, or 3 total. Recall, however, that you also want to account for future growth. What if the company purchases another company, or decides to open additional offices? It’s generally a good idea to account for more subnets that your immediate needs dictate.

Next, imagine that each office has 10 computers and a router for the WAN connection. In each office, it makes a basic requirement of eleven IP addresses, one for each computer, and one for the local router interfaces. Obviously this number doesn’t account for growth, which should also be factored in. Don’t forget the WAN link either – although it only connects two devices, it still requires its own subnet and two IP addresses. The figure below outlines the subnet and IP address requirements.

Figure: Subnet and IP address requirements.

After we’ve gathered the data on the number of subnets and IP addresses required on each, we’re ready to begin the real work – defining a custom subnet mask.

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.