While both OSPF and BGP offer summarization capabilities, their underlying architectures dictate completely different mechanisms and primary goals. This article contrasts OSPF's topology-hiding inter-area summarization with BGP's route-hiding NLRI aggregation.
BGP NLRI Summarization
In BGP, Network Layer Reachability Information (NLRI) simply refers to the prefixes contained in a BGP UPDATE message. While Path Attributes tell the router how to reach a destination, the NLRI tells it what destinations exist.
Before: 10.1.0.0/24, 10.1.1.0/24, 10.1.2.0/24, 10.1.3.0/24
After: 10.1.0.0/22
The benefits of BGP summarization are immense at scale: a smaller BGP table, fewer UPDATE messages, reduced CPU and memory consumption, and vastly improved overall network scalability.
router bgp 65000 aggregate-address 172.16.0.0 255.255.252.0 summary-only
summary-only keyword suppresses the advertisement of the component routes (the more specific prefixes). Without it, BGP advertises both the aggregate and the specifics.
When NLRI is summarized, the aggregate prefix receives new path attributes. Look out for the AGGREGATOR and ATOMIC_AGGREGATE attributes, which signal that path detail may have been lost during aggregation.
OSPF Inter-Area Summarization
Unlike BGP, OSPF is a link-state protocol. An Area Border Router (ABR) can summarize routes from one area before advertising them into another area.
router ospf 1 area 1 range 10.1.0.0 255.255.252.0
The ABR suppresses the individual Type-3 Summary LSAs and generates a single Type-3 LSA for the aggregate prefix. Crucially, inside the originating area, full topology knowledge remains intact (Type-1 and Type-2 LSAs are unaffected). Across the boundary, only summarized reachability is advertised.
The Core Distinction
- BGP summarization hides ROUTES to reduce prefix count. BGP doesn't know the topology anyway—it only knows destinations and attributes.
- OSPF summarization hides TOPOLOGY and contains SPF calculations. Being a link-state protocol, OSPF inherently knows about routers, links, costs, and transit networks.
By summarizing at the ABR, OSPF prevents other areas from learning the internal structure of the originating area, thereby protecting them from SPF recalculations if a link flaps.
Application Comparison
ISP Example: 200,000 customer prefixes reduced to 100 aggregate prefixes to save global table size.
Enterprise Example: Area 1=NYC, Area 2=Miami. Link failure in Miami means NYC doesn't need details or an SPF run.
BGP as an Application
"The network is the responsibility of the IGP. BGP is an application."
The IGP provides transport and topology awareness, while BGP provides reachability and policy. Consider the following BGP characteristics:
- Runs over TCP (port 179)
- Does not auto-discover neighbors
- Does not build a topology database
- Does not run the SPF algorithm
In short: "OSPF builds the roads. BGP decides which destination signs to advertise."
The Service Provider Model
In an MPLS core environment, OSPF or IS-IS is deployed to provide reachability to loopbacks, next-hops, and transport addresses. BGP rides on top as an overlay protocol.
If the IGP cannot reach a BGP next-hop (for example, if a P router drops the route to a PE's loopback), BGP cannot install the route.
OSPF Point-to-Point on Ethernet
Configuring ip ospf network point-to-point on an Ethernet interface avoids the DR/BDR election process, speeding up convergence.
interface GigabitEthernet0/0 ip address 192.168.1.1 255.255.255.252 ip ospf network point-to-point
Best Practice: Always configure this on BOTH ends of the link. Although the OSPF network type is not carried as a must-match parameter (unlike area ID or authentication), asymmetric configuration creates confusion and can lead to unreachability despite forming a full adjacency.
Note: The IOS parser does NOT remove the command from the configuration—it remains as an explicit configuration. Serial links default to point-to-point automatically.
Summary Table
| Aspect | BGP Summarization | OSPF Summarization |
|---|---|---|
| What's summarized | NLRI (prefixes) | Reachability (topology hidden) |
| Command | aggregate-address |
area X range |
| Goal | Scale | Hierarchy |
| Hides | Routes | Topology |
| Protocol type | Application (TCP 179) | Link-state (IP protocol 89) |
CCIE Interview One-Liners
- "BGP summarization reduces routing information; OSPF summarization creates hierarchical topology and contains SPF calculations."
- "The IGP is responsible for transport and topology; BGP is responsible for reachability and policy."
- "NLRI = destination prefixes; Path Attributes = how to reach them."