The Problem VLSM Solves

Before Variable-Length Subnet Masking (VLSM) became standard practice, subnetting a network often meant applying one uniform prefix length across every subnet in that network — dividing a /24 into eight equal /27 subnets, for example, regardless of whether each of those eight subnets actually needed the same number of hosts. A point-to-point router link genuinely needs only 2 usable addresses; a user VLAN might need 100 or more. Forcing both into the same fixed-size subnet either wastes enormous address space on the small link or badly undersizes the large VLAN — VLSM exists specifically to avoid this forced uniformity.

What VLSM Actually Allows

VLSM permits different subnets carved from the same overall address block to use different prefix lengths, each sized to that specific subnet's actual host requirement — a /30 (2 usable hosts) for a point-to-point link, a /28 (14 usable hosts) for a small server room, and a /23 (510 usable hosts) for a large user VLAN can all coexist as differently sized subnets carved from the same larger address block, rather than every subnet being forced to the same size.

The Largest-to-Smallest Allocation Strategy

The standard practical approach to VLSM planning is allocating the largest subnet requirement first, then progressively allocating smaller requirements from the remaining address space — not because smaller subnets can't come first, but because this order makes it straightforward to keep allocations contiguous and non-overlapping without needing to backtrack. Starting from an available block, the largest-needs subnet takes the first (aligned) portion of the block sized to its requirement; the next-largest subnet then takes the next available aligned portion of the remaining space, and so on, until every requirement has been allocated.

Why Address Alignment Matters

Each subnet carved out via VLSM has to start on an address boundary that's a multiple of its own size (in address count) — a /28 subnet (16 total addresses) has to start at an address that's a multiple of 16, not at an arbitrary starting point. This alignment requirement is a direct consequence of how subnet masks work (a subnet's network address must have all its host bits set to zero) and is why VLSM planning isn't simply "chop off however many addresses each subnet needs sequentially" — the allocation has to respect these binary alignment boundaries, which is exactly what the largest-to-smallest strategy naturally accommodates, since larger allocations have larger, less restrictive alignment requirements than smaller ones.

A Worked Planning Example

Given a 10.0.0.0/24 block and three requirements — a user VLAN needing up to 100 hosts, a server subnet needing up to 20 hosts, and two point-to-point links each needing 2 hosts — largest-to-smallest allocation works through it as: the 100-host VLAN needs a /25 (126 usable hosts, the smallest standard size that covers 100), allocated as 10.0.0.0/25 (using half the original /24). The 20-host server subnet needs a /27 (30 usable hosts), allocated as 10.0.0.128/27 from the remaining space. Each point-to-point link needs a /30 (2 usable hosts), allocated as 10.0.0.160/30 and 10.0.0.164/30. This leaves the remainder of the original /24 available for future allocations, with every subnet properly aligned and non-overlapping.

Why This Preserves the Ability to Summarize Routes Later

A VLSM plan that keeps related subnets contiguous within their parent block (rather than scattering them non-contiguously) preserves the ability to summarize those subnets into a single routing table entry at a network boundary further out — for example, advertising the entire original 10.0.0.0/24 as one route to an upstream router, rather than four separate more-specific routes for each carved-out subnet. This route summarization benefit is a direct continuation of the same CIDR/route-aggregation motivation covered in the companion CIDR notation article — VLSM planning done carelessly (allocating subnets in a scattered, non-contiguous order) can defeat this summarization benefit even when the individual subnet sizes themselves are correctly right-sized.