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:
- Take the lowest network address and the highest broadcast address in the list.
- Compare both in binary from the left and count how many leading bits match.
- 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.