Calxo Learn

Learn the concept. Understand the formula. Calculate the result.

Lesson 4 of 4 · 10 min

VLSM: different-sized subnets that fit

Give a busy team, a small office, and a few devices the space they need. Plan a /24 with VLSM, check alignment, and leave room to grow.

By Calxo AI · Updated

Three groups. Three very different appetites.

Your office is growing. Engineering needs 50 device addresses, Support needs 20, and a printer segment needs 10. Add one gateway address to each group, and the requirements become 51, 21, and 11 usable addresses.

You could give everyone a /26. That would fit all three groups, but each block would consume 64 addresses, even for the ten printers. It is a bit like giving every visitor a large meeting room when some only need a desk.

VLSM means Variable Length Subnet Masking. The idea is simple: use different prefix lengths inside the same parent block. Give each group an appropriately sized subnet, and keep the remaining space available for later.

We’ll plan inside 192.168.10.0/24. If prefixes still feel unfamiliar, start with the CIDR lesson. The equal-size subnetting example is a useful warm-up too.

Step 1: find a size for each group

For each requirement, choose the smallest conventional broadcast subnet that fits. Find a host-bit count h where 2^h − 2 is at least the number of assigned addresses you need. Then your prefix is 32 − h.

  • Engineering needs 51: five host bits give only 30 usable addresses; six give 62. Choose /26.
  • Support needs 21: four bits give 14; five give 30. Choose /27.
  • Printers need 11: three bits give 6; four give 14. Choose /28.
Picture it · Choose the fit
Engineering · /2651 needed / 62 usable
Support · /2721 needed / 30 usable
Printers · /2811 needed / 14 usable
Shared scale: 0–64 usable addresses. The pale section is the requirement; the darker tail is spare host capacity.
Count the gateway in each requirement. These capacities use conventional IPv4 broadcast subnet rules; cloud-provider reservations can differ.

That leaves spare host capacity of 11, 9, and 3 addresses respectively. The smallest fit is a starting point, not a promise that future growth will fit. If Engineering is about to double in size, reserve a larger block or revise the parent plan now.

Step 2: place the biggest block first

Sort the requests from largest to smallest: /26, /27, then /28. Starting with the big blocks makes it easier to avoid carving awkward gaps into space you may need later.

Our /26 contains 64 addresses. Place Engineering at 192.168.10.0/26. It occupies .0 through .63, with hosts .1 through .62 and broadcast .63.

The next free address is .64. Support’s /27 contains 32 addresses, and .64 is a valid multiple-of-32 boundary. Place Support at 192.168.10.64/27, occupying .64 through .95.

Next comes .96. The printer /28 contains 16 addresses, and 96 is divisible by 16. Place it at 192.168.10.96/28, occupying .96 through .111.

Picture it · The whole /24

192.168.10.0/24 · Each tile is 16 addresses. Read left to right, then down.

.0–15Eng.
.16–31Eng.
.32–47Eng.
.48–63Eng.
.64–79Support
.80–95Support
.96–111Printers
.112–127Free
.128–143Free
.144–159Free
.160–175Free
.176–191Free
.192–207Free
.208–223Free
.224–239Free
.240–255Free
64 + 32 + 16 = 112 allocated.
256 − 112 = 144 addresses left unallocated.
Engineering uses .0–.63, Support .64–.95, and Printers .96–.111. The free range .112–.255 is not one single CIDR block.

Step 3: write the usable ranges down

All addresses below begin with 192.168.10.. The proposed gateways are the first usable addresses, simply to keep the plan easy to read. Another usable address could be chosen consistently.

VLSM plan for three groups inside 192.168.10.0/24
GroupNetworkMaskUsable last octetsGatewayBroadcast
Engineering.0/26255.255.255.192.1–.62.1.63
Support.64/27255.255.255.224.65–.94.65.95
Printers.96/28255.255.255.240.97–.110.97.111

Check the joins: .63 is followed by .64; .95 by .96. None of the allocations overlap, and all stay inside the parent’s .0–.255 range. An address such as 192.168.10.100/28 therefore belongs to the printer subnet, whose network starts at .96.

Why you cannot start a /27 just anywhere

A subnet has to start on a boundary that matches its size. In this /24, /27 starts are multiples of 32: .0, .32, .64, .96, and so on. For /28, they are multiples of 16.

Suppose you put the /28 first at .0–.15. You cannot start a /26 at .16 just because it is the next unused address: /26 boundaries are .0, .64, .128, and .192. You could put it at .64, but the gap would need separate planning.

Step 4: account for what is left

The three blocks consume 64 + 32 + 16 = 112 total addresses. The parent contains 256, leaving 144 addresses unallocated, from .112 through .255.

Picture it · Compare the plans
Three equal /26s
192 used
64 free
VLSM: /26 + /27 + /28
112 used
144 free
Both bars cover the same 256-address /24. VLSM preserves 80 more unallocated addresses in this example. “Free” means address space available for later subnet planning, not immediately assignable hosts.

With three equal /26 blocks, we would consume 192 addresses and leave 64 unallocated. VLSM leaves 80 more addresses available for later planning. That is an address-space comparison, not a measured bandwidth or speed improvement.

The remaining 144 addresses are not a single subnet: IPv4 CIDR block sizes are powers of two. You can describe the free space exactly as 192.168.10.112/28 (16 addresses) plus 192.168.10.128/25 (128 addresses). Leave them unallocated until you know the next requirement.

A quick check before touching a router

  1. Capacity: each subnet has enough usable addresses, including its gateway and any planned reservations.
  2. Alignment: every network starts on the correct block boundary.
  3. Containment: no subnet extends outside the parent allocation.
  4. Overlap: no two allocated ranges share an address.
  5. Growth: spare capacity and free blocks match a realistic plan for the organisation.

The explorer below starts with .100/28. Check its network and broadcast, then try .95/27 and .96/28. The two addresses sit on opposite sides of the Support–Printers boundary.

VLSM plans address space. To make the network work, you still need compatible routing, interface or VLAN configuration, DHCP scopes and exclusions, and security policy. A subnet boundary alone does not isolate traffic. Avoid assigning special-use addresses without checking the rules for your environment.

This lesson uses conventional broadcast subnets. /31 point-to-point links and /32 host routes have different host rules, and managed cloud providers may reserve extra addresses. Once the address plan looks right, use the knowledge check below to see whether the boundaries have clicked.

Try it yourself

IPv4 subnet explorer

Change the address or prefix. Watch the network bits and host range update.

11000000101010000000101001100100

Blue = network bits (28). Amber = host bits (4).

Network
192.168.10.96/28
Subnet mask
255.255.255.240
Total addresses
16
Usable host addresses
14
Host range
192.168.10.97 – 192.168.10.110
Broadcast address
192.168.10.111

4 host bits → 2^4 = 16 addresses → 14 usable after the network and broadcast reservations. This is address arithmetic; special-use ranges and your network configuration may impose other restrictions.

Open the full subnet calculator →

Check your understanding

Choose an answer for every question, then check your work. You can retry as often as you like.

1. A subnet needs 12 device addresses and one gateway. What is the smallest conventional size that fits?
2. A /26 uses .0–.63 and a /27 uses .64–.95. Where can the next /28 begin?
3. You allocate /26, /27, and /28 blocks inside a /24. How many addresses remain unallocated?

0 of 3 answered.

Sources and scope

These lessons explain IPv4 address arithmetic using IETF specifications. Host counts use conventional network and broadcast reservations, with /31 and /32 exceptions. Address availability also depends on special-use ranges, provider rules, and your configuration.

How Calxo reviews its content