Networking

VLSM subnet planner

Splits one address block into right-sized subnets, largest first, with no overlaps.

The block to divide, in CIDR form.
One per line as name: hosts.
Unit: % Extra hosts added to each request before sizing.

Result

Block
10.40.0.0/22 (1,024 addresses)
Allocated
930 addresses (90.8%)
Left for growth
94 addresses
Subnet plan, largest first
SubnetHosts askedPlanned hostsNetworkUsable rangeUsable hosts
Users30037510.40.0.0/2310.40.0.1 – 10.40.1.254510
Voice12015010.40.2.0/2410.40.2.1 – 10.40.2.254254
Printers405010.40.3.0/2610.40.3.1 – 10.40.3.6262
Servers253210.40.3.64/2610.40.3.65 – 10.40.3.12662
Management121510.40.3.128/2710.40.3.129 – 10.40.3.15830
Router link2210.40.3.160/3110.40.3.160 – 10.40.3.1612

Formula

Planned hosts = requested × (1 + growth). Prefix = 32 − ceil(log2(planned + 2)). Subnets are placed largest first, each on a boundary that is a multiple of its own size.

Assumptions

  • Requests of 1 or 2 hosts are given a /32 or /31 with no growth allowance.
  • Allocating largest first prevents fragmentation; any space left over stays contiguous at the end of the block.

Questions

Why allocate the largest subnet first?
Large subnets need large aligned boundaries. Placing them first means smaller subnets fill the gaps without wasting space.
How much growth should I plan for?
Many designs add 25 to 50 percent. The cost of renumbering a live subnet is much higher than the cost of unused addresses in a private block.

Related tools