Skip to content

Free tools /

CIDR aggregation: combine networks into the fewest blocks

Paste a list of networks, one per line (a single address counts as /32). You get the shortest list of CIDR blocks that covers exactly the same addresses, and also the smallest single block that contains all of them. Useful to keep route tables and firewall lists short.

Exact aggregation

4 entries become 1.

Aggregated CIDR blocks
CIDR blockRangeAddresses
192.168.0.0/22192.168.0.0 – 192.168.3.2551,024

Smallest single block

192.168.0.0/22

It covers exactly the same addresses.

Questions

What does aggregation do?

It merges networks that overlap or sit next to each other into larger blocks, so a list of four /24 networks in a row becomes one /22. The addresses covered stay exactly the same.

Why can’t some networks be merged?

To become one block, networks must be adjacent and the result must start at a multiple of its own size. 10.0.1.0/24 and 10.0.2.0/24 are next to each other, but together they do not form a valid /23.

When is the single block a good idea?

When the extra addresses it includes are harmless, for example to summarise routes inside your own network. Do not use it in a firewall allow list, where every extra address is extra access.