VLSM: Variable Length Subnet Masking Explained
Master VLSM (Variable Length Subnet Masking) to efficiently allocate IP addresses. Create subnets of different sizes from a single network address block.
10.1.0.0/16ConceptDetailed Explanation
VLSM: Variable Length Subnet Masking
VLSM (Variable Length Subnet Masking) is a subnetting technique that allows you to divide a network into subnets of different sizes. Unlike fixed-length subnetting where every subnet is the same size, VLSM lets you right-size each subnet to its actual needs.
The Problem VLSM Solves
Imagine you have a 10.1.0.0/16 network and need subnets for:
- A data center with 500 hosts
- An office with 100 hosts
- A point-to-point link with 2 hosts
With fixed-length subnetting, you would create all subnets the same size (e.g., /22 for 1,022 hosts each), wasting most addresses in the smaller subnets. VLSM lets you allocate efficiently:
| Subnet | Size | Usable | Purpose |
|---|---|---|---|
| 10.1.0.0/22 | /22 | 1,022 | Data center |
| 10.1.4.0/24 | /24 | 254 | Office floor |
| 10.1.5.0/30 | /30 | 2 | Point-to-point |
How VLSM Works
- List requirements from largest to smallest
- Allocate the largest subnet first from the available space
- Allocate the next largest from the remaining space
- Repeat until all subnets are allocated
- Verify no subnets overlap
Key Rules
- Subnets must not overlap — each address belongs to exactly one subnet
- Subnet addresses must be properly aligned (the network address must be divisible by the subnet size)
- All routing protocols used must support VLSM (OSPF, EIGRP, BGP do; RIPv1 does not)
Benefits of VLSM
- Efficient address utilization — no wasted addresses on oversized subnets
- Scalable design — new subnets of any size can be added to remaining space
- Hierarchical routing — allows route summarization at boundaries
VLSM and CIDR
VLSM and CIDR are complementary technologies. VLSM handles subnet allocation within an organization, while CIDR handles route aggregation between organizations across the internet.
Use Case
A network architect uses VLSM to allocate a /22 for the server farm, /24s for office floors, and /30s for router links — all from a single /16 block.
Try It — Subnet Calculator
Related Topics
CIDR Notation Explained: How IP Addressing Works
10.0.0.0/16 · Concept
Subnet Mask to CIDR Conversion Table
255.255.255.0/24 · Calculation
Supernetting (Route Aggregation) Explained
192.168.0.0/22 · Concept
/16 Subnet (255.255.0.0)
172.16.0.0/16 · IPv4
/24 Subnet (255.255.255.0)
192.168.1.0/24 · IPv4
Network vs. Host Portion of an IP Address
192.168.1.0/24 · Concept