ITEngineeringTools

CIDR Aggregation Calculator

Summarize IPv4 and IPv6 CIDR lists without including addresses outside the original ranges.

Input

Result

How it works

The algorithm sorts addresses per family, merges intersecting or touching intervals, then covers each interval using the largest aligned CIDR blocks that fit. Gaps remain excluded and the output contains the same addresses as the input.

Formula

Cover each interval using the largest power-of-two aligned block contained in the remaining interval.

Practical examples

Adjacent routes

CIDR blocks, one per line: 10.0.0.0/25
10.0.0.128/25

10.0.0.0/24

Preserve a gap

CIDR blocks, one per line: 192.0.2.0/26
192.0.2.128/26

Result blocks: 2

Collapse IPv6 coverage

CIDR blocks, one per line: 2001:db8::/65
2001:db8:0:0:8000::/65

2001:db8::/64

Technical references