taap.digitalnetwork engineering toolkit

Route summarization calculator

Enter the networks to aggregate, one per line. The tool finds the longest common prefix, returns the summary route and warns if it would also cover addresses you did not list.

summarize

How a summary route is found

Summarization (supernetting, RFC 4632) replaces several specific routes with one shorter prefix. The calculation is a longest-common-prefix search:

  1. Take the lowest network address and the highest broadcast address in the list.
  2. Compare both in binary from the left and count how many leading bits match.
  3. That count is the summary prefix; the network is the lowest address masked to that length.

Worked example

Networks 172.16.0.0/24, 172.16.1.0/24, 172.16.2.0/24 and 172.16.3.0/24. The third octet ranges from 0 to 3:

172.16.000000|00.00000000
172.16.000000|11.11111111
        common bits: 8 + 8 + 6 = 22

The summary is 172.16.0.0/22 (mask 255.255.252.0, wildcard 0.0.3.255). It covers 1,024 addresses, exactly the four /24s, so the aggregate is exact.

Exact vs. overreaching summaries

If the list were 172.16.1.0/24 to 172.16.4.0/24, the common prefix drops to /21 (172.16.0.0/21), which also covers 172.16.0.0, .5, .6 and .7 that you do not own. The tool reports those extra addresses in yellow. An overreaching summary can attract traffic for networks that live elsewhere, or blackhole it. Either split the aggregate into exact blocks (here 172.16.1.0/24, 172.16.2.0/23, 172.16.4.0/24) or make sure the extra space is genuinely unused at that location.

Configuration examples

! OSPF: summarize at the ABR for area 1
router ospf 1
 area 1 range 172.16.0.0 255.255.252.0

! EIGRP: per-interface summary
interface GigabitEthernet0/0
 ip summary-address eigrp 100 172.16.0.0 255.255.252.0

! BGP: advertise the aggregate, suppress the specifics
router bgp 65001
 aggregate-address 172.16.0.0 255.255.252.0 summary-only

# Junos
set routing-options aggregate route 172.16.0.0/22

Design tips

  • Summaries only work well when the address plan was built for them. Allocate each site or area a power-of-two block aligned on its boundary.
  • Cisco installs a discard route to Null0 for a local summary. That prevents loops when a component subnet goes down, but traffic to that subnet is dropped instead of following a less specific default.
  • In BGP, public prefixes longer than /24 are generally filtered. Aggregate before you advertise to transit providers.
  • Summarization hides topology changes: a flapping /24 inside a stable /22 no longer triggers SPF runs or updates outside the area.

Quick mental check

A group of N contiguous networks of the same size can be summarized exactly only when N is a power of two and the first network is aligned to N blocks. Four /24s starting at a third octet divisible by 4 (0, 4, 8…) form a /22; eight starting at a multiple of 8 form a /21. If the first octet value is not a multiple of the group size, the summary will either overreach or need to be split.

Frequently asked questions

Do the networks need to be contiguous?

No, but if they are not, the summary will include gaps. The tool shows how many extra addresses are covered so you can decide whether that is acceptable.

What is the difference between summarization and supernetting?

They describe the same operation. "Supernet" historically meant aggregating classful networks (several Class C /24s); summarization is the general term in routing protocols.

Can I enter single hosts?

Yes. An address without a prefix is treated as /32.

Why does my summary end up as /0 or very short?

The list spans very different ranges (for example 10.x and 192.168.x), so the only common prefix is tiny. Summarize each region separately.

Study and design tool. Validate any configuration in a lab and against vendor documentation before applying it in production.