2.4 Variable-Length Subnet Masks
2.4.1 Variable length subnet mask overview
VLSMs (Variable-Length Subnet Masks) provide the capability to include more than one subnet mask within a class-based address, and the capability to subnet an already subnetted network address. VLSMs do this by using a portion of the host address space as a subnet address. The term variable is used because the subnet address field can be variable length, such as two bits, three bits, or four bits, as opposed to using a full byte for the subnet. These capabilities offer the following two benefits:
  • Even more efficient use of IP addresses --- Without the use of VLSMs, companies are locked into implementing a single subnet within a NIC number in the entire network. With VLSMs, you can create a subnet with only two hosts, for example, which is ideal for serial links.
  • For example, consider that the 172.16.0.0/16 network address is divided into subnets using 172.16.0.0/24 masking and one of the subnetworks in this range, 172.16.14.0/24, is further divided into smaller subnets with the 172.16.14.0/27 masking (see the main figure). These subnets range from 172.16.14.4 to 172.16.14.252. In the main figure, one of the smaller subnets is further divided with the 172.16.14.128/30 subnet to be used on the WAN links and ultimately, it avoids wasting subnets.

Greater capability to use route summarization --- VLSMs allow for more hierarchical levels within your addressing plan, and thus allow for better route summarization within routing tables. In the main figure, for example, subnet 172.16.0.0/24 summarizes subnet 172.16.14.0. Subnet 172.16.0.0/24 includes all the addresses that are further subnetted, using VLSMs, from subnets 172.16.14.0/27 and 172.16.14.128/30.

How to use route summarization is discussed in more detail later in this chapter.