Subnetting Examples (Worked Step by Step)
Theory clicks when you see it applied. Below are four scenarios a network engineer actually meets — each worked with the block-size method from requirement to final address plan.
Example 1 — split a /24 into 4 departments
Requirement: 192.168.1.0/24, four departments of up to 60 hosts each.
60 hosts → need 2^6 − 2 = 62 → /26 (block 64). Four /26s fit perfectly in a /24:
Sales 192.168.1.0/26 (.1–.62) Support 192.168.1.64/26 (.65–.126) Dev 192.168.1.128/26 (.129–.190) Admin 192.168.1.192/26 (.193–.254)
Example 2 — VLSM for mixed sizes
Requirement: 172.16.0.0/24 for a 100-host LAN, a 50-host LAN, a 25-host LAN and a router link. Use VLSM — size each subnet to its need.
Always allocate the largest first:
100 hosts → /25 (126) 172.16.0.0/25 (.1–.126) 50 hosts → /26 (62) 172.16.0.128/26 (.129–.190) 25 hosts → /27 (30) 172.16.0.192/27 (.193–.222) link → /30 (2) 172.16.0.224/30 (.225–.226)
VLSM fits everything in one /24 with room to spare — a single fixed mask could not.
Example 3 — point-to-point router links
Requirement: address a WAN link between two routers.
A link only ever has 2 endpoints, so use a /30 (2 usable hosts) — or a /31 (RFC 3021) to save addresses:
10.0.0.0/30 → R1 = .1, R2 = .2, bcast .3 10.0.0.4/30 → next link 10.0.0.8/30 → next link
Example 4 — branch office plan
Requirement: a branch gets 10.20.0.0/22 and needs data, voice and guest VLANs plus growth.
A /22 = 1,022 hosts. Carve equal /24s for clean, memorable VLAN numbering:
Data 10.20.0.0/24 Voice 10.20.1.0/24 Guest 10.20.2.0/24 Spare 10.20.3.0/24 (future)
Clean boundaries like this make ACLs and troubleshooting far easier than tightly-packed VLSM when you have address space to spare.
Frequently asked questions
What is the difference between FLSM and VLSM?
Fixed Length Subnet Masking uses one mask for every subnet; VLSM sizes each subnet to its host count using different masks — more efficient use of addresses.
How do I choose a subnet size?
Count the hosts you need, find the smallest block whose usable count (2^host-bits − 2) is greater, and use that prefix. 60 hosts → /26, 25 hosts → /27, a link → /30.
Why allocate the largest subnet first in VLSM?
Allocating largest-to-smallest prevents fragmentation — it keeps each block aligned on a valid boundary so smaller subnets slot in cleanly afterwards.
Should I always use the tightest mask?
Not always. Tight VLSM saves addresses; clean /24 boundaries save troubleshooting effort. With plenty of address space (private ranges), clean boundaries are often the better choice.
Related articles
Want hands-on training?
Learn this on real Cisco lab devices with placement support at Attila Technologies, Ahmedabad.