Skip to content

Guide · VLSM

VLSM explained.

VLSM full form, how it works, how it differs from FLSM and CIDR, and a complete step-by-step VLSM calculation example.

VLSM full form

VLSM stands for Variable Length Subnet Mask. VLSM in networking means that subnets carved from the same network can have different mask lengths. A conference room that needs 10 addresses gets a small /28, a data centre that needs 400 gets a /23, and a link between two routers gets a /30 — all from the same parent block.

VLSM vs FLSM

With FLSM (Fixed Length Subnet Mask) every subnet has the same size, so the size must fit the largest requirement. If the biggest LAN needs 100 hosts, every subnet becomes a /25 — including point-to-point links that need only 2 addresses. VLSM removes that waste.

FLSMVLSM
Subnet sizesAll equalDifferent per need
Address wasteHighLow
Planning effortSimpleMore careful
Routing protocolAnyClassless only (OSPF, EIGRP, BGP, RIPv2)

VLSM vs CIDR

The two terms are often confused. CIDR is the addressing and routing system that replaced fixed classes and enables prefixes of any length plus route aggregation. VLSM is a design technique inside your own address space that uses several prefix lengths at once. In practice you receive a CIDR block from your provider and use VLSM to divide it. Read more about notation on the CIDR calculator page.

VLSM calculation example (step by step)

You are given 192.168.1.0/24 and must serve four segments:

SegmentHosts neededHosts + 2BlockPrefix
Engineering LAN606264/26
Sales & Support252732/27
VoIP & Cameras121416/28
Router link244/30
  1. Sort requirements from largest to smallest.
  2. Size each block: add 2 (network + broadcast) and round up to the next power of two.
  3. Allocate in order, each block starting right after the previous one on its own size boundary.
SegmentNetworkMaskUsable rangeBroadcast
Engineering192.168.1.0/26255.255.255.192.1 – .62.63
Sales192.168.1.64/27255.255.255.224.65 – .94.95
VoIP192.168.1.96/28255.255.255.240.97 – .110.111
Router link192.168.1.112/30255.255.255.252.113 – .114.115

The space from 192.168.1.116 to 192.168.1.255 remains free for growth. Enter the same segments in the VLSM calculator to see this table generated automatically, with the calculation steps for each subnet.

The golden rule of VLSM

Always allocate the largest subnet first. Big blocks have the strictest alignment requirements; placing them first guarantees that every smaller block lands on a valid boundary and that no gaps are wasted between allocations.

VLSM tips

  • Use /30 (or /31 per RFC 3021) for router-to-router links.
  • Leave spare blocks for growth rather than packing the space completely.
  • Summarise: allocate related subnets contiguously so they can be advertised as one route.
  • Document every allocation — overlapping subnets are the most common VLSM mistake.

Frequently asked questions

What is the full form of VLSM?

VLSM stands for Variable Length Subnet Mask (or Masking). It allows one network to be divided into subnets of different sizes, each with its own mask.

What does VLSM mean in networking?

In networking VLSM means using different prefix lengths inside the same address space, so a 100-host LAN can get a /25 while a router link gets a /30, instead of forcing every subnet to be the same size.

What is the difference between VLSM and FLSM?

FLSM (Fixed Length Subnet Mask) splits a network into equal-sized subnets. VLSM splits it into unequal subnets matched to each requirement, so far fewer addresses are wasted.

What is the difference between VLSM and CIDR?

VLSM is the technique of using different mask lengths inside an organisation’s network. CIDR is the classless addressing and routing scheme that removed class boundaries and allows route aggregation on the Internet. VLSM is usually applied within CIDR blocks.

Which routing protocols support VLSM?

Classless protocols such as OSPF, EIGRP, IS-IS, BGP and RIPv2 carry the subnet mask in updates and support VLSM. RIPv1 and IGRP do not.