How to Choose a Subnet Size
Picking a CIDR prefix is a balance between four factors: the number of hosts you need today, the headroom for growth, the size of the broadcast domain you can tolerate, and the address space you have to spend. This guide gives concrete rules for each. For sizing VLANs interactively, use the VLAN sizing calculator; for DHCP pools, the DHCP scope calculator.
The four inputs
| Factor | Question |
|---|---|
| Current hosts | How many endpoints will be on this segment now? |
| Growth headroom | How many will be added in 2–3 years? (Rule: 30–50%.) |
| Broadcast tolerance | How much broadcast/multicast traffic is acceptable? |
| Address budget | Are you in RFC 1918 (abundant) or public space (scarce)? |
The sizing formula
- Take current hosts and add growth headroom:
need = current × 1.5. - Add infrastructure overhead (gateway, switches, reserved): ~5–10 addresses.
- Find the smallest prefix where
2^h − 2 ≥ need. - Check the broadcast domain — if it exceeds ~500 hosts, consider splitting.
Prefix selection table
| Prefix | Usable hosts | Best for |
|---|---|---|
| /31 | 2 | Point-to-point router links (RFC 3021) |
| /30 | 2 | P2P links on older gear |
| /29 | 6 | Small server cluster, HA pair + VIPs |
| /28 | 14 | Management VLAN, small DMZ |
| /27 | 30 | Small office, IoT, printer VLAN |
| /26 | 62 | Medium VLAN, department segment |
| /25 | 126 | Large user VLAN |
| /24 | 254 | Standard access VLAN |
| /23 | 510 | Large/wireless VLAN (watch broadcasts) |
| /22 | 1022 | Guest wireless, carefully segmented |
Worked example: a 180-user office
Current: 180 hosts. With 50% growth: 270. Plus infrastructure: ~280. The smallest prefix with 2^h − 2 ≥ 280 is /23 (510 usable). But a /23 broadcast domain for 280 hosts is excessive. Better: split into two /24s (VLAN 10, VLAN 20) of 254 each — cleaner, smaller broadcast domains, and room to grow.
Option A: 192.168.10.0/23 (510 usable, one big broadcast domain)
Option B: 192.168.10.0/24 + 192.168.11.0/24 (254 each, two VLANs) ← recommendedBroadcast domain guidance
| Hosts per VLAN | Broadcast load | Recommendation |
|---|---|---|
| ≤ 250 | Low | Single /24, no concern |
| 250–500 | Moderate | /23 acceptable, monitor broadcasts |
| 500–1000 | High | Split into multiple VLANs |
| > 1000 | Very high | Avoid; segment aggressively |
Special-purpose sizing
Point-to-point links
Use /31 (RFC 3021) on modern gear for zero waste; /30 on older gear. See How /31 Networks Work.
Loopback addresses
Use /32 — one address per router loopback. A /24 of 127.x or a slice of your management block gives 256 loopbacks.
Management VLANs
Typically /28 (14 hosts) or /27 (30) — switch management IPs, OOB, IPMI. Keep it small and restricted.
Server segments
Start at /24 and grow to /23 only if needed. Servers generate more broadcast/multicast traffic than users (mDNS, clustering heartbeats), so keep domains tight.
Address budget considerations
In RFC 1918 space, addresses are effectively free — size generously. With public IP space, every address counts, so size tightly and use VLSM (VLSM Explained) to avoid waste.
Configuration example
! Two-VLAN design for a 180-user office
interface Vlan10
description Users - floor 1
ip address 192.168.10.1 255.255.255.0
!
interface Vlan20
description Users - floor 2
ip address 192.168.11.1 255.255.255.0
!
ip dhcp pool FLOOR1
network 192.168.10.0 255.255.255.0
default-router 192.168.10.1
ip dhcp pool FLOOR2
network 192.168.11.0 255.255.255.0
default-router 192.168.11.1