WHAT IT DOES
Fit the subnets you need into the block you were given.
Put the block on the first line and the subnets under it, sized by host count or by prefix. The plan places the largest first, works around any allocation that already exists, and reports the free space that is left. Every placed subnet is printed in the same form the tool reads, so a line can be pasted back to pin it there while the rest are replanned around it.
Why use it?
Use it to fit new subnets around existing allocations without accidentally renumbering deployed networks.
How to use this tool
- Put the parent CIDR on the first line and one named requirement on each following line. For example: 10.0.0.0/22, then web 100 and db 20 on separate lines.
- Pin an existing allocation with a line such as legacy = 10.0.1.0/24. Use prefixes rather than host counts for IPv6.
- Plan and review both placed and unplaced requests, plus the remaining free blocks. Total free space alone does not guarantee an aligned subnet fits.
- Save the resulting allocation text with your network documentation; the tool does not reserve addresses on a network.
Details and limitations
- Subnets are placed largest first. Placing a small one before a large one strands the space the large one needed, and no amount of free addresses afterwards makes up for it.
- A subnet must start on a multiple of its own size, so a plan can fail for want of alignment while plenty of addresses remain free. When that happens the reason says so rather than reporting the block as full.
- Sizing by host count reserves the network and broadcast addresses, so 100 hosts is a /25 rather than a /26. Write a prefix outright when you want the /31 point-to-point or /32 single-host case.
- A line written as name = 10.0.1.0/24 is an allocation that already exists. It is kept exactly where it is and everything else is fitted around it, which is how a plan grows without renumbering what is already deployed.
- IPv6 blocks are planned by prefix rather than by host count, because a /64 holds more addresses than any host count means anything against.
- Nothing is stored between visits. The plan you paste is the only state there is, and a placed subnet is printed as "name: block" -- the same form a fixed allocation is written in -- so keeping the plan is a matter of keeping that text wherever your other documentation lives.