VLSM Subnetting: Splitting a Network the Right Way

VLSM — Variable Length Subnet Masking — is the practice of dividing one address block into subnets of different sizes, each sized to what it actually needs. It is what you do every time you take a single allocation from your provider and carve it up for offices, links and server segments. This guide walks through the method and two worked examples you can reproduce in the calculator.

Why "variable length"?

Early subnetting forced every subnet of a network to share one mask. If your largest segment needed 100 hosts you used a /25 everywhere — even for a point-to-point link between two routers that needs just 2 addresses, wasting 124 of them. VLSM removes that constraint: each subnet gets its own prefix. The big segment stays a /25, the router link becomes a /30, and nothing is wasted. The only rule is that the blocks must not overlap.

The method, step by step

  1. List your segments and their host needs, largest first. Always sort biggest-to-smallest — it prevents fragmentation.
  2. Pick the smallest prefix that fits each. For n hosts you need enough host bits that 2^bits − 2 ≥ n. 100 hosts → 7 bits → /25; 50 hosts → 6 bits → /26; 2 hosts → /30.
  3. Allocate from the top of the block downward, giving each segment a contiguous range starting where the previous one ended.
  4. Record network, range and broadcast for each so the assignments are documented and non-overlapping.

Worked example: splitting a /24 by subnet count

Suppose you have 192.168.1.0/24 and want four equal subnets — one each for staff, voice, IoT and guests. Four subnets need 2 extra prefix bits (22 = 4), so the /24 becomes four /26 blocks of 64 addresses each:

SubnetUsable rangeBroadcastUsable
192.168.1.0/26.1 – .62.6362
192.168.1.64/26.65 – .126.12762
192.168.1.128/26.129 – .190.19162
192.168.1.192/26.193 – .254.25562

In the calculator, switch to Split into subnets, enter 192.168.1.0/24, choose "By number of subnets" and type 4 — you get exactly this table.

Split any block in one click — by subnet count or by hosts per subnet — and copy the table.

Open the Subnet Calculator

Worked example: splitting by hosts per subnet

Now suppose you do not care how many subnets you get — each just has to hold 50 hosts. Fifty usable hosts needs 6 host bits (26 − 2 = 62 ≥ 50), which is a /26. Splitting 192.168.1.0/24 "by hosts per subnet = 50" therefore also produces four /26 blocks, each with 62 usable addresses — 12 spare per subnet for growth. Ask for 60 hosts and you still land on /26; ask for 63 and you jump to /25, because 62 is no longer enough. This is the practical reason to size with a little headroom but not too much.

True VLSM: mixed sizes in one block

Real designs mix sizes. From 10.0.0.0/24 you might assign a /25 to the office LAN (126 hosts), a /26 to a lab (62 hosts), a /28 to servers (14 hosts), and several /30s to router links — all inside the same /24, none overlapping. The equal-split tool gets you each tier quickly; you then lay the tiers next to each other from largest to smallest. Sorting largest-first is what keeps the allocations contiguous and gap-free.

VLSM in IPv6

You can split IPv6 the same way, though the motivation differs — see IPv4 vs IPv6 subnetting. Because individual subnets stay /64, IPv6 VLSM is about dividing a /48 or /56 into numbered /64s for different LANs rather than conserving hosts. If the underlying network-versus-host split is still new, start with what a subnet is and CIDR notation.