VLSM Designer
Give it a parent network and what each segment needs to hold. It works out the subnets, packs them without gaps, and tells you when they do not fit.
Local toolYour network plan stays in your browser. Nothing you enter is uploaded, logged, or sent to any server.
Segments
Address space
Allocated Free
How the allocation works
Variable Length Subnet Masking means giving each segment only as much address space as it needs, instead of carving the parent into equal pieces. A link needing two addresses gets a /31; a floor of 500 machines gets a /23.
Largest first. Segments are allocated in descending order of size, which is what keeps the result compact and free of unusable gaps. Allocating smallest-first strands fragments too small to use. The table still shows your segments in the order you typed them — only the placement order differs.
Prefix choice. For IPv4 a segment needing n hosts gets the smallest prefix where 2host bits − 2 ≥ n, because the network and broadcast addresses cannot be assigned. Two exceptions: a segment needing two addresses gets a /31, which RFC 3021 defines as a point-to-point link with no broadcast, and one needing a single address gets a /32.
Growth is applied before sizing, so 100 hosts with 20% headroom is sized for 120 and lands on a /25. This frequently changes the prefix, which is the point of asking.
Anything that does not fit is listed separately with the reason. It is never silently dropped or quietly given a smaller subnet than it asked for.
Allocate the largest subnets first
The order matters, and it is the whole technique. Sort the segments by how many addresses they need, then place the biggest first and work down. Doing it the other way — taking each segment in whatever order it appears on the list — scatters small allocations across the space and leaves gaps that are individually too small to hold anything large.
The reason is alignment. A block of a given size can only start on a boundary that is a multiple of its own size, so a large subnet needs a large aligned gap. Place a /29 in the middle of an empty /24 and no /25 can ever fit in that /24 again, even though far more than half of it is free. Largest first guarantees each block lands on its boundary while the space is still open, and the small ones fill the remainder afterwards, where alignment is easy to satisfy.
Leave room, and leave it in the right place
Every plan is a forecast, and the segments that grow are rarely the ones expected to. The cost of being wrong is not the addresses — it is that expanding a subnet in place requires the space immediately after it to be free, and if something else was allocated there the only options are renumbering the neighbour or moving the segment elsewhere and losing the summarisation.
So the useful headroom is not spare capacity at the end of the range; it is a gap after each allocation that might double. Rounding a segment up one prefix length when it is close to a boundary costs nothing in a private range and buys the ability to grow without touching anything around it. Renumbering a live segment is a genuinely disruptive piece of work, and it is almost always more expensive than the addresses that would have prevented it.
Related tools
Subnet Calculator inspects a single prefix in detail. CIDR Aggregator merges a finished plan down to the fewest prefixes. IP Range to CIDR converts a range you were handed into blocks you can allocate from.