Route Summarization: Longest Common Prefix, Merge Conditions and Discontiguous Ranges

Open Tool Supernet Route Aggregation

What summarization solves

More routes mean slower lookups and messier maintenance. Summarization merges adjacent blocks into one wider route: 192.168.0.0/24 through 192.168.3.0/24 becomes 192.168.0.0/22. The mechanism is the longest common prefix — write the addresses in binary, compare from the left until the first differing bit, and that shared length becomes the new mask.

Steps

  1. Enter one CIDR per line in the list field, such as the four /24 blocks above.
  2. Click Calculate for the merged CIDR, the covered range and total hosts.
  3. The tool flags whether the merge is exact, marking any range outside your list that the aggregate would also cover.
  4. Example loads the standard four-block case, Download saves output, Clear resets.

When blocks cannot merge

Exact merging needs contiguous, aligned blocks. 192.168.1.0/24 and 192.168.3.0/24 with 2.0 missing forced into a /22 would swallow 192.168.2.0/24, which may belong to someone else, creating a routing black hole or misdirected traffic. The correct move is splitting into 1.0/24 and 2.0/23, or not summarizing. The test is whether the aggregate covers exactly your list; any mismatch means spill.

Groups of two and alignment

Merging N contiguous /24s requires N to be a power of two: two blocks become /23, four /22, eight /21. With three, no single exact route exists, so you use a /24 plus a /23. The start address must also align to the new mask, so 192.168.0.0/22 is valid while 192.168.1.0/22 spills into the 4.0 block.

Trade-offs in practice

Summaries cut entries and cost precision: wider coverage risks drawing in traffic that should route elsewhere. Plan internal networks in contiguous blocks by building or business line so summaries stay possible later; scattered allocations make aggregation impossible and force per-block config. Before any change, compute the covered range, then decide, rather than flattening tables into black holes.

⏫︎