Variable Length Subnetting (VLSM)
VLSM stands for Variable-Length Subnet Masking, which allows subnetting a network into subnets of different sizes based on need. Instead of using the same subnet mask for all subnets (as in fixed-length subnetting), VLSM enables more efficient use of IP addresses.
Important: VLSM is also known as Classless Subnetting, CIDR (Classless Inter-Domain Routing) and Custom Subnetting as it allows subnets of different sizes. |
Why Use VLSM
In real-world networks:
- Not all departments or locations need the same number of IP addresses.
- Using fixed-length subnets leads to wasted IPs.
- VLSM solves this by assigning larger subnets to bigger networks and smaller subnets to smaller networks.
Key Concepts in VLSM
- Start with the largest subnet requirement first.
- Borrow bits from the host portion as needed.
- Always arrange subnets from largest to smallest to avoid overlaps.
- VLSM is supported in classless routing protocols (e.g., OSPF, EIGRP, BGP), but not in RIP v1.
Example of VLSM
You are given a network: 192.168.1.0/24
You need to divide it into subnets for:
Department | Required Hosts |
---|---|
A | 100 |
B | 50 |
C | 20 |
D | 10 |
Step-by-Step VLSM
Step 1: Sort by host needs (largest to smallest)
- A – 100 hosts → Needs at least
/25
(supports 126 usable IPs) - B – 50 hosts → Needs
/26
(62 usable) - C – 20 hosts → Needs
/27
(30 usable) - D – 10 hosts → Needs
/28
(14 usable)
Step 2: Assign subnets
- 192.168.1.0/25 → Department A (IP range: 192.168.1.1 to 192.168.1.126)
- 192.168.1.128/26 → Department B (192.168.1.129 to 192.168.1.190)
- 192.168.1.192/27 → Department C (192.168.1.193 to 192..222)
- 192.168.1.224/28 → Department D (192.168.1.225 to 192.168.1.238)
You’ve efficiently used IPs with no waste.
Benefits of VLSM
Here are some key benefits of VLSM
- Efficient IP address utilization
- Flexible subnetting
- Reduces IP wastage
- Ideal for real-world, hierarchical network design