Networking
VLSM subnet planner
Splits one address block into right-sized subnets, largest first, with no overlaps.
Result
- Block
- 10.40.0.0/22 (1,024 addresses)
- Allocated
- 930 addresses (90.8%)
- Left for growth
- 94 addresses
| Subnet | Hosts asked | Planned hosts | Network | Usable range | Usable hosts |
|---|---|---|---|---|---|
| Users | 300 | 375 | 10.40.0.0/23 | 10.40.0.1 – 10.40.1.254 | 510 |
| Voice | 120 | 150 | 10.40.2.0/24 | 10.40.2.1 – 10.40.2.254 | 254 |
| Printers | 40 | 50 | 10.40.3.0/26 | 10.40.3.1 – 10.40.3.62 | 62 |
| Servers | 25 | 32 | 10.40.3.64/26 | 10.40.3.65 – 10.40.3.126 | 62 |
| Management | 12 | 15 | 10.40.3.128/27 | 10.40.3.129 – 10.40.3.158 | 30 |
| Router link | 2 | 2 | 10.40.3.160/31 | 10.40.3.160 – 10.40.3.161 | 2 |
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.