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.
| FLSM | VLSM | |
|---|---|---|
| Subnet sizes | All equal | Different per need |
| Address waste | High | Low |
| Planning effort | Simple | More careful |
| Routing protocol | Any | Classless 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:
| Segment | Hosts needed | Hosts + 2 | Block | Prefix |
|---|---|---|---|---|
| Engineering LAN | 60 | 62 | 64 | /26 |
| Sales & Support | 25 | 27 | 32 | /27 |
| VoIP & Cameras | 12 | 14 | 16 | /28 |
| Router link | 2 | 4 | 4 | /30 |
- Sort requirements from largest to smallest.
- Size each block: add 2 (network + broadcast) and round up to the next power of two.
- Allocate in order, each block starting right after the previous one on its own size boundary.
| Segment | Network | Mask | Usable range | Broadcast |
|---|---|---|---|---|
| Engineering | 192.168.1.0/26 | 255.255.255.192 | .1 – .62 | .63 |
| Sales | 192.168.1.64/27 | 255.255.255.224 | .65 – .94 | .95 |
| VoIP | 192.168.1.96/28 | 255.255.255.240 | .97 – .110 | .111 |
| Router link | 192.168.1.112/30 | 255.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/31per 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.