Variable Length Subnet Masking

If a subnet mask can be individually associated with each destination address advertised throughout an internetwork, there is no reason why all the masks must be of equal length. That fact is the basis for VLSM.

A simple application of VLSM is shown in Figure 7.4. Each data link of the internetwork shown must have a uniquely identifiable subnet address, and each subnet address must contain enough host addresses to accommodate the devices attached to the data link.

Figure 7.4. Using VLSM, the class C address shown can be subnetted to accommodate this internetwork and the hosts on each of its data links.

Figure 7.4. Using VLSM, the class C address shown can be subnetted to accommodate this internetwork and the hosts on each of its data links.

Vlsm Class

Given the class C network address assigned to this internet, subnetting cannot be accomplished at all without VLSM. The token ring, with its need for 100 host addresses, requires a 25-bit mask (1 bit of subnetting); a mask any longer would not leave enough host bits. But if all masks must be of equal length, only one more subnet can be created from the class C address.151 There would not be enough subnets to go around.

[51 This statement assumes that the all-zeros and all-ones subnets—the only subnets available with a single bit of subnetting—can be routed.

With VLSM the widely varying host address requirements of the internetwork of Figure 7.4 can be met using a class C network address. Table 7.1 shows the subnets and the address ranges available within each.

Table 7.1. The subnets of Figure 7.4.

Subnet/Mask

Address Range

Broadcast Address

192.168.50.0/25

192.168.50.1-192.168.50.126

192.168.50.127

192.168.50.128/26

192.168.50.129-192.168.50.190

192.168.50.191

192.168.50.192/27

192.168.50.193-192.168.50.222

192.168.50.223

192.168.50.224/28

192.168.50.225-192.168.50.238

192.168.50.239

192.168.50.240/30

192.168.50.241-192.168.50.242

192.168.50.243

192.168.50.244/30

192.168.50.245-192.168.50.246

VLSM can be thoughts of as sub-subnetting

Many people, including many who work with VLSM, make the technique more complicated than it is. The complete key to VLSM is this: After a network address is subnetted in the standard fashion, those subnets can themselves be subnetted. In fact, one will occasionally hear VLSM referred to as " sub-subnetting."

A close examination of the addresses in Table 7.1 (in binary, as always) will reveal how VLSM works.[6] First, a 25-bit mask is used to divide the network address into two subnets: 192.168.50.0/25 and 192.168.50.128/25. The first subnet provides 126 host addresses to meet the needs of the token ring in Figure 7.4.

[6] The reader is strongly encouraged to work through this entire example in binary.

From Chapter 2, you know that subnetting involves expanding the default network mask so that some host bits are interpreted as network bits. This same procedure is applied to the remaining subnet 192.168.50.128/25. One of the Ethernets requires 50 host addresses, so the mask of the remaining subnet is expanded to 26 bits. This step provides two sub-subnets, 192.168.50.128/26 and 192.168.192/26, each with 62 available host addresses. The first sub-subnet is taken for the larger Ethernet, leaving the second to again be subnetted for the other data links.

This procedure is repeated twice more to provide the necessary subnets of the necessary size for the smaller Ethernet and the FDDI ring. A subnet of 192.168.50.240/28 remains, as do two serial links requiring subnets. Any point-to-point link will, by its very nature, require only two host addresses—one at each end. Thirty-bit masks are used to create the two serial link subnets, each with just two available host addresses.

Point-to-point links, requiring a subnet address but only two host addresses per subnet, are one justification for using VLSM. For example, Figure 7.5 shows a typical WAN topology with remote routers connected via Frame Relay PVCs to a hub router. Modern practice usually calls for each of these PVCs to be configured on a point-to-point subinterface.[7] Without VLSM, equal-size subnets would be necessary; the size would be dictated by the subnet with the largest number of host devices.

[7] Subinterfaces are outside the scope of this book. Readers who are not already familiar with these useful tools are referred to the Cisco Configuration Guide.

Figure 7.5. VLSM allows each of these PVCs to be configured as a separate subnet without wasting host addresses.

Figure 7.5. VLSM allows each of these PVCs to be configured as a separate subnet without wasting host addresses.

Suppose a class B address is used for the network in Figure 7.5 and each router is attached to several LANs, each of which may have up to 175 attached devices. A 24-bit mask would be necessary for each subnet, including each PVC. Consequently, for every PVC in the internetwork, 252 addresses are wasted. With VLSM, a single subnet can be selected and sub-subnetted with a 30-bit mask; enough subnets will be created for up to 64 point-to-point links (Figure 7.6).

Figure 7.6. This class B address has been subnetted with a 24-bit mask. 172.17.11.0 has been sub-subnetted with a 30-bit mask; the resulting 64 subnets can be assigned to point-to-point links.

Figure 7.6. This class B address has been subnetted with a 24-bit mask. 172.17.11.0 has been sub-subnetted with a 30-bit mask; the resulting 64 subnets can be assigned to point-to-point links.

Examples of VLSM address designs appear in this and subsequent chapters. Chapter 8 introduces another major justification for using VLSM, hierarchical addressing, as well as address aggregation.

0 0

Post a comment