Variable Length Subnet Mask (VLSM) is a subnet -- a segmented piece of a larger network -- design strategy where all subnet masks can have varying sizes. This process of "subnetting subnets" enables network engineers to use multiple masks for different subnets of a single class A, B or C network.
With VLSM, an IP address space can be divided into a well-defined hierarchy of subnets with different sizes. This helps enhance the usability of subnets because subnets can include masks of varying sizes.
A subnet mask helps define the size of the subnet and create subnets with very different host counts without wasting large numbers of addresses.
To fully understand VLSM, it's important to be familiar with several fundamental terms: subnet mask, subnetting and supernetting.
Every device on a network has an IP address. A subnet mask splits this IP address into the host and network addresses. This helps define which part of the IP address belongs to the network, and which part belongs to the device.
The subnet mask is a 32-bit number, where all the host bits are set to 0, and the network bits are set to 1. So, the subnet mask consists of a sequence of 1s followed by a block of 0s, where the 1s represent the network prefix and the 0s mark the host identifier.
In subnetting (or subnetworking), a large network is logically or physically divided into multiple small networks or "subnets." The reason for subnetting a large network is to address network congestion and its negative impact on speed and productivity.
Subnetting also improves efficiency due to the way an address space is utilized in a small network. Finally, the divisions between subnets allow organizations to enforce access controls, which improves network security, and helps contain security incidents.
In supernetting, multiple contiguous networks are combined into a single large network known as a supernet (or supernetwork). Supernetting advertises many routes in one summarized advertisement or routing entry, instead of individually. This routing entry encompasses all the networks in the supernet, and provides route updates very efficiently.
Supernetting is especially useful in route aggregation to reduce the size of routing tables, and to reduce the size of routing updates exchanged by routing protocols.
For subnetting an IP address for a network, one of two approaches can be used: VLSM or Fixed Length Subnet Mask (FLSM). These methods differ in three key ways:
In VLSM, each subnet chooses the block size based on its requirement. So, if requirements change, subnetting will be required multiple times.
In an organization with multiple departments, different departments may require a different number of IP addresses and subnets (some more and some less). To subnet the subnets in a way that minimizes IP address wastage, VLSM is preferable to FLSM.
Suppose the available IP address block is 192.168.1.0/24, and the requirement is to create four subnets for four departments:
Subnet A: 120 hosts
Subnet B: 50 hosts
Subnet C: 26 hosts
Subnet D: 2 hosts
Here are the steps to allocate the IPs for departments using VLSM:
To use VLSM, a network administrator must use a routing protocol that supports it, such as:
Classful routing protocols like RIPv1 and IGRP do not support VLSM, so before configuring the router for VLSM, network engineers must check whether the protocol supports VLSM
VLSM is similar in concept and intent to Classless Inter-Domain Routing (CIDR), which allows a single internet domain to have an address space that does not fit into traditional address classes. VLSM was originally defined in IETF RFC 1812.
18 Oct 2021