// Lesson 11 of 49 · IPv4 addressing and subnetting
VLSM — addressing plans without waste
With fixed-size subnets, a point-to-point link needing 2 addresses wastes the same space as a user LAN needing 100. VLSM (variable-length subnet masking) lets each segment use the prefix that fits it.
The rule: biggest first
Always allocate the largest requirement first, then the next largest, from the start of the free space. This keeps every subnet on a valid boundary and avoids overlaps.
Worked example
Block: 172.20.10.0/24. Requirements:
| Segment | Hosts needed |
|---|---|
| Staff LAN | 100 |
| Guest Wi-Fi | 50 |
| Servers | 20 |
| Management | 10 |
| WAN link R1–R2 | 2 |
| WAN link R1–R3 | 2 |
Choose the smallest prefix for each:
| Segment | Hosts | Prefix | Size |
|---|---|---|---|
| Staff LAN | 100 | /25 (126) | 128 |
| Guest Wi-Fi | 50 | /26 (62) | 64 |
| Servers | 20 | /27 (30) | 32 |
| Management | 10 | /28 (14) | 16 |
| WAN R1–R2 | 2 | /30 (2) | 4 |
| WAN R1–R3 | 2 | /30 (2) | 4 |
Allocate in order:
| Segment | Network | Hosts | Broadcast |
|---|---|---|---|
| Staff LAN | 172.20.10.0/25 | .1 – .126 | .127 |
| Guest Wi-Fi | 172.20.10.128/26 | .129 – .190 | .191 |
| Servers | 172.20.10.192/27 | .193 – .222 | .223 |
| Management | 172.20.10.224/28 | .225 – .238 | .239 |
| WAN R1–R2 | 172.20.10.240/30 | .241 – .242 | .243 |
| WAN R1–R3 | 172.20.10.244/30 | .245 – .246 | .247 |
Free for growth: 172.20.10.248/29.
Design habits worth keeping
- Leave room to grow — a LAN that needs 100 hosts today may need 150 next year.
- Keep a consistent scheme: for example
.1is always the gateway. - Group related subnets so they can be summarised.
- Document the plan in one table (an IPAM tool or a spreadsheet) before configuring anything.
Checking for overlaps
Two subnets overlap if one's range contains the other's network address. With VLSM done biggest-first on block boundaries, overlaps cannot happen — they appear when someone adds a subnet later without checking the plan.
Key points
- VLSM = different prefix lengths in one block.
- Allocate largest first, on block boundaries.
- Use /30 (or /31) for point-to-point links.
- Keep the addressing plan documented and leave spare space.
Sign in to save your lesson progress across devices. You can read every published lesson without an account.