What route summarization is for
Multiple areas and the ABR showed that splitting a network into areas still leaves an ABR originating one type 3 LSA per prefix. A hundred /32 loopbacks inside an area means a hundred type 3 LSAs flooding the next area — and a hundred routes in the routing table of every router that receives them. Summarization folds them into one.
The benefit is often described as a smaller LSDB, but what actually bites is the number of routes in the routing table (RIB) and the forwarding table (FIB). LSAs stay within OSPF process memory; route counts translate directly into forwarding hardware capacity and into how much of the table has to be rewritten. This article measures that.
OSPF can summarize in only two places: the ABR and the ASBR. Not inside an area, and not on a router in the middle of the backbone. Everything inside an area depends on every router holding the same LSDB, so dropping information halfway would make the calculations disagree.
| Kind | Where it runs | IOS XR command | What it covers |
|---|---|---|---|
| Inter-area summarization | ABR | range <prefix> under area <ID> | Intra-area routes to type 3 |
| External route summarization | ASBR | summary-prefix <prefix> under router ospf | Redistributed routes to type 5 / type 7 |
This article uses a seven-router, three-area lab to fold five loopbacks of area 2 into one route at the ABRs and four redistributed external routes into one at the ASBR, and checks on real devices how the metric of a summary LSA is chosen, what happens when the component routes go away, and what the side effects are.
Lab topology
The three-area lab of the stub area article is reused with the material to summarize added.
| Item | Content |
|---|---|
| Intra-area routes to summarize | 10.2.0.1/32 and 10.2.0.2/32 on R11, 10.2.0.3/32 and 10.2.0.4/32 on R12, 10.2.0.5/32 on R13 (all in area 2, passive enable) |
| Summary at the ABRs | 10.2.0.0/24 on R3 and R4 |
| External routes to summarize | 192.168.16.0/24, 17.0/24, 18.0/24 and 19.0/24, redistributed by R1 as Null0 statics |
| Summary at the ASBR | 192.168.16.0/22 on R1 |
| Left unsummarized | 192.168.1.0/24, so the two can be compared |
| A real host inside the range | 192.168.16.1/32 on R1’s Loopback4, used as an address that exists inside the summary |
| Observation points | R2 (outside the area, receiving the summary) and R13 (inside the area, unaffected) |
R11 is configured like this; the loopbacks to be summarized are in OSPF area 2 as well.
router ospf 1
router-id 11.11.11.11
area 2
interface Loopback0
passive enable
!
interface Loopback2
passive enable
!
interface Loopback3
passive enable
!
interface GigabitEthernet0/0/0/0
network point-to-point
!
interface GigabitEthernet0/0/0/1
network point-to-point
!
!
!Before summarization (STEP 0)
From R2 in area 0, the five /32 routes of area 2 are separate inter-area routes and R1’s four external routes are separate too. Note that the five costs vary: 3, 3, 5, 5 and 4 — that is the raw material for the summary metric.
RP/0/RP0/CPU0:R2#show route ospf
Mon Sep 7 22:00:06.098 UTC
O 1.1.1.1/32 [110/2] via 10.0.12.1, 00:03:33, GigabitEthernet0/0/0/0
O 3.3.3.3/32 [110/2] via 10.0.23.3, 00:04:20, GigabitEthernet0/0/0/1
O 4.4.4.4/32 [110/2] via 10.0.24.4, 00:04:11, GigabitEthernet0/0/0/2
O IA 10.1.11.0/24 [110/3] via 10.0.23.3, 00:04:05, GigabitEthernet0/0/0/1
O IA 10.1.12.0/24 [110/4] via 10.0.23.3, 00:03:39, GigabitEthernet0/0/0/1
O IA 10.2.0.1/32 [110/3] via 10.0.23.3, 00:04:05, GigabitEthernet0/0/0/1
O IA 10.2.0.2/32 [110/3] via 10.0.23.3, 00:04:05, GigabitEthernet0/0/0/1
O IA 10.2.0.3/32 [110/5] via 10.0.23.3, 00:03:38, GigabitEthernet0/0/0/1
O IA 10.2.0.4/32 [110/5] via 10.0.23.3, 00:03:38, GigabitEthernet0/0/0/1
O IA 10.2.0.5/32 [110/4] via 10.0.23.3, 00:03:39, GigabitEthernet0/0/0/1
O IA 11.11.11.11/32 [110/3] via 10.0.23.3, 00:04:05, GigabitEthernet0/0/0/1
O IA 12.12.12.12/32 [110/5] via 10.0.23.3, 00:03:38, GigabitEthernet0/0/0/1
O IA 13.13.13.13/32 [110/4] via 10.0.23.3, 00:03:39, GigabitEthernet0/0/0/1
O IA 172.16.3.0/24 [110/2] via 10.0.23.3, 00:04:20, GigabitEthernet0/0/0/1
O IA 172.16.4.0/24 [110/11] via 10.0.24.4, 00:04:11, GigabitEthernet0/0/0/2
O E2 192.168.1.0/24 [110/20] via 10.0.12.1, 00:03:33, GigabitEthernet0/0/0/0
O E2 192.168.16.0/24 [110/20] via 10.0.12.1, 00:03:33, GigabitEthernet0/0/0/0
O E2 192.168.17.0/24 [110/20] via 10.0.12.1, 00:03:33, GigabitEthernet0/0/0/0
O E2 192.168.18.0/24 [110/20] via 10.0.12.1, 00:03:33, GigabitEthernet0/0/0/0
O E2 192.168.19.0/24 [110/20] via 10.0.12.1, 00:03:33, GigabitEthernet0/0/0/0Reachability first: 10.2.0.1 (a loopback in area 2) and 192.168.16.1 (R1’s Loopback4) answer, while 192.168.19.1 (inside 192.168.19.0/24 but with nothing behind it) does not.
RP/0/RP0/CPU0:R2#ping 10.2.0.1 source 2.2.2.2
Mon Sep 7 21:59:23.400 UTC
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.2.0.1 timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 7/7/9 ms
RP/0/RP0/CPU0:R2#ping 192.168.16.1 source 2.2.2.2
Mon Sep 7 21:59:24.313 UTC
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.16.1 timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/4/7 ms
RP/0/RP0/CPU0:R2#ping 192.168.19.1 source 2.2.2.2
Mon Sep 7 21:59:25.296 UTC
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.19.1 timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)Summarizing at the ABR (STEP 1)
Both ABRs attached to area 2 (R3 and R4) get the 10.2.0.0/24 range.
(on both R3 and R4)
router ospf 1
area 2
range 10.2.0.0/24From R2 the five /32 routes are gone, replaced by a single 10.2.0.0/24. In the LSDB the summary LSA R3 originated has metric 4 and R4’s has metric 13.
RP/0/RP0/CPU0:R2#show route ospf
Mon Sep 7 22:03:40.100 UTC
O 1.1.1.1/32 [110/2] via 10.0.12.1, 00:07:07, GigabitEthernet0/0/0/0
O 3.3.3.3/32 [110/2] via 10.0.23.3, 00:07:54, GigabitEthernet0/0/0/1
O 4.4.4.4/32 [110/2] via 10.0.24.4, 00:07:45, GigabitEthernet0/0/0/2
O IA 10.1.11.0/24 [110/3] via 10.0.23.3, 00:07:39, GigabitEthernet0/0/0/1
O IA 10.1.12.0/24 [110/4] via 10.0.23.3, 00:07:13, GigabitEthernet0/0/0/1
O IA 10.2.0.0/24 [110/5] via 10.0.23.3, 00:00:31, GigabitEthernet0/0/0/1
O IA 11.11.11.11/32 [110/3] via 10.0.23.3, 00:07:39, GigabitEthernet0/0/0/1
O IA 12.12.12.12/32 [110/5] via 10.0.23.3, 00:07:12, GigabitEthernet0/0/0/1
O IA 13.13.13.13/32 [110/4] via 10.0.23.3, 00:07:13, GigabitEthernet0/0/0/1
O IA 172.16.3.0/24 [110/2] via 10.0.23.3, 00:07:54, GigabitEthernet0/0/0/1
O IA 172.16.4.0/24 [110/11] via 10.0.24.4, 00:07:45, GigabitEthernet0/0/0/2
O E2 192.168.1.0/24 [110/20] via 10.0.12.1, 00:07:07, GigabitEthernet0/0/0/0
O E2 192.168.16.0/24 [110/20] via 10.0.12.1, 00:07:07, GigabitEthernet0/0/0/0
O E2 192.168.17.0/24 [110/20] via 10.0.12.1, 00:07:07, GigabitEthernet0/0/0/0
O E2 192.168.18.0/24 [110/20] via 10.0.12.1, 00:07:07, GigabitEthernet0/0/0/0
O E2 192.168.19.0/24 [110/20] via 10.0.12.1, 00:07:07, GigabitEthernet0/0/0/0
RP/0/RP0/CPU0:R2#show ospf database summary 10.2.0.0
Mon Sep 7 22:03:40.301 UTC
OSPF Router with ID (2.2.2.2) (Process ID 1)
Summary Net Link States (Area 0)
Routing Bit Set on this LSA
LS age: 33
Options: (No TOS-capability, DC)
LS Type: Summary Links (Network)
Link State ID: 10.2.0.0 (Summary Network Number)
Advertising Router: 3.3.3.3
LS Seq Number: 80000001
Checksum: 0xbc64
Length: 28
Network Mask: /24
TOS: 0 Metric: 4
LS age: 18How that metric is chosen changed between the two versions of the specification. R3’s costs to the components are 2 for 10.2.0.1, 2 for 10.2.0.2, 3 for 10.2.0.5 and 4 for both 10.2.0.3 and 10.2.0.4, so the summary metric of 4 is the largest of them.
| Specification | Rule |
|---|---|
| RFC 2328 (current) | Section 12.4.3: “cost equal to the largest cost of any of the component networks” |
| RFC 1583 (superseded) | Section 12.4.3: “cost equal to the smallest cost of any of the component networks” |
| Measured on XRd 26.1.1 | 4, the largest — it follows RFC 2328 |
A summarizing ABR also installs a discard route to Null0. It drops packets for addresses that fall inside the range but do not actually exist, which is what keeps them from looping. Its administrative distance is 254, and this behaviour is an implementation choice, not something the RFC defines.
RP/0/RP0/CPU0:R3#show route | include Null0
Mon Sep 7 22:03:43.840 UTC
O IA 10.2.0.0/24 [254/0] via 0.0.0.0, 00:00:35, Null0The LS Updates that crossed the backbone (between R2 and R3) show the whole operation. No.4 of the attached capture is the summary LSA (metric 4) appearing, and No.5 is the LS Update that withdraws all five individual LSAs at once — done with LS Age 3600 (MaxAge) together with Metric: 16777215 (LSInfinity).
Open Shortest Path First
OSPF Header
Version: 2
Message Type: LS Update (4)
Packet Length: 56
Source OSPF Router: 3.3.3.3
Area ID: 0.0.0.0 (Backbone)
Checksum: 0x8a29 [correct]
Instance ID: Base IPv4 Unicast Instance (0)
Auth Type: Null (0)
Auth Data (none): 0000000000000000
LS Update Packet
Number of LSAs: 1
LSA-type 3 (Summary-LSA (IP network)), len 28
.000 0000 0000 0001 = LS Age (seconds): 1
0... .... .... .... = Do Not Age Flag: 0
Options: 0x22, (DC) Demand Circuits, (E) External Routing
0... .... = DN: Not set
.0.. .... = (O) Opaque: Not set
..1. .... = (DC) Demand Circuits: Supported
...0 .... = (L) LLS Data block: Not Present
.... 0... = (N) NSSA: Not supported
.... .0.. = (MC) Multicast: Not capable
.... ..1. = (E) External Routing: Capable
.... ...0 = (MT) Multi-Topology Routing: No
LS Type: Summary-LSA (IP network) (3)
Link State ID: 10.2.0.0
Advertising Router: 3.3.3.3
Sequence Number: 0x80000001
Checksum: 0xbc64
Length: 28
Netmask: 255.255.255.0
TOS: 0
Metric: 4The withdrawal carries five LSAs in one packet, as the tshark listing shows.
4 13.044742 10.0.23.3 → 224.0.0.5 OSPF 90 LS Update
5 13.149976 10.0.23.3 → 224.0.0.5 OSPF 202 LS Update
10 27.555663 10.0.23.2 → 224.0.0.5 OSPF 90 LS Update
11 27.668405 10.0.23.2 → 224.0.0.5 OSPF 202 LS UpdateWhen one component goes away (STEP 2)
This is where the effect of summarization is clearest. R11’s Loopback2 (10.2.0.1/32) is shut down.
(R11)
interface Loopback2
shutdownFrom R2, 10.2.0.0/24 does not change at all, neither its cost nor the LSA. Outside the area nothing appears to have happened. A ping to 10.2.0.1 no longer works, though, while 10.2.0.2 still does: stability comes at the price of hiding reachability changes too.
RP/0/RP0/CPU0:R2#show route 10.2.0.0/24
Mon Sep 7 22:07:35.738 UTC
Routing entry for 10.2.0.0/24
Known via "ospf 1", distance 110, metric 5, type inter area
Installed Sep 7 22:03:08.925 for 00:04:26
Routing Descriptor Blocks
10.0.23.3, from 3.3.3.3, via GigabitEthernet0/0/0/1
Route metric is 5
No advertising protos.
RP/0/RP0/CPU0:R2#show ospf database summary 10.2.0.0
Mon Sep 7 22:07:35.900 UTC
OSPF Router with ID (2.2.2.2) (Process ID 1)
Summary Net Link States (Area 0)
Routing Bit Set on this LSA
LS age: 268
Options: (No TOS-capability, DC)
LS Type: Summary Links (Network)
Link State ID: 10.2.0.0 (Summary Network Number)
Advertising Router: 3.3.3.3 LS age: 267
Options: (No TOS-capability, DC)
LS Type: Summary Links (Network)
Link State ID: 10.2.0.0 (Summary Network Number)
Advertising Router: 2.2.2.2
LS Seq Number: 80000001
Checksum: 0xe43f
Length: 28
Network Mask: /24
TOS: 0 Metric: 5
RP/0/RP0/CPU0:R2#ping 10.2.0.1 source 2.2.2.2
Mon Sep 7 22:07:36.641 UTC
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.2.0.1 timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
RP/0/RP0/CPU0:R2#ping 10.2.0.2 source 2.2.2.2
Mon Sep 7 22:07:47.613 UTC
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.2.0.2 timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/8/10 msInside the area the reaction is immediate. On R13, in the same area 2, the individual route disappears at once. Summarization only ever applies to what leaves the area.
RP/0/RP0/CPU0:R13#show route 10.2.0.1/32
Mon Sep 7 22:07:51.571 UTC
% Network not in tableWhen every component goes away (STEP 3)
Shutting down the remaining four makes the summary LSA itself disappear.
(R11's Loopback3, R12's Loopback2 and Loopback3, R13's Loopback2)
interface LoopbackN
shutdownRP/0/RP0/CPU0:R2#show route 10.2.0.0/24
Mon Sep 7 22:12:03.931 UTC
% Network not in table
RP/0/RP0/CPU0:R2#show ospf database summary 10.2.0.0
Mon Sep 7 22:12:04.217 UTC
OSPF Router with ID (2.2.2.2) (Process ID 1)The ABR’s discard route goes with it. Section 12.4.3 of RFC 2328 says that when an advertised destination becomes unreachable the router must flush the LSA by setting its age to MaxAge, so the summary LSA lives as long as at least one component does, and is withdrawn only when the last one is gone.
RP/0/RP0/CPU0:R3#show route | include Null0
Mon Sep 7 22:12:08.043 UTCHiding a range instead of summarizing it (STEP 4)
A range can be given not-advertise: no summary LSA and no individual LSAs either, which hides the range completely from outside the area. The components are restored first.
(after bringing the loopbacks of R11, R12 and R13 back with no shutdown)
(on both R3 and R4)
router ospf 1
area 2
range 10.2.0.0/24 not-advertiseRP/0/RP0/CPU0:R2#show route 10.2.0.0/24
Mon Sep 7 22:16:44.339 UTC
% Network not in table
RP/0/RP0/CPU0:R2#show route 10.2.0.1/32
Mon Sep 7 22:16:44.515 UTC
% Network not in table
RP/0/RP0/CPU0:R2#ping 10.2.0.1 source 2.2.2.2
Mon Sep 7 22:16:44.696 UTC
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.2.0.1 timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)Inside the area everything is still reachable. Section 12.4.3 of RFC 2328 states that with DoNotAdvertise the type 3 LSA is suppressed and the component networks stay hidden from other areas.
RP/0/RP0/CPU0:R13#show route 10.2.0.1/32
Mon Sep 7 22:16:58.253 UTC
Routing entry for 10.2.0.1/32
Known via "ospf 1", distance 110, metric 2, type intra area
Installed Sep 7 22:15:33.422 for 00:01:24
Routing Descriptor Blocks
10.1.11.11, from 11.11.11.11, via GigabitEthernet0/0/0/0
Route metric is 2
No advertising protos. Summarizing external routes at the ASBR (STEP 5)
After putting the range back to normal, it is the ASBR’s turn: R1 folds the four /24 routes it redistributes into 192.168.16.0/22.
(R3 and R4 put the range back to normal)
router ospf 1
area 2
range 10.2.0.0/24
(R1)
router ospf 1
summary-prefix 192.168.16.0/22R2’s four external routes become one. 192.168.1.0/24, which is not summarized, stays as it is.
RP/0/RP0/CPU0:R2#show route ospf
Mon Sep 7 22:20:53.996 UTC
O 1.1.1.1/32 [110/2] via 10.0.12.1, 00:24:21, GigabitEthernet0/0/0/0
O 3.3.3.3/32 [110/2] via 10.0.23.3, 00:25:08, GigabitEthernet0/0/0/1
O 4.4.4.4/32 [110/2] via 10.0.24.4, 00:24:59, GigabitEthernet0/0/0/2
O IA 10.1.11.0/24 [110/3] via 10.0.23.3, 00:24:53, GigabitEthernet0/0/0/1
O IA 10.1.12.0/24 [110/4] via 10.0.23.3, 00:24:27, GigabitEthernet0/0/0/1
O IA 10.2.0.0/24 [110/5] via 10.0.23.3, 00:00:42, GigabitEthernet0/0/0/1
O IA 11.11.11.11/32 [110/3] via 10.0.23.3, 00:24:53, GigabitEthernet0/0/0/1
O IA 12.12.12.12/32 [110/5] via 10.0.23.3, 00:24:26, GigabitEthernet0/0/0/1
O IA 13.13.13.13/32 [110/4] via 10.0.23.3, 00:24:27, GigabitEthernet0/0/0/1
O IA 172.16.3.0/24 [110/2] via 10.0.23.3, 00:25:08, GigabitEthernet0/0/0/1
O IA 172.16.4.0/24 [110/11] via 10.0.24.4, 00:24:59, GigabitEthernet0/0/0/2
O E2 192.168.1.0/24 [110/20] via 10.0.12.1, 00:24:21, GigabitEthernet0/0/0/0
O E2 192.168.16.0/22 [110/20] via 10.0.12.1, 00:00:13, GigabitEthernet0/0/0/0
RP/0/RP0/CPU0:R2#show ospf database external 192.168.16.0
Mon Sep 7 22:20:54.198 UTCThe ASBR gets a discard route as well. The S entries are the statics being redistributed; O E2 ... [254/0] ... Null0 is the discard route created by the summary.
RP/0/RP0/CPU0:R1#show route | include Null0
Mon Sep 7 22:20:58.112 UTC
S 192.168.1.0/24 is directly connected, 00:24:46, Null0
O E2 192.168.16.0/22 [254/0] via 0.0.0.0, 00:00:17, Null0
S 192.168.16.0/24 is directly connected, 00:24:46, Null0
S 192.168.17.0/24 is directly connected, 00:24:46, Null0
S 192.168.18.0/24 is directly connected, 00:24:46, Null0
S 192.168.19.0/24 is directly connected, 00:24:46, Null0The side effect: a black hole
Summarizing also draws packets for addresses that fall inside the range but do not exist all the way to the summarizing router, where Null0 drops them. Two pings from R13 make the difference obvious.
192.168.16.1— exists as R1’s Loopback4, so it answers192.168.19.1— inside192.168.19.0/24with nothing behind it, so it does not (dropped by R1’s Null0)
RP/0/RP0/CPU0:R13#ping 192.168.16.1 source 13.13.13.13
Mon Sep 7 22:25:40.945 UTC
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.16.1 timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 13/14/19 ms
RP/0/RP0/CPU0:R13#ping 192.168.19.1 source 13.13.13.13
Mon Sep 7 22:25:41.993 UTC
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.19.1 timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
RP/0/RP0/CPU0:R13#traceroute 192.168.19.1 source 13.13.13.13 maxttl 5
Mon Sep 7 22:25:53.044 UTC
Type escape sequence to abort.
Tracing the route to 192.168.19.1
1 10.1.11.11 5 msec 62 msec 6 msec
2 172.16.3.3 8 msec 7 msec 7 msec
3 10.0.23.2 10 msec 10 msec 10 msec
4 * * *
5 * * * The traceroute reaches 10.0.23.2 (R2) and then goes quiet, because the packets get to R1 and die on Null0 (it is cut off with maxttl 5). The same address behaved the same way before summarization, of course; what changes is that after summarizing, every unused address in the whole range behaves like this.
Restoring (STEP 6)
Removing the range on the ABRs and the summary-prefix on the ASBR brings the individual routes back.
(R3 and R4)
router ospf 1
area 2
no range 10.2.0.0/24
(R1)
router ospf 1
no summary-prefix 192.168.16.0/22RP/0/RP0/CPU0:R2#show route ospf
Mon Sep 7 22:27:30.191 UTC
O 1.1.1.1/32 [110/2] via 10.0.12.1, 00:30:57, GigabitEthernet0/0/0/0
O 3.3.3.3/32 [110/2] via 10.0.23.3, 00:31:44, GigabitEthernet0/0/0/1
O 4.4.4.4/32 [110/2] via 10.0.24.4, 00:31:35, GigabitEthernet0/0/0/2
O IA 10.1.11.0/24 [110/3] via 10.0.23.3, 00:31:29, GigabitEthernet0/0/0/1
O IA 10.1.12.0/24 [110/4] via 10.0.23.3, 00:31:03, GigabitEthernet0/0/0/1
O IA 10.2.0.1/32 [110/3] via 10.0.23.3, 00:00:52, GigabitEthernet0/0/0/1
O IA 10.2.0.2/32 [110/3] via 10.0.23.3, 00:00:52, GigabitEthernet0/0/0/1
O IA 10.2.0.3/32 [110/5] via 10.0.23.3, 00:00:52, GigabitEthernet0/0/0/1
O IA 10.2.0.4/32 [110/5] via 10.0.23.3, 00:00:52, GigabitEthernet0/0/0/1
O IA 10.2.0.5/32 [110/4] via 10.0.23.3, 00:00:52, GigabitEthernet0/0/0/1
O IA 11.11.11.11/32 [110/3] via 10.0.23.3, 00:31:29, GigabitEthernet0/0/0/1
O IA 12.12.12.12/32 [110/5] via 10.0.23.3, 00:31:02, GigabitEthernet0/0/0/1
O IA 13.13.13.13/32 [110/4] via 10.0.23.3, 00:31:03, GigabitEthernet0/0/0/1
O IA 172.16.3.0/24 [110/2] via 10.0.23.3, 00:31:44, GigabitEthernet0/0/0/1
O IA 172.16.4.0/24 [110/11] via 10.0.24.4, 00:31:35, GigabitEthernet0/0/0/2
O E2 192.168.1.0/24 [110/20] via 10.0.12.1, 00:30:57, GigabitEthernet0/0/0/0
O E2 192.168.16.0/24 [110/20] via 10.0.12.1, 00:00:21, GigabitEthernet0/0/0/0
O E2 192.168.17.0/24 [110/20] via 10.0.12.1, 00:00:21, GigabitEthernet0/0/0/0
O E2 192.168.18.0/24 [110/20] via 10.0.12.1, 00:00:21, GigabitEthernet0/0/0/0How much the routing table shrinks
Summarization is usually described in terms of the LSDB holding fewer LSAs, but what matters in operation is that every router ends up with fewer entries in its routing table (RIB) and forwarding table (FIB). The LSA count is about OSPF process memory and the SPF run; the route count is about the capacity of the forwarding hardware (FIB or TCAM) and about how much has to be rewritten when something changes.
Counting the total of show route on R2 (area 0):
| State | Total in show route | Of which OSPF | /32 of area 2 | External /24 |
|---|---|---|---|---|
| No summarization (STEP 0) | 27 | 20 | 5 | 5 |
| Summarized at the ABR (STEP 1) | 23 | 16 | 1 (summary) | 5 |
not-advertise (STEP 4) | 22 | 15 | 0 | 5 |
| ABR and ASBR (STEP 5) | 20 | 13 | 1 (summary) | 2 |
| Restored (STEP 6) | 27 | 20 | 5 | 5 |
Folding five routes and four routes into one each takes the routing table from 27 entries down to 20, a 26% reduction. Real networks often carry hundreds or thousands of prefixes per area, and every one of them consumes FIB space on every router. Summarization cuts exactly that.
And it is not only the summarizing router that benefits: every router that receives the summarized LSA saves the same entries.
| Router | Position | No summarization (STEP 0) | ABR and ASBR (STEP 5) |
|---|---|---|---|
| R2 | Area 0, next to the ABRs | 27 | 20 |
| R1 | Area 1, the ASBR itself | 27 | 24 |
| R13 | Inside area 2 | 26 | 23 |
R13 sits inside area 2, so it still holds the 10.2.0.x/32 routes individually, but summarizing the external routes still saves it three entries. Summarization shrinks the tables of every router downstream of it.
As a secondary benefit, a prefix flapping inside the area no longer changes the LSDB outside it (STEP 2), so SPF stops running outside the area.
Design notes
- It depends on an addressing plan that can be summarized. Without a contiguous block per area, nothing folds into one. Since OSPF can only summarize at an ABR or an ASBR, retrofitting it later is painful
- The metric is the largest of the components (RFC 2328). The cost of the most distant component becomes the representative value, so a summary can make the area look farther away than it is
- Unused addresses inside the range become a black hole, dropped by the summarizing router’s Null0. That is deliberate loop prevention, but during troubleshooting it looks like “the route is there yet nothing gets through”, so keep the range in mind
not-advertiseworks as a filter when a range should not leave the area at all — at the cost of reachability to it- Stub areas and NSSAs solve a different problem. Stub areas and NSSAs keep LSAs out; summarization folds them together. The two combine well
The IOS XR commands
| Command | Where it goes | Meaning |
|---|---|---|
range <prefix> | Under area <ID> on an ABR | Folds that area’s intra-area routes into a single type 3 |
range <prefix> not-advertise | Under area <ID> on an ABR | Hides them instead of folding them (no type 3 at all) |
summary-prefix <prefix> | Under router ospf on an ASBR | Folds redistributed external routes into a single type 5 |
(the ABR)
router ospf 1
area 2
range 10.2.0.0/24
!
!
(the ASBR)
router ospf 1
summary-prefix 192.168.16.0/22
!A range goes on every ABR attached to that area. Miss one and individual type 3 LSAs keep flowing through it, defeating the purpose. On IOS XE the equivalents are area <ID> range <address> <mask> and summary-address <address> <mask>. Configuration examples are covered in a separate article.
Verification config and show output
For each STEP the following three files were collected from all seven routers, split per router. The verification config is the ..._run.txt file (the final state is the one from STEP 6).
| File | Content |
|---|---|
..._show.txt | show version / show interface description / show route / show route ospf / show ospf / show ospf interface / show ospf interface brief / show ospf neighbor / show ospf neighbor detail / show ospf database / show ospf database router / show ospf database network / show ospf statistics interface / show ospf database summary / show ospf database external / show ospf border-routers / show ospf routes / show route 10.2.0.0/24 / show route 10.2.0.1/32 / show route 192.168.16.0/22 / show route 192.168.16.0/24 / show route 192.168.1.0/24 / show ospf trace events |
..._log.txt | show logging narrowed to that STEP. A marker was written with logmsg at the start of each STEP and its timestamp passed to show logging start |
..._run.txt | show running-config at that point in time (that is, the verification config for that STEP) |
The final state has all summarization removed.
STEP 0: no summarization — the five /32 routes of area 2 and the four external routes all flow individually
| Router | show output | syslog | running-config |
|---|---|---|---|
| R1 | show | log | run |
| R2 | show | log | run |
| R3 | show | log | run |
| R4 | show | log | run |
| R11 | show | log | run |
| R12 | show | log | run |
| R13 | show | log | run |
This STEP also has a ping from R2 and the Null0 check on R3.
STEP 1: area 2 range 10.2.0.0/24 on R3 and R4 — five routes become one, with the summary metric at the largest component cost (4)
| Router | show output | syslog | running-config |
|---|---|---|---|
| R1 | show | log | run |
| R2 | show | log | run |
| R3 | show | log | run |
| R4 | show | log | run |
| R11 | show | log | run |
| R12 | show | log | run |
| R13 | show | log | run |
This STEP also has show route ospf and show ospf database summary on R2, the Null0 check on R3, a ping on R2.
STEP 2: R11’s Loopback2 is shut down — the summary LSA does not change, but that destination stops answering
| Router | show output | syslog | running-config |
|---|---|---|---|
| R1 | show | log | run |
| R2 | show | log | run |
| R3 | show | log | run |
| R4 | show | log | run |
| R11 | show | log | run |
| R12 | show | log | run |
| R13 | show | log | run |
This STEP also has show route, database and ping on R2, the view from inside the area on R13.
STEP 3: all five components are shut down — the summary LSA and the Null0 discard route disappear
| Router | show output | syslog | running-config |
|---|---|---|---|
| R1 | show | log | run |
| R2 | show | log | run |
| R3 | show | log | run |
| R4 | show | log | run |
| R11 | show | log | run |
| R12 | show | log | run |
| R13 | show | log | run |
This STEP also has show route and database on R2, the Null0 check on R3.
STEP 4: the components are restored and range ... not-advertise is applied — nothing is advertised, hiding the range
| Router | show output | syslog | running-config |
|---|---|---|---|
| R1 | show | log | run |
| R2 | show | log | run |
| R3 | show | log | run |
| R4 | show | log | run |
| R11 | show | log | run |
| R12 | show | log | run |
| R13 | show | log | run |
This STEP also has show route on R2, the view from inside the area on R13.
STEP 5: the range is restored and R1 gets summary-prefix 192.168.16.0/22 — four external routes become one
| Router | show output | syslog | running-config |
|---|---|---|---|
| R1 | show | log | run |
| R2 | show | log | run |
| R3 | show | log | run |
| R4 | show | log | run |
| R11 | show | log | run |
| R12 | show | log | run |
| R13 | show | log | run |
This STEP also has show route ospf and show ospf database external on R2, the Null0 check on R1, ping and traceroute on R13.
STEP 6: the range and the summary-prefix are removed (final state) — the individual routes are back
| Router | show output | syslog | running-config |
|---|---|---|---|
| R1 | show | log | run |
| R2 | show | log | run |
| R3 | show | log | run |
| R4 | show | log | run |
| R11 | show | log | run |
| R12 | show | log | run |
| R13 | show | log | run |
This STEP also has show route ospf and ping on R2.
The capture was taken on the backbone side (between R2 and R3) across the summarization of STEP 1, filtered with ip proto 89.
References
| RFC | Title | Summary |
|---|---|---|
| RFC 2328 | OSPF Version 2 | Area address ranges (section 3.5); originating summary-LSAs for a range, the cost being the largest of the components, DoNotAdvertise and the MaxAge flush when a destination becomes unreachable (section 12.4.3). |
| RFC 1583 | OSPF Version 2 (superseded) | The same section 12.4.3 defined the cost as the smallest of the components; RFC 2328 changed it to the largest. |
Related articles
- What Is OSPF
- OSPF Router ID
- OSPF Packet Types and Header Format
- OSPF Neighbor States
- OSPF Options Field
- DR and BDR
- OSPF Network Types
- OSPF External Routes (Redistributing Static Routes)
- OSPF Multiple Areas and the ABR
- OSPF Stub and Totally Stubby Areas
- OSPF NSSA and Totally NSSA
- OSPF Route Summarization
- OSPF LSAs and the LSA Header
- OSPF router-LSA (type 1)
- OSPF network-LSA (type 2)
- OSPF summary-LSA (type 3)
- OSPF ASBR summary-LSA (type 4)
- OSPF AS external-LSA (type 5)