Variable Length Subnet Mask (VLSM)

Learn via video courses
Topics Covered

Overview

VLSM stands for variable length subnet mask is a concept that is used to divide a network into multiple subnetworks of different lengths.

Introduction to Variable Length Subnet Mask (VLSM)

VLSM is a concept that is used to divide a network into multiple subnetworks of different lengths and sizes. VLSM is very commonly used in various fields. For example, a college has a huge network that is divided into multiple sub-networks (one sub-network for the administration department, another for the academics department, etc.).

vlsm-example

VLSM Fundamentals

There are 3 important concepts that must be clear before reading further about VLSM. These 3 concepts are discussed briefly below.

1. Subnet Mask

Any IPv4 network address is a 32-bit address consisting of two parts i.e. host address and network address. The network part uniquely represents the address of the network while the host part uniquely represents the address of the host under the above-mentioned network (since multiple hosts are there under a single network).

ip-address-parts

A subnet mask is a 32-bit address in which all the bits of the network part are set to 1 and all the bits of the host part will be set to 0. So, the subnet mask of the IP address which is given in the above image will be 255.255.0.0.

subnet-mask-example

2. Subnetting

When a huge network is divided into multiple subnetworks by fixing a particular bit of the host part of the network address, it is called subnetting. For example, a college having an academic department is divided into two sub-departments (subnetworks), the computer science department and the information technology department.

subnetting-example

3. Supernetting

When multiple networks are combined to form a single network, it is called supernetting. It is opposite to the subnetting. For example, the academic committee has decided to merge the computer science department and the information technology department into a single network (supernetwork).

supernetting-example

Using VLSM

For a network administrator to use VLSM, it must configure dynamic routing protocols such as Border Gateway Protocol (BGP), Routing Information Protocol v2 (RIPv2), Open Shortest Path First (OSPF), etc.

Classful routing protocols like Routing Information Protocol v1 (RUPv1) do not support VLSM.

We have articles in which, everything related to the routing and the routing protocols have been discussed in detail.

Steps to Implement VLSM

Let us say we have an IPv4 address 192.168.1.0 which represents the network of the college that we discussed in the intro section of the article as an example. The total number of hosts on this network can range from the address 192.168.1.0 to 192.168.1.255 which is equal to 256 hosts (addresses 192.168.1.0 reserved to represent the whole network and 192.168.1.255 is reserved for broadcasting purposes).

As per the example we discussed in our intro section, we have an Academics Department, Administration Department, Sports Department, and Placement Department in our college. Given below are the requirements for the number of hosts for each department.

DepartmentHosts Required
Academics122
Administration45
Placement25
Sports10

The subnetworks for all the departments can be created by using VLSM and are represented in the pie chart given below.

vlsm-implementation-example

We have created the sub-networks for each department in such a way that the number of assigned hosts to each department is greater than the number of required hosts for each department. The number of hosts in each department is different. That is why this is an example of a variable-length subnet mask.

FLSM Subnetting vs. VLSM Subnetting

Fixed Length Subnet Mask (FLSM)Variable Length Subnet Mask (VLSM)
The size of the subnets formed in the Fixed length Subnet Mask is the same.The sizes of the subnets formed in Variable length Subnet Mask are different.
FLSM is inefficient since it leads to wastage of network resources since sub network size is fixed.VLSM is more efficient than FLSM and it leads to lesser wastage of network resources since sub-networks can be of different sizes.
Configuration of FLSM is less complex than VLSM since sub-network sizes are fixed.Configuration of VLSM is more complex than FLSM since sub-network sizes are not fixed.

Advantages of VLSM over FLSM

  1. VLSM is more efficient than FLSM because it leads to lesser wastage of IP addresses since variable-sized sub-networks are allowed in VLSM.
  2. VLSM gives us more flexibility in creating a sub-network because of its variable size sub-network nature.
  3. VLSM is suitable for public network IP addressing since, in the public domain, the size of a network can vary. In contrast, FLSM is used for private network IP addresses.

Conclusion

  1. VLSM stands for variable length subnet mask and is a concept that is used to divide a network into multiple subnetworks of different lengths.
  2. In VLSM, the size of the sub-networks created can vary while in FLSM, the size of the sub-networks created is fixed.
  3. When a huge network is divided into multiple sub-networks, it is called subnetting. When multiple networks are combined to form a single network, it is called supernetting.
  4. VLSM is more efficient than FLSM because it leads to lesser wastage of IP addresses since variable-sized sub-networks are allowed in VLSM.