Subnet calculator › Guides

What is VLSM? Designing variable-length subnets

How VLSM splits one network into subnets sized for each need: the rules, and a step-by-step design example.

VLSM means "subnets of different sizes"

VLSM (Variable Length Subnet Mask) splits one network into subnets sized for each need. Compared with cutting every subnet to the same size (FLSM), it saves a lot of address space.

Example: four networks out of 192.168.10.0/24

PurposeDevices needed
Engineering100
Sales50
Meeting room Wi-Fi20
Router link2

With equal sizes, everything has to fit the biggest need (100 devices), so every subnet is a /25 (128 addresses). A /24 holds only two /25s — not enough for four networks — and the 2-device router link wastes 128 addresses.

VLSM in four steps

  1. Sort largest first: Engineering 100 → Sales 50 → Wi-Fi 20 → link 2
  2. Find each block size: the smallest power of two that holds devices + 2 (network and broadcast)
    • 100 + 2 = 102 → 128 (/25)
    • 50 + 2 = 52 → 64 (/26)
    • 20 + 2 = 22 → 32 (/27)
    • 2 + 2 = 4 → 4 (/30)
  3. Allocate in order: each block starts right after the previous one ends
  4. Record what is left for future use
PurposeSubnetUsable rangeUsable
Engineering192.168.10.0/25.1 - .126126
Sales192.168.10.128/26.129 - .19062
Meeting room Wi-Fi192.168.10.192/27.193 - .22230
Router link192.168.10.224/30.225 - .2262

Free space left: 192.168.10.228/30, 192.168.10.232/29, 192.168.10.240/28.

Type "name devices" lines into the VLSM calculator and it does all of this for you.

Why allocate the largest first?

A subnet can only start at a multiple of its own size. A /26 (64 addresses) can start only at .0, .64, .128 or .192. Put a small /30 at .0 first and the /26 cannot start at .4 — it gets pushed to .64, leaving .4-.63 as an awkward gap. Allocating the largest first keeps every block aligned, with no gaps.

Practical tips

More guides