The brief
A new office has been given 10.20.0.0/23 (512 addresses, 10.20.0.0 to 10.20.1.255). It needs:
| Network | Devices |
|---|---|
| Staff (VLAN 10) | 200 |
| IP phones (VLAN 20) | 100 |
| Guest Wi-Fi (VLAN 30) | 50 |
| Servers and printers (VLAN 40) | 20 |
| Management (VLAN 99) | 10 |
| WAN link to ISP | 2 |
| WAN link to branch | 2 |
Equal /25s would give only four subnets, and 126 hosts is too small for staff anyway. This is what VLSM is for. Try to plan it on paper first.
The method
- Size each network. Smallest prefix where 2h − 2 covers the devices (and the gateway, and growth).
- Sort largest first. Big blocks need big boundaries; placing them first keeps every block aligned with no gaps.
- Allocate from the next free address. Each block starts where the last one ended. Check it starts on a multiple of its own size.
- Record and check. Write the network, range and broadcast of each, and confirm nothing overlaps.
Show the finished plan
| Network | Needs | Subnet | Usable range | Broadcast | Spare |
|---|---|---|---|---|---|
| Staff (VLAN 10) | 200 | 10.20.0.0/24 | 10.20.0.1 – 10.20.0.254 | 10.20.0.255 | 54 |
| IP phones (VLAN 20) | 100 | 10.20.1.0/25 | 10.20.1.1 – 10.20.1.126 | 10.20.1.127 | 26 |
| Guest Wi-Fi (VLAN 30) | 50 | 10.20.1.128/26 | 10.20.1.129 – 10.20.1.190 | 10.20.1.191 | 12 |
| Servers and printers (VLAN 40) | 20 | 10.20.1.192/27 | 10.20.1.193 – 10.20.1.222 | 10.20.1.223 | 10 |
| Management (VLAN 99) | 10 | 10.20.1.224/28 | 10.20.1.225 – 10.20.1.238 | 10.20.1.239 | 4 |
| WAN link to ISP | 2 | 10.20.1.240/30 | 10.20.1.241 – 10.20.1.242 | 10.20.1.243 | 0 |
| WAN link to branch | 2 | 10.20.1.244/30 | 10.20.1.245 – 10.20.1.246 | 10.20.1.247 | 0 |
| Spare | – | 10.20.1.248/29 | 10.20.1.249 – 10.20.1.254 | 10.20.1.255 | 6 |
Why largest first
A block must start on a multiple of its own size: a /25 (128 addresses) can start at .0 or .128, not at .64. Place the big blocks first and each smaller block lands on a valid boundary automatically, right after the previous one.
Start with the small ones instead and each bigger block has to skip ahead to its next boundary, leaving gaps. Allocate management, then the two WAN links, from 10.20.0.0 and they end at .23; the servers' /27 can't start at .24, so it jumps to .32 and .24 to .31 sit empty. In this brief the gaps happen to fit the spare /29, but in a tighter block that is how plans run out of room. Largest first avoids the question.
Decisions a real plan makes
- The gateway needs an address. Staff need 200 devices plus the gateway: 201, still well inside a /24's 254.
- Growth. Staff have 53 spare addresses. If the office expects 300 staff, a /23 for staff alone would be needed, and so a bigger block from the start.
- Keep the spare together. The leftover /29 sits at the end, in one piece, ready for another link or a small VLAN.
- Point-to-point links. /30s are the classic choice and what CCNA questions usually expect. /31s (RFC 3021) would save two addresses per link where both routers support them.
💡 The VLSM calculator produces a plan like this from a list of requirements. Use it to check your own plan, after you have made one.
Check yourself
The office adds a CCTV VLAN with 25 cameras. Where can it go without changing the existing plan?
Why is the IP phones' subnet 10.20.1.0/25 and not 10.20.0.200/25?
Which pair of subnets overlaps?
Practise
Plan your own home or lab network the same way, then compare it with the VLSM calculator. For more speed on the arithmetic behind it, use the subnetting practice drill.
Learn more: Find the Mistake