Variable-Length Subnet Masking (VLSM)

Both IPv4 classless interdomain routing and IPv6 routing use variable-length subnet masking (VLSM). IPv6 implements VLSM the same way as IPv4 except that it uses 128-bit addressing instead of 32-bit addressing. IPv6 can also have larger prefix lengths ranging from 0 to 128.

A private IP network employing more than one subnet mask within its hierarchy is called a network with variable-length subnet masking (VLSM) since the extended‑network-prefixes have different lengths. This permits

  • More efficient use of the assigned IP address space for the domain

  • Route aggregation that significantly reduces the amount of routing information at the “backbone” level within the private routing domain

Allowing a subnetted network to use more than one subnet mask with its assigned network address space prevents the private domain from being locked into a limited set of subnets.

Suppose a private organization is assigned the address block belonging to Class B network 130.25.0.0 (130.25.0.0 /16). Further, the private domain intranet includes several campuses and has therefore been subnetted using a 3-bit subnet-number field creating a /19 extended-network-prefix that allows for up to eight total subnets within the domain. The subnet mask used would therefore be 255.255.224.0, and the private domain could support up to eight subnets, each capable of addressing 8,190 hosts.

Now, assume the administrator needs to add a ninth subnet. Under traditional methods, the administrator would either have to request another address block (since all possible subnet-numbers have been exhausted), or renumber the entire domain. As shown in VLSM Topology, VLSM eliminates this problem by allowing the administrator to create subnets with different extended-network prefixes.

Note: VLSM Topology contains both IPv4 and IPv6 addresses to show how VLSM could be implemented in a network using either addressing convention. The addresses in this example are for reference only. Do not use these addresses.

Using this example, the administrator of an IPv4 network could configure the 130.25.0.0 /16 domain (or the FEC0::16 domain in an IPv6 network) to have both a /19 and a /26 extended-network-prefix. The /26 prefix permits 1024 subnets of 62 hosts, ideal for small subnets of 60 or less hosts, while the /19 prefix is appropriate for large subnets of up to 8100 hosts.

Figure 10. VLSM Topology

VLSM Topology

To limit the size of the intranet “backbone” routing table, VLSM also supports the recursive division of a domain address space so that it can be aggregated. This is equivalent to dividing a network into subnets, then further subdividing some of the subnets into sub-subnets, then subdividing some of the sub-subnets into sub-sub-subnets, and so on. Aggregating addresses in this manner abstracts the routing information “details” of one subnet group from another subnet group.

Through the use of VLSM aggregation, a router residing on the subnet boundary is able to summarize all of the subnets behind it into a single advertisement, which it injects into the routing table of the parent subnet, eventually advertising a single route into the Internet global routing table for the entire domain.