Subnetting · 4 min read

VLSM subnetting without the headache: a repeatable method

VLSM (Variable Length Subnet Mask) subnetting intimidates many engineers because it requires tracking multiple subnet sizes, host counts, and address boundaries simultaneously. The good news: VLSM follows a repeatable, methodical process. Once you internalize the workflow, you can solve any VLSM scenario without second-guessing yourself. This guide walks you through that process with a real-world example.

Why VLSM matters

Traditional classful subnetting divides a network into equal-sized subnets. VLSM lets you create subnets of different sizes from a single address block. This is critical in production networks where a point-to-point link needs only 2 usable hosts, but a department LAN needs 50. VLSM eliminates wasted address space and is mandatory knowledge for CCNA, NSE, and real-world design.

The repeatable VLSM method

Follow these five steps in order every time:

Step-by-step worked example

Suppose you have 10.0.0.0/24 and need to allocate:

Step 1: Sort by size (largest first).

Department A: 100 hosts
Department B: 50 hosts
Management VLAN: 10 hosts
Point-to-point: 2 hosts

Step 2: Calculate prefix lengths. Add 1 to the host count for the network address, then round up to the next power of 2.

Dept A: 100 hosts -> need 128 addresses (2^7) -> /25
Dept B: 50 hosts -> need 64 addresses (2^6) -> /26
Mgmt: 10 hosts -> need 16 addresses (2^4) -> /28
P2P: 2 hosts -> need 4 addresses (2^2) -> /30

Step 3: Assign subnets starting with the largest. Each subnet starts where the previous one ends.

Dept A /25: 10.0.0.0/25 (hosts 10.0.0.1 - 10.0.0.126)
Dept B /26: 10.0.0.128/26 (hosts 10.0.0.129 - 10.0.0.190)
Mgmt /28: 10.0.0.192/28 (hosts 10.0.0.193 - 10.0.0.206)
P2P /30: 10.0.0.208/30 (hosts 10.0.0.209 - 10.0.0.210)

Step 4: Verify. The largest subnet (Dept A) uses 128 addresses. Dept B starts at 128 and uses 64 (ending at 192). Management starts at 192 and uses 16 (ending at 208). Point-to-point starts at 208 and uses 4 (ending at 212). All fit within 10.0.0.0/24 (0-255). No overlaps.

Common pitfalls to avoid

The key insight: VLSM is deterministic. Follow the method, and you will get the right answer every time. There is no guessing, no trial-and-error, and no ambiguity.

IP Subnet Calculator
Free tool to verify your VLSM allocations and generate subnet masks instantly
Open →
Practise this on today’s Daily Ops Drill — a free network task every day.
Open the app →
Free tools for this
More from the blog
DSCP marking explained: EF, AF classes and QoSRead →Administrative distance: how a router picks between OSPF, EIGRP and staticRead →