2.3 VLSM
2.3.1 Variable-Length Subnet Masks
VLSM allows an organization to use more than one subnet mask within the same network address space. Implementing VLSM is often referred to as "subnetting a subnet," and it can be used to maximize addressing efficiency.

Consider the subnets created by borrowing 3 bits from the host portion of the Class C address, 207.21.24.0, shown in Figure .

If you use the
ip subnet-zero command, this mask creates seven usable subnets of 30 hosts each. You can use four of these subnets to address remote offices in the organization picture in Figure , at sites A, B, C, and D.

Unfortunately, you have only three subnets left for future growth, and you have yet to address (literally) the three point-to-point WAN links between the four sites. If you assign the three remaining subnets to the WAN links, you would completely exhaust your supply of IP addresses. Moreover, squandering the remaining 30-host subnets to address these two-node networks will waste more than a third of your available address space!

As you may have guessed, there are ways to avoid this kind of waste. Over the past 20 years, network engineers have developed three strategies for efficiently addressing point- to-point WAN links:
  • Use VLSM
  • Use private addressing (RFC 1918)
  • Use IP unnumbered

Private addresses and IP unnumbered are discussed in detail later in this chapter. This section focuses on VLSM. If VLSM is applied to your addressing problem, your Class C address can be broken into groups (i.e., subnets) of various sizes. Large subnets are created for addressing LANs, and very small subnets are created for WAN links and other special cases.

You use a 30-bit mask to create subnets with only two valid host addresses, the exact number needed for a point-to-point connection. In Figure , you can see what happens if we take one of our three remaining subnets (subnet 6) and subnet it again using a 30-bit mask.

Subnetting the 207.21.24.192 /27 subnet in this way supplies us with eight ranges of addresses to be used for point-to-point networks. For example, the network 207.21.24.192/30 can be used to address the point-to-point serial link between Site A's router and Site B's router .

So how do you configure VLSM on a Cisco router? Figure shows the commands needed to configure Site A's router (RTA) with a 27-bit mask on its Ethernet port and a 30-bit mask on its serial port.