Find the minimal supernet that covers multiple CIDR blocks — for BGP aggregation, route table optimization, and network design
Network addresses aligned to binary. Blue = matching bits (become the prefix). Red = first differing bit (sets the boundary). Grey = host bits zeroed out.
Route summarization combines multiple specific routes into a single less-specific advertisement. A router receiving the summary installs one entry in its table instead of many, reducing memory use and speeding up best-path selection.
The algorithm in three steps:
When is it exact vs lossy? If the input prefixes are a perfect power-of-two aligned block (e.g., exactly four contiguous /24s starting on a /22 boundary), the summary covers precisely those networks with no extra addresses. If they are not aligned, the summary may include additional address space not in the original set — this is the "waste" shown above.
In BGP, summarization reduces the size of the global routing table (currently over 900,000 IPv4 prefixes). An ISP receiving customer blocks like 203.0.113.0/27, 203.0.113.32/27, and 203.0.113.64/26 can advertise a single 203.0.113.0/24 to upstream peers, reducing churn and memory pressure on internet core routers.