VLSM — Subnets of Different Sizes
Kite Studio now has four groups to separate: 100 design machines, 50 in sales, 20 in admin, and a two-address link to the router at the new office across town. Cutting 192.168.10.0/24 into four equal /26 pieces fails at once: design needs 100 hosts and a /26 holds only 62. Variable Length Subnet Masking (VLSM) lets each group get a block sized to fit.
The rule
Biggest first, smallest block that fits, next free boundary.
VLSM means using different prefix lengths inside one address block. Instead of equal slices, you cut a big piece for the big group and small pieces for small groups, wasting far fewer addresses.
Three rules make it safe:
- Smallest block that fits: pick the longest prefix whose usable hosts still covers the need, remembering the network and broadcast addresses. 50 hosts → /26 (62). 20 hosts → /27 (30). A point-to-point router link → /30 (2).
- Biggest first: allocate in order of size, largest group first. Every block must start on a multiple of its own size, and placing big blocks first keeps those boundaries lined up with no awkward gaps.
- Next free boundary: each new subnet starts at the first address after the previous one that is also a multiple of its block size. No two subnets may overlap.
The shortcut
Make a four-column table — need → prefix → network → broadcast — and fill it row by row, largest need first. Each network is the previous broadcast + 1 (as long as the order is largest first, it will already sit on a valid boundary).
Design — 100 hosts
A /26 gives 62: too small. A /25 gives 126. Network
.0/25, hosts.1–.126, broadcast.127.
The trap is the off-by-two: a group of 62 fits a /26 exactly, but a group of 63 or 64 needs a /25, because two addresses in every block are reserved.
Drills
Answer fast — trust the rule.
Usable hosts in the /27 chosen for the 20-person admin team:
What is the smallest subnet that fits a team of 31 hosts?
Why allocate the largest subnet first?
Which prefix suits a point-to-point link between two routers?
After the plan above ends at .227, a guest Wi-Fi needs 14 hosts (a /28). Where can it start?
Remember
- Biggest first, smallest block that fits, next free boundary.
- Fits means covers the need: 30 → /27, 31 → /26, 2 → /30.
- Every subnet starts on a multiple of its own block size, and none may overlap.
