VLSM Network Design

Design efficient networks using Variable-Length Subnet Masking to minimize address waste.

What Is VLSM?

VLSM (Variable-Length Subnet Masking) allows you to divide a network into subnets of different sizes. Without VLSM, all subnets must use the same mask, wasting addresses in smaller segments.

The Problem VLSM Solves

Imagine you have 10.0.0.0/24 (254 hosts) and need: - Department A: 100 hosts - Department B: 50 hosts - Server room: 10 hosts - Point-to-point link: 2 hosts

Without VLSM, you'd use /25 for everything (126 hosts each) — but you'd need 4 subnets of 126, which exceeds your /24 allocation.

With VLSM, you assign different-sized subnets based on actual need.

VLSM Design Process

Step 1: Sort by Size (Largest First)

Always allocate the largest subnet first to maintain contiguous address space.

Segment Hosts Needed Subnet Size
Dept A 100 /25 (126 hosts)
Dept B 50 /26 (62 hosts)
Servers 10 /28 (14 hosts)
P2P Link 2 /30 (2 hosts)

Step 2: Allocate Sequentially

Starting from 10.0.0.0/24:

10.0.0.0/25   → Dept A    (10.0.0.1 – 10.0.0.126)    126 hosts
10.0.0.128/26 → Dept B    (10.0.0.129 – 10.0.0.190)    62 hosts
10.0.0.192/28 → Servers   (10.0.0.193 – 10.0.0.206)    14 hosts
10.0.0.208/30 → P2P Link  (10.0.0.209 – 10.0.0.210)     2 hosts

Step 3: Verify No Overlap

Each subnet's range must not overlap with any other: - /25 ends at .127 → /26 starts at .128 ✓ - /26 ends at .191 → /28 starts at .192 ✓ - /28 ends at .207 → /30 starts at .208 ✓

Address Utilization

Method Addresses Used Addresses Wasted
Fixed /25 504 (4×126) Exceeds /24!
Fixed /26 248 (4×62) 86 wasted
VLSM 204 50 remaining (available for future use)

VLSM uses 80% of the address space efficiently, compared to fixed-length subnetting.

Key Rules

  • Subnets must fall on power-of-2 boundaries
  • Always allocate largest subnets first
  • Verify no overlapping ranges
  • Reserve space for future growth where possible
  • Point-to-point links use /30 (or /31 per RFC 3021)

Xem thêm