What a stub area is for
Multiple areas and the ABR showed that splitting a network into areas keeps Router-LSAs (type 1) inside their own area. AS External-LSAs (type 5), however, cross area boundaries and flood the whole AS. In a network that redistributes internet routes, those type 5 LSAs end up being most of the LSDB.
OSPF therefore offers a way to stop type 5 LSAs at the edge of an area. That is a stub area. External routes are no longer visible inside it; instead the area’s ABRs inject a default route that says “leave the area this way”.
| Term | Description |
|---|---|
| Stub area | An area that type 4 and type 5 LSAs do not enter. Its ABRs inject 0.0.0.0/0 as a type 3 LSA |
| Totally stubby area | A stub area that also blocks type 3. Only intra-area routes and the default route are left inside |
| Default route injection | An ABR advertising 0.0.0.0/0 as a Summary-LSA (type 3). RFC 2328 calls it DefaultDestination |
default-cost | The metric of the default route an ABR injects. The IOS XR default is 1 |
This article turns one of the three areas of a seven-router lab into a stub area and then into a totally stubby area, to see on real devices what disappears and what appears, how much the LSDB shrinks, and what happens when one router is left unconfigured. NSSA (not-so-stubby area) is covered in OSPF NSSA and totally NSSA.
The area types side by side
| Type | Type 1 / 2 | Type 3 | Type 4 / 5 | Default route |
|---|---|---|---|---|
| Normal area | yes | yes | yes | Not injected automatically |
| Stub area | yes | yes | no | The ABRs inject 0.0.0.0/0 |
| Totally stubby area | yes | no | no | The ABRs inject 0.0.0.0/0 |
| NSSA | yes | yes | no (externals arrive as type 7) | Depends on the configuration |
RFC 2328 does not define anything under the name “totally stubby”. It does, however, state in section 12.4.3.1 that an ABR connected to a stub area may choose to originate only a subset of the summary-LSAs, possibly under configuration control, so the behaviour itself is within the standard. The name and the no-summary keyword are Cisco’s.
The restrictions on stub areas
Section 3.6 of RFC 2328 lists three restrictions.
| Restriction | Content | Where it is shown |
|---|---|---|
| Every router in the area must agree | “The OSPF protocol ensures that all routers belonging to an area agree on whether the area has been configured as a stub.” An adjacency does not come up when the E bit differs | STEP 5 |
| A stub area cannot hold an ASBR | A router that brings in external routes cannot sit inside a stub area | STEP 4 |
| The backbone cannot be a stub | Area 0 is what distributes routes between areas | Below |
| Virtual links cannot cross a stub area | — | Not tested here (covered in a separate article) |
IOS XR rejects the backbone case at configuration time. Trying it on R2 (the ABR between area 0 and area 1) makes the commit fail with a semantic error, and the change is rolled back automatically.
RP/0/RP0/CPU0:R2#configure terminal
Sun Sep 6 23:21:12.360 UTC
RP/0/RP0/CPU0:R2(config)#router ospf 1
RP/0/RP0/CPU0:R2(config-ospf)#area 0
RP/0/RP0/CPU0:R2(config-ospf-ar)#stub
RP/0/RP0/CPU0:R2(config-ospf-ar)#commit
Sun Sep 6 23:21:13.708 UTC
% Failed to commit one or more configuration items during a pseudo-atomic operation. All changes made have been reverted. Please issue 'show configuration failed [inheritance]' from this session to view the errors
RP/0/RP0/CPU0:R2(config-ospf-ar)#show configuration failed
Sun Sep 6 23:21:19.713 UTC
!! SEMANTIC ERRORS: This configuration was rejected by
!! the system due to semantic errors. The individual
!! errors with each failed configuration command can be
!! found below.
router ospf 1
area 0
stub
!!% 'OSPF' detected the 'warning' condition 'Error: Backbone area cannot be configured as a stub or NSSA'
!
!
end
RP/0/RP0/CPU0:R2(config-ospf-ar)#abortThe message says stub or NSSA, so NSSA is equally impossible on the backbone. After the attempt R2 still has all three adjacencies in FULL and no stub in its configuration (both are recorded in the second half of the attached file).
Lab topology
The same seven-router, three-area lab as Multiple areas and the ABR is reused, and area 2 becomes the stub area. Two ABRs (R3 and R4) face area 2, so which of them the default route uses can be observed as well. Area 1 stays a normal area, which gives a side-by-side contrast: the same LSAs reach area 1 but not area 2.
| Item | Content |
|---|---|
| Area 1 | R1’s Loopback0 and the R1 - R2 link. R1 is the ASBR and redistributes 192.168.1.0/24 |
| Area 0 | The Loopback0 of R2, R3 and R4, plus R2 - R3 and R2 - R4 |
| Area 2 | The Loopback0 of R11, R12 and R13, plus R3 - R11, R4 - R12, R11 - R13 and R12 - R13. This is the area that becomes a stub |
| ABR | R2 (area 1 to 0), R3 and R4 (area 0 to 2) |
| Observation point | R13, an internal router in area 2 |
| Link cost | Cost 1 everywhere by default, except the R4 - R12 link at cost 10 on both ends (so that R3 is the closer ABR from R13) |
| Network type | network point-to-point on every link. No DR/BDR is elected and no Network-LSA (type 2) has to be generated |
The normal-area starting point (STEP 0)
First, the state before anything is made a stub. R13’s routing table holds both inter-area routes (O IA) and an external route (O E2).
RP/0/RP0/CPU0:R13#show route ospf
Sun Sep 6 22:13:51.197 UTC
O IA 1.1.1.1/32 [110/5] via 10.1.11.11, 00:04:29, GigabitEthernet0/0/0/0
O IA 2.2.2.2/32 [110/4] via 10.1.11.11, 00:04:29, GigabitEthernet0/0/0/0
O IA 3.3.3.3/32 [110/3] via 10.1.11.11, 00:04:29, GigabitEthernet0/0/0/0
O IA 4.4.4.4/32 [110/5] via 10.1.11.11, 00:04:29, GigabitEthernet0/0/0/0
O IA 10.0.12.0/24 [110/4] via 10.1.11.11, 00:04:29, GigabitEthernet0/0/0/0
O IA 10.0.23.0/24 [110/3] via 10.1.11.11, 00:04:29, GigabitEthernet0/0/0/0
O IA 10.0.24.0/24 [110/4] via 10.1.11.11, 00:04:29, GigabitEthernet0/0/0/0
O 11.11.11.11/32 [110/2] via 10.1.11.11, 00:04:29, GigabitEthernet0/0/0/0
O 12.12.12.12/32 [110/2] via 10.1.12.12, 00:04:34, GigabitEthernet0/0/0/1
O 172.16.3.0/24 [110/2] via 10.1.11.11, 00:04:29, GigabitEthernet0/0/0/0
O 172.16.4.0/24 [110/11] via 10.1.12.12, 00:04:34, GigabitEthernet0/0/0/1
O E2 192.168.1.0/24 [110/20] via 10.1.11.11, 00:04:29, GigabitEthernet0/0/0/0Four kinds of LSA are in the LSDB: 5 Router-LSAs, 14 Summary-LSAs (type 3), 2 ASBR Summary-LSAs (type 4) and 1 AS External-LSA (type 5), 22 in total.
RP/0/RP0/CPU0:R13#show ospf database
Sun Sep 6 22:13:54.402 UTC
OSPF Router with ID (13.13.13.13) (Process ID 1)
Router Link States (Area 2)
Link ID ADV Router Age Seq# Checksum Link count
3.3.3.3 3.3.3.3 302 0x80000002 0x00cc8d 2
4.4.4.4 4.4.4.4 290 0x80000002 0x0084b4 2
11.11.11.11 11.11.11.11 276 0x80000004 0x00ca9d 5
12.12.12.12 12.12.12.12 279 0x80000004 0x006ed1 5
13.13.13.13 13.13.13.13 275 0x80000004 0x0091ef 5
Summary Net Link States (Area 2)
Link ID ADV Router Age Seq# Checksum
1.1.1.1 3.3.3.3 275 0x80000001 0x001f0b
1.1.1.1 4.4.4.4 275 0x80000001 0x000125
2.2.2.2 3.3.3.3 310 0x80000001 0x00e640
2.2.2.2 4.4.4.4 302 0x80000001 0x00c85a
3.3.3.3 3.3.3.3 311 0x80000001 0x00ae75
3.3.3.3 4.4.4.4 302 0x80000001 0x00a479
4.4.4.4 3.3.3.3 297 0x80000001 0x009489
4.4.4.4 4.4.4.4 309 0x80000001 0x0062b9
10.0.12.0 3.3.3.3 310 0x80000001 0x003cdc
10.0.12.0 4.4.4.4 302 0x80000001 0x001ef6
10.0.23.0 3.3.3.3 311 0x80000001 0x00b856
10.0.23.0 4.4.4.4 302 0x80000001 0x00a465
10.0.24.0 3.3.3.3 310 0x80000001 0x00b755
10.0.24.0 4.4.4.4 309 0x80000001 0x008f7a
Summary ASB Link States (Area 2)
Link ID ADV Router Age Seq# Checksum
1.1.1.1 3.3.3.3 275 0x80000001 0x000723
1.1.1.1 4.4.4.4 275 0x80000001 0x00e83d
Type-5 AS External Link States
Link ID ADV Router Age Seq# Checksum Tag
192.168.1.0 1.1.1.1 290 0x80000001 0x000d25 0show ospf border-routers lists the ASBR (1.1.1.1) alongside the two ABRs. Area 2 can reach the ASBR because the ABRs originate type 4 LSAs for it.
RP/0/RP0/CPU0:R13#show ospf border-routers
Sun Sep 6 22:13:59.261 UTC
OSPF 1 Internal Routing Table
Codes: i - Intra-area route, I - Inter-area route
I 1.1.1.1 [4] via 10.1.11.11, GigabitEthernet0/0/0/0, ASBR , Area 2, SPF 7
i 3.3.3.3 [2] via 10.1.11.11, GigabitEthernet0/0/0/0, ABR , Area 2, SPF 7
i 4.4.4.4 [11] via 10.1.12.12, GigabitEthernet0/0/0/1, ABR , Area 2, SPF 7Making area 2 a stub area (STEP 1)
The stub setting goes on every router attached to the area — here the two ABRs (R3, R4) and the three internal routers (R11, R12, R13).
(applied to all five: R3, R4, R11, R12 and R13)
router ospf 1
area 2
stubFrom R13 the external route 192.168.1.0/24 is gone and 0.0.0.0/0 has appeared in its place. Reachability to 192.168.1.1 is unchanged and so is the path the traceroute takes: the same destination is still reached, through a default route instead of a specific one.
RP/0/RP0/CPU0:R13#show route 0.0.0.0/0
Sun Sep 6 22:16:17.583 UTC
Routing entry for 0.0.0.0/0
Known via "ospf 1", distance 110, metric 3, candidate default path, type inter area
Installed Sep 6 22:15:58.890 for 00:00:18
Routing Descriptor Blocks
10.1.11.11, from 3.3.3.3, via GigabitEthernet0/0/0/0
Route metric is 3
No advertising protos.
RP/0/RP0/CPU0:R13#ping 192.168.1.1 source 13.13.13.13
Sun Sep 6 22:16:17.827 UTC
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.1 timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/13/16 ms
RP/0/RP0/CPU0:R13#traceroute 192.168.1.1 source 13.13.13.13
Sun Sep 6 22:16:18.697 UTC
Type escape sequence to abort.
Tracing the route to 192.168.1.1
1 10.1.11.11 7 msec 5 msec 5 msec
2 172.16.3.3 9 msec 7 msec 8 msec
3 10.0.23.2 12 msec 10 msec 10 msec
4 10.0.12.1 17 msec * 18 msec Looking at the injected default in the LSDB, both R3 (3.3.3.3) and R4 (4.4.4.4) advertise 0.0.0.0 with metric 1 — the IOS XR default value of default-cost.
RP/0/RP0/CPU0:R13#show ospf database summary 0.0.0.0
Sun Sep 6 22:20:52.664 UTC
OSPF Router with ID (13.13.13.13) (Process ID 1)
Summary Net Link States (Area 2)
Routing Bit Set on this LSA
LS age: 365
Options: (No TOS-capability, DC)
LS Type: Summary Links (Network)
Link State ID: 0.0.0.0 (Summary Network Number)
Advertising Router: 3.3.3.3
LS Seq Number: 80000001
Checksum: 0x57da
Length: 28
Network Mask: /0
TOS: 0 Metric: 1
LS age: 351
Options: (No TOS-capability, DC)
LS Type: Summary Links (Network)
Link State ID: 0.0.0.0 (Summary Network Number)
Advertising Router: 4.4.4.4
LS Seq Number: 80000001
Checksum: 0x39f4
Length: 28
Network Mask: /0
TOS: 0 Metric: 1 Type 4 and type 5 LSAs disappear from the database entirely.
RP/0/RP0/CPU0:R13#show ospf database asbr-summary
Sun Sep 6 22:19:00.396 UTC
OSPF Router with ID (13.13.13.13) (Process ID 1)RP/0/RP0/CPU0:R13#show ospf database external
Sun Sep 6 22:19:00.862 UTC
OSPF Router with ID (13.13.13.13) (Process ID 1)With no type 4 LSA, the ASBR line also disappears from show ospf border-routers; only the two ABRs remain.
RP/0/RP0/CPU0:R13#show ospf border-routers
Sun Sep 6 22:19:01.801 UTC
OSPF 1 Internal Routing Table
Codes: i - Intra-area route, I - Inter-area route
i 3.3.3.3 [2] via 10.1.11.11, GigabitEthernet0/0/0/0, ABR , Area 2, SPF 10
i 4.4.4.4 [11] via 10.1.12.12, GigabitEthernet0/0/0/1, ABR , Area 2, SPF 10Changing the area type also changes the E bit in the Options field of the Hello packets. Listing the Options of the Hellos captured inside area 2 catches the moment it goes from 0x12 to 0x10: R13 is still sending 0x12 at No.11 while R11 has already moved to 0x10 at No.12, and during that window the two disagree. The E bit itself is covered in the OSPF Options field.
1 10.1.11.13 0x12
2 10.1.11.11 0x12
3 10.1.11.13 0x12
4 10.1.11.11 0x12
5 10.1.11.13 0x12
6 10.1.11.11 0x12
7 10.1.11.13 0x12
8 10.1.11.11 0x12
9 10.1.11.13 0x12
10 10.1.11.11 0x12
11 10.1.11.13 0x12
12 10.1.11.11 0x10
13 10.1.11.13 0x12
14 10.1.11.11 0x10
15 10.1.11.13 0x12
16 10.1.11.11 0x10
17 10.1.11.13 0x10
18 10.1.11.11 0x10
40 10.1.11.13 0x10
41 10.1.11.11 0x10
42 10.1.11.13 0x10
43 10.1.11.11 0x10
44 10.1.11.13 0x10
45 10.1.11.11 0x10
46 10.1.11.13 0x10
47 10.1.11.11 0x10
48 10.1.11.13 0x10
49 10.1.11.11 0x10
50 10.1.11.13 0x10
51 10.1.11.11 0x10
52 10.1.11.13 0x10
53 10.1.11.11 0x10
54 10.1.11.13 0x10
55 10.1.11.11 0x10
56 10.1.11.13 0x10
57 10.1.11.11 0x10
58 10.1.11.13 0x10
59 10.1.11.11 0x10
60 10.1.11.13 0x10
61 10.1.11.11 0x10
62 10.1.11.13 0x10
63 10.1.11.11 0x10
64 10.1.11.13 0x10
65 10.1.11.11 0x10
66 10.1.11.13 0x10
67 10.1.11.11 0x10
68 10.1.11.13 0x10
69 10.1.11.11 0x10
70 10.1.11.13 0x10
71 10.1.11.11 0x10
72 10.1.11.13 0x10
73 10.1.11.11 0x10
74 10.1.11.13 0x10
75 10.1.11.11 0x10
76 10.1.11.13 0x10
77 10.1.11.11 0x10
78 10.1.11.13 0x10
79 10.1.11.11 0x10
80 10.1.11.13 0x10
81 10.1.11.11 0x10
82 10.1.11.13 0x10Changing the cost of the default route (STEP 2)
When two ABRs advertise the default route, cost decides which one is used. Making R3’s default more expensive shows this.
(R3)
router ospf 1
area 2
default-cost 50The ABR’s own show ospf reports the cost of the default route it injects into the area.
RP/0/RP0/CPU0:R3#show ospf
Sun Sep 6 22:22:35.797 UTC
Routing Process "ospf 1" with ID 3.3.3.3
Role: Primary Active
NSR (Non-stop routing) is Enabled
Supports only single TOS(TOS0) routes
Supports opaque LSA
It is an area border router
Maximum number of non self-generated LSA allowed 500000
Current number of non self-generated LSA 25
Threshold for warning message 75%
Ignore-time 5 minutes, reset-time 10 minutes
Ignore-count allowed 5, current ignore-count 0
Maximum number of external prefixes per router 50000 (suppress-neighbor)
Warning threshold 75%
Maximum Exchange time 10 Hold time 5 Max Recovery count 300
Router is not originating router-LSAs with maximum metric
Initial SPF schedule delay 50 msecs
Minimum hold time between two consecutive SPFs 200 msecs
Maximum wait time between two consecutive SPFs 5000 msecs
Initial LSA throttle delay 50 msecs
Minimum hold time for LSA throttle 200 msecs
Maximum wait time for LSA throttle 5000 msecs
Minimum LSA interval 200 msecs. Minimum LSA arrival 100 msecs
LSA refresh interval 1800 seconds
Flood pacing interval 33 msecs. Retransmission pacing interval 66 msecs
Adjacency stagger enabled; initial (per area): 2, maximum: 64
Number of neighbors forming: 0, 2 full
Maximum number of configured interfaces 1024
Number of external LSA 1. Checksum Sum 0x00250d
Number of opaque AS LSA 0. Checksum Sum 00000000
Number of DCbitless external and opaque AS LSA 0
Number of DoNotAge external and opaque AS LSA 0
Number of areas in this router is 2. 1 normal 1 stub 0 nssa
External flood list length 0
SNMP trap is enabled
LSD not connected, revision 0
Segment Routing Global Block default (16000-23999), not allocated
Segment Routing Local Block, unknown
Segment Routing prefix-sid-map, Advertise local: Disabled, Receive remote: Disabled
Strict-SPF capability is enabled
Area BACKBONE(0)
Number of interfaces in this area is 2
SPF algorithm executed 9 times
Number of LSA 20. Checksum Sum 0x0bc1b4
Number of opaque link LSA 0. Checksum Sum 00000000
Number of DCbitless LSA 0
Number of indication LSA 0
Number of DoNotAge LSA 0
Flood list length 0
Number of LFA enabled interfaces 0, LFA revision 0
Number of Per Prefix LFA enabled interfaces 0
Number of neighbors forming in staggered mode 0, 1 full
Area 2
Number of interfaces in this area is 1
It is a stub area
generates stub default route with cost 50R13’s default route moves from R3 (2 plus 50 = 52) to R4 (11 plus 1 = 12). The LSDB now holds R3’s advertisement with metric 50 next to R4’s with metric 1. Section 12.4.3.1 of RFC 2328 states that StubDefaultCost “need not be configured identically in all of the stub area’s area border routers”, and the two values indeed coexist.
RP/0/RP0/CPU0:R13#show route 0.0.0.0/0
Sun Sep 6 22:21:31.240 UTC
Routing entry for 0.0.0.0/0
Known via "ospf 1", distance 110, metric 12, candidate default path, type inter area
Installed Sep 6 22:21:19.306 for 00:00:12
Routing Descriptor Blocks
10.1.12.12, from 4.4.4.4, via GigabitEthernet0/0/0/1
Route metric is 12
No advertising protos.
RP/0/RP0/CPU0:R13#show ospf database summary 0.0.0.0
Sun Sep 6 22:21:31.437 UTC
OSPF Router with ID (13.13.13.13) (Process ID 1)
Summary Net Link States (Area 2)
LS age: 14
Options: (No TOS-capability, DC)
LS Type: Summary Links (Network)
Link State ID: 0.0.0.0 (Summary Network Number)
Advertising Router: 3.3.3.3
LS Seq Number: 80000002
Checksum: 0x41be
Length: 28
Network Mask: /0
TOS: 0 Metric: 50
Routing Bit Set on this LSA
LS age: 390
Options: (No TOS-capability, DC)
LS Type: Summary Links (Network)
Link State ID: 0.0.0.0 (Summary Network Number)
Advertising Router: 4.4.4.4
LS Seq Number: 80000001
Checksum: 0x39f4
Length: 28
Network Mask: /0
TOS: 0 Metric: 1
RP/0/RP0/CPU0:R13#traceroute 192.168.1.1 source 13.13.13.13
Sun Sep 6 22:21:32.154 UTC
Type escape sequence to abort.
Tracing the route to 192.168.1.1
1 10.1.12.12 7 msec 4 msec 6 msec
2 172.16.4.4 10 msec 8 msec 10 msec
3 10.0.24.2 12 msec 10 msec 10 msec
4 10.0.12.1 14 msec * 16 msec No.5 of the attached capture is the LS Update that carried this into area 2: a single 0.0.0.0 Summary-LSA whose Advertising Router is R3 (3.3.3.3) and whose Metric is 50.
Open Shortest Path First
OSPF Header
Version: 2
Message Type: LS Update (4)
Packet Length: 56
Source OSPF Router: 11.11.11.11
Area ID: 0.0.0.2
Checksum: 0xff90 [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 0010 = LS Age (seconds): 2
0... .... .... .... = Do Not Age Flag: 0
Options: 0x20, (DC) Demand Circuits
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
.... ..0. = (E) External Routing: Not capable
.... ...0 = (MT) Multi-Topology Routing: No
LS Type: Summary-LSA (IP network) (3)
Link State ID: 0.0.0.0
Advertising Router: 3.3.3.3
Sequence Number: 0x80000002
Checksum: 0x41be
Length: 28
Netmask: 0.0.0.0
TOS: 0
Metric: 50Making it a totally stubby area (STEP 3)
After putting default-cost back to its default, no-summary is added on the two ABRs only. The internal routers (R11, R12, R13) keep plain stub.
(R3 and R4 only; on R3 the default-cost from STEP 2 is removed as well)
router ospf 1
area 2
no default-cost 50
stub no-summaryThe ABR’s show ospf now reads It is a stub area, no summary LSA in this area.
RP/0/RP0/CPU0:R3#show ospf
Sun Sep 6 22:27:01.248 UTC
Routing Process "ospf 1" with ID 3.3.3.3
Role: Primary Active
NSR (Non-stop routing) is Enabled
Supports only single TOS(TOS0) routes
Supports opaque LSA
It is an area border router
Maximum number of non self-generated LSA allowed 500000
Current number of non self-generated LSA 18
Threshold for warning message 75%
Ignore-time 5 minutes, reset-time 10 minutes
Ignore-count allowed 5, current ignore-count 0
Maximum number of external prefixes per router 50000 (suppress-neighbor)
Warning threshold 75%
Maximum Exchange time 10 Hold time 5 Max Recovery count 300
Router is not originating router-LSAs with maximum metric
Initial SPF schedule delay 50 msecs
Minimum hold time between two consecutive SPFs 200 msecs
Maximum wait time between two consecutive SPFs 5000 msecs
Initial LSA throttle delay 50 msecs
Minimum hold time for LSA throttle 200 msecs
Maximum wait time for LSA throttle 5000 msecs
Minimum LSA interval 200 msecs. Minimum LSA arrival 100 msecs
LSA refresh interval 1800 seconds
Flood pacing interval 33 msecs. Retransmission pacing interval 66 msecs
Adjacency stagger enabled; initial (per area): 2, maximum: 64
Number of neighbors forming: 0, 2 full
Maximum number of configured interfaces 1024
Number of external LSA 1. Checksum Sum 0x00250d
Number of opaque AS LSA 0. Checksum Sum 00000000
Number of DCbitless external and opaque AS LSA 0
Number of DoNotAge external and opaque AS LSA 0
Number of areas in this router is 2. 1 normal 1 stub 0 nssa
External flood list length 0
SNMP trap is enabled
LSD not connected, revision 0
Segment Routing Global Block default (16000-23999), not allocated
Segment Routing Local Block, unknown
Segment Routing prefix-sid-map, Advertise local: Disabled, Receive remote: Disabled
Strict-SPF capability is enabled
Area BACKBONE(0)
Number of interfaces in this area is 2
SPF algorithm executed 10 times
Number of LSA 20. Checksum Sum 0x0bc1b4
Number of opaque link LSA 0. Checksum Sum 00000000
Number of DCbitless LSA 0
Number of indication LSA 0
Number of DoNotAge LSA 0
Flood list length 0
Number of LFA enabled interfaces 0, LFA revision 0
Number of Per Prefix LFA enabled interfaces 0
Number of neighbors forming in staggered mode 0, 1 full
Area 2
Number of interfaces in this area is 1
It is a stub area, no summary LSA in this area
generates stub default route with cost 1The inter-area routes (O IA) are gone from R13’s routing table, leaving only intra-area routes and the default route. The LSDB is down to 7 LSAs: five Router-LSAs and two type 3 LSAs for 0.0.0.0.
RP/0/RP0/CPU0:R13#show route ospf
Sun Sep 6 22:25:54.007 UTC
O*IA 0.0.0.0/0 [110/3] via 10.1.11.11, 00:00:18, GigabitEthernet0/0/0/0
O 11.11.11.11/32 [110/2] via 10.1.11.11, 00:09:55, GigabitEthernet0/0/0/0
O 12.12.12.12/32 [110/2] via 10.1.12.12, 00:09:55, GigabitEthernet0/0/0/1
O 172.16.3.0/24 [110/2] via 10.1.11.11, 00:09:55, GigabitEthernet0/0/0/0
O 172.16.4.0/24 [110/11] via 10.1.12.12, 00:09:55, GigabitEthernet0/0/0/1
RP/0/RP0/CPU0:R13#show route 0.0.0.0/0
Sun Sep 6 22:25:54.193 UTC
Routing entry for 0.0.0.0/0
Known via "ospf 1", distance 110, metric 3, candidate default path, type inter area
Installed Sep 6 22:25:35.835 for 00:00:18
Routing Descriptor Blocks
10.1.11.11, from 3.3.3.3, via GigabitEthernet0/0/0/0
Route metric is 3
No advertising protos.
RP/0/RP0/CPU0:R13#show ospf database
Sun Sep 6 22:25:54.352 UTC
OSPF Router with ID (13.13.13.13) (Process ID 1)
Router Link States (Area 2)
Link ID ADV Router Age Seq# Checksum Link count
3.3.3.3 3.3.3.3 25 0x80000006 0x00e275 2
4.4.4.4 4.4.4.4 14 0x80000005 0x00e262 1
11.11.11.11 11.11.11.11 25 0x80000009 0x00de86 5
12.12.12.12 12.12.12.12 4 0x80000009 0x0082ba 5
13.13.13.13 13.13.13.13 599 0x80000006 0x00abd5 5
Summary Net Link States (Area 2)
Link ID ADV Router Age Seq# Checksum
0.0.0.0 3.3.3.3 30 0x80000003 0x0053dc
0.0.0.0 4.4.4.4 14 0x80000002 0x0037f5
RP/0/RP0/CPU0:R13#traceroute 192.168.1.1 source 13.13.13.13
Sun Sep 6 22:25:54.991 UTC
Type escape sequence to abort.
Tracing the route to 192.168.1.1
1 10.1.11.11 6 msec 4 msec 27 msec
2 172.16.3.3 8 msec 7 msec 7 msec
3 10.0.23.2 10 msec 10 msec 10 msec
4 10.0.12.1 45 msec * 15 msec The moment no-summary is applied, each ABR withdraws the type 3 LSAs it had been injecting by reflooding them with LS Age 3600 (MaxAge). No.4 of the attached capture is R3 pulling eight type 3 LSAs at once.
4 11.539631 10.1.11.11 → 224.0.0.5 OSPF 286 LS Update
7 15.274140 10.1.11.11 → 224.0.0.5 OSPF 134 LS Update
8 15.814386 10.1.11.11 → 224.0.0.5 OSPF 126 LS Update
9 15.865280 10.1.11.11 → 224.0.0.5 OSPF 146 LS Update
10 15.898546 10.1.11.11 → 224.0.0.5 OSPF 110 LS Update
13 20.801426 10.1.11.11 → 10.1.11.13 OSPF 110 LS Update
16 26.958238 10.1.11.13 → 224.0.0.5 OSPF 286 LS Update
20 33.575569 10.1.11.13 → 224.0.0.5 OSPF 134 LS Update
22 35.879174 10.1.11.13 → 224.0.0.5 OSPF 126 LS Update
23 35.929703 10.1.11.13 → 224.0.0.5 OSPF 146 LS Update
26 40.752365 10.1.11.13 → 224.0.0.5 OSPF 110 LS UpdateThe striking thing about a totally stubby area is that destinations that are not in the routing table are still reachable. R13 has no route to 1.1.1.1/32 (R1’s Loopback0), yet the ping succeeds, because the default route absorbs everything.
RP/0/RP0/CPU0:R13#show route 1.1.1.1/32
Sun Sep 6 23:09:13.422 UTC
% Network not in table
RP/0/RP0/CPU0:R13#ping 1.1.1.1 source 13.13.13.13
Sun Sep 6 23:09:13.686 UTC
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1 timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 11/13/16 ms
RP/0/RP0/CPU0:R13#traceroute 1.1.1.1 source 13.13.13.13
Sun Sep 6 23:09:14.518 UTC
Type escape sequence to abort.
Tracing the route to 1.1.1.1
1 10.1.11.11 7 msec 5 msec 5 msec
2 172.16.3.3 10 msec 10 msec 8 msec
3 10.0.23.2 12 msec 10 msec 10 msec
4 10.0.12.1 16 msec * 17 msec How much the LSDB shrinks
Counting the LSAs of area 2 as R13 sees them, in the three states:
| State | Router (type 1) | Summary (type 3) | ASBR summary (type 4) | External (type 5) | Total | OSPF routes |
|---|---|---|---|---|---|---|
| Normal area (STEP 0) | 5 | 14 | 2 | 1 | 22 | 12 |
| Stub area (STEP 1) | 5 | 16 (14 plus 2 defaults) | 0 | 0 | 21 | 12 |
| Totally stubby (STEP 3) | 5 | 2 (the defaults only) | 0 | 0 | 7 | 5 |
Making an area a stub barely reduces the LSA count on its own. This lab has just one external route, so the three type 4 and type 5 LSAs go away while two default routes arrive — a net saving of one. In a real network with tens of thousands of external routes that is exactly where the win is, but when the goal is to lighten the routers inside the area, a totally stubby area shows it far more clearly: 22 LSAs become 7.
Trying to redistribute inside a stub area (STEP 4)
Section 3.6 of RFC 2328 states that AS boundary routers cannot be placed internal to stub areas. So what happens if the configuration is entered anyway? R13 redistributes a static route.
(R13)
router static
address-family ipv4 unicast
192.168.13.0/24 Null0
!
router ospf 1
redistribute staticThe configuration itself is accepted without an error. show ospf even reports that static routes are being redistributed and that one prefix has been redistributed. Yet show ospf database external stays empty: not one type 5 LSA is created.
RP/0/RP0/CPU0:R13#show ospf database external
Sun Sep 6 22:30:29.465 UTC
OSPF Router with ID (13.13.13.13) (Process ID 1)
RP/0/RP0/CPU0:R13#show ospf
Sun Sep 6 22:30:30.091 UTC
Routing Process "ospf 1" with ID 13.13.13.13
Role: Primary Active
NSR (Non-stop routing) is Enabled
Supports only single TOS(TOS0) routes
Supports opaque LSA
It is an autonomous system boundary router
Maximum number of non self-generated LSA allowed 500000
Current number of non self-generated LSA 6
Threshold for warning message 75%
Ignore-time 5 minutes, reset-time 10 minutes
Ignore-count allowed 5, current ignore-count 0
Redistributing External Routes from,
static
Maximum number of redistributed prefixes 10240
Threshold for warning message 75%
Current number of redistributed prefixes 1
Maximum number of external prefixes per router 50000 (suppress-neighbor)
Warning threshold 75%
Maximum Exchange time 10 Hold time 5 Max Recovery count 300
Router is not originating router-LSAs with maximum metric
Initial SPF schedule delay 50 msecs
Minimum hold time between two consecutive SPFs 200 msecs
Maximum wait time between two consecutive SPFs 5000 msecs
Initial LSA throttle delay 50 msecs
Minimum hold time for LSA throttle 200 msecs
Maximum wait time for LSA throttle 5000 msecs
Minimum LSA interval 200 msecs. Minimum LSA arrival 100 msecs
LSA refresh interval 1800 seconds
Flood pacing interval 33 msecs. Retransmission pacing interval 66 msecs
Adjacency stagger enabled; initial (per area): 2, maximum: 64
Number of neighbors forming: 0, 2 full
Maximum number of configured interfaces 1024
Number of external LSA 0. Checksum Sum 00000000
Number of opaque AS LSA 0. Checksum Sum 00000000
Number of DCbitless external and opaque AS LSA 0
Number of DoNotAge external and opaque AS LSA 0
Number of areas in this router is 1. 0 normal 1 stub 0 nssa
External flood list length 0
SNMP trap is enabled
LSD not connected, revision 0
Segment Routing Global Block default (16000-23999), not allocated
Segment Routing Local Block, unknown
Segment Routing prefix-sid-map, Advertise local: Disabled, Receive remote: Disabled
Strict-SPF capability is enabled
Area 2
Number of interfaces in this area is 3
It is a stub area
SPF algorithm executed 17 times
Number of LSA 7. Checksum Sum 0x04fb11
Number of opaque link LSA 0. Checksum Sum 00000000
Number of DCbitless LSA 0
Number of indication LSA 0
Number of DoNotAge LSA 0
Flood list length 0
Number of LFA enabled interfaces 0, LFA revision 0
Number of Per Prefix LFA enabled interfaces 0
Number of neighbors forming in staggered mode 0, 2 full192.168.13.0/24 never appears on the neighbouring R11 either. The RFC restriction shows up as a configuration that commits but produces no route. To bring external routes into an area like this, use an NSSA.
Reproducing a missed configuration (STEP 5)
Every router in the area has to agree on the stub setting. Removing stub from R13 alone reproduces the classic operational mistake.
(R13)
router ospf 1
area 2
no stubBoth of R13’s adjacencies go DOWN and every OSPF route disappears. The Nbrs F/C column of show ospf interface brief reads 0/1 — one neighbor configured, none Full.
RP/0/RP0/CPU0:R13#show ospf neighbor
Sun Sep 6 22:34:03.132 UTC
* Indicates MADJ interface
# Indicates Neighbor awaiting BFD session up
Neighbors for OSPF 1
Neighbor ID Pri State Dead Time Address Interface
11.11.11.11 1 DOWN/ - - 10.1.11.11 GigabitEthernet0/0/0/0
12.12.12.12 1 DOWN/ - - 10.1.12.12 GigabitEthernet0/0/0/1
Total neighbor count: 2
RP/0/RP0/CPU0:R13#show route ospf
Sun Sep 6 22:34:04.046 UTC
% No matching routes found
RP/0/RP0/CPU0:R13#show ospf interface brief
Sun Sep 6 22:34:04.165 UTC
* Indicates MADJ interface, (P) Indicates fast detect hold down state
Interfaces for OSPF 1
Interface PID Area IP Address/Mask Cost State Nbrs F/C
Lo0 1 2 13.13.13.13/32 1 LOOP 0/0
Gi0/0/0/0 1 2 10.1.11.13/24 1 P2P 0/1
Gi0/0/0/1 1 2 10.1.12.13/24 1 P2P 0/1The syslog on the neighbouring R11 records the adjacency going down on the dead timer: the Hellos still arrive, but the mismatched E bit makes each side ignore them.
RP/0/RP0/CPU0:R11#show logging start Sep 6 22:32:47
Sun Sep 6 22:36:09.027 UTC
Time Zone UTC, DST disabled
Syslog logging: enabled (0 messages dropped, 0 flushes, 0 overruns)
Console logging: Disabled
Monitor logging: level debugging, 0 messages logged
Trap logging: level informational, 0 messages logged
Buffer logging: level debugging, 146 messages logged
Log Buffer (2097152 bytes):
RP/0/RP0/CPU0:Sep 6 22:32:48.091 UTC: logger[66500]: %OS-SYSLOG-6-LOG_INFO : informational STEP5-BEGIN
RP/0/RP0/CPU0:Sep 6 22:32:48.410 UTC: ssh_syslog_proxy[1188]: %SECURITY-SSHD_SYSLOG_PRX-6-INFO_GENERAL : sshd[9109]: Received disconnect from 10.100.3.1 port 51054:11: disconnected by user
RP/0/RP0/CPU0:Sep 6 22:32:48.410 UTC: ssh_syslog_proxy[1188]: %SECURITY-SSHD_SYSLOG_PRX-6-INFO_GENERAL : sshd[9109]: Disconnected from user cisco 10.100.3.1 port 51054
RP/0/RP0/CPU0:Sep 6 22:34:22.025 UTC: ospf[1035]: %ROUTING-OSPF-5-ADJCHG : Process 1, Nbr 13.13.13.13 on GigabitEthernet0/0/0/1 in area 2 from FULL to DOWN, Neighbor Down: dead timer expired, vrf default vrfid 0x60000000
RP/0/RP0/CPU0:Sep 6 22:35:53.406 UTC: ssh_syslog_proxy[1188]: %SECURITY-SSHD_SYSLOG_PRX-6-INFO_GENERAL : sshd[9408]: Accepted authentication/pam for cisco from 10.100.3.1 port 51172 ssh2
RP/0/RP0/CPU0:Sep 6 22:36:06.688 UTC: ssh_syslog_proxy[1188]: %SECURITY-SSHD_SYSLOG_PRX-6-INFO_GENERAL : sshd[9413]: Received disconnect from 10.100.3.1 port 51172:11: disconnected by user
RP/0/RP0/CPU0:Sep 6 22:36:06.688 UTC: ssh_syslog_proxy[1188]: %SECURITY-SSHD_SYSLOG_PRX-6-INFO_GENERAL : sshd[9413]: Disconnected from user cisco 10.100.3.1 port 51172
RP/0/RP0/CPU0:Sep 6 22:36:07.539 UTC: ssh_syslog_proxy[1188]: %SECURITY-SSHD_SYSLOG_PRX-6-INFO_GENERAL : sshd[9614]: Accepted authentication/pam for cisco from 10.100.3.1 port 51177 ssh2 Restoring the setting (STEP 6)
Putting stub back on R13 re-establishes the adjacencies and brings the default route back.
RP/0/RP0/CPU0:R13#show ospf neighbor
Sun Sep 6 22:38:36.429 UTC
* Indicates MADJ interface
# Indicates Neighbor awaiting BFD session up
Neighbors for OSPF 1
Neighbor ID Pri State Dead Time Address Interface
11.11.11.11 1 FULL/ - 00:00:31 10.1.11.11 GigabitEthernet0/0/0/0
Neighbor is up for 00:01:14
12.12.12.12 1 FULL/ - 00:00:38 10.1.12.12 GigabitEthernet0/0/0/1
Neighbor is up for 00:01:08
Total neighbor count: 2
RP/0/RP0/CPU0:R13#show route ospf
Sun Sep 6 22:38:36.940 UTC
O*IA 0.0.0.0/0 [110/3] via 10.1.11.11, 00:01:14, GigabitEthernet0/0/0/0
O 11.11.11.11/32 [110/2] via 10.1.11.11, 00:01:14, GigabitEthernet0/0/0/0
O 12.12.12.12/32 [110/2] via 10.1.12.12, 00:01:08, GigabitEthernet0/0/0/1
O 172.16.3.0/24 [110/2] via 10.1.11.11, 00:01:14, GigabitEthernet0/0/0/0
O 172.16.4.0/24 [110/11] via 10.1.12.12, 00:01:08, GigabitEthernet0/0/0/1
RP/0/RP0/CPU0:R13#ping 192.168.1.1 source 13.13.13.13
Sun Sep 6 22:38:37.127 UTC
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.1 timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/12/15 msThe IOS XR commands
| Command | Where it goes | Meaning |
|---|---|---|
stub under area <ID> | Every router attached to the area | Makes the area a stub. Missing it on one router breaks the adjacency |
stub no-summary under area <ID> | The ABRs only | Blocks type 3 as well (totally stubby). Internal routers keep plain stub |
default-cost <value> under area <ID> | The ABRs only | The metric of the injected default route. The default is 1, and the ABRs may use different values |
router ospf 1
area 2
stub no-summary
default-cost 50
!
!On IOS XE the equivalents are area <ID> stub, area <ID> stub no-summary and area <ID> default-cost <value> under router ospf <process>. 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 asbr-summary / show ospf database external / show ospf border-routers / show ospf routes / show route 0.0.0.0/0 / show route 1.1.1.1/32 / 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 area 2 as a totally stubby area (no-summary on the ABRs, stub on the internal routers).
STEP 0: a normal area (before anything is made a stub) — both O IA and O E2 are present and there are 22 LSAs
| 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 and a traceroute taken from R13.
STEP 1: stub on the five routers of area 2 — type 4 and type 5 disappear and 0.0.0.0/0 arrives as a type 3 (21 LSAs)
| 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, ping and traceroute and show ospf database summary 0.0.0.0 taken from R13.
STEP 2: default-cost 50 on R3 — the default route moves to the path via R4 (cost 12)
| 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, show ospf database summary 0.0.0.0 and traceroute taken from R13.
STEP 3: stub no-summary on the two ABRs (totally stubby) — type 3 disappears too, leaving 7 LSAs and 5 OSPF routes
| 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, show ospf database and traceroute and show ospf database summary 0.0.0.0 taken from R13.
STEP 4: R13 redistributes a static route — the configuration commits but no type 5 LSA is generated
| 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 ospf database external and show ospf taken from R13.
STEP 5: stub removed from R13 alone (a missed configuration) — the E bit mismatch takes the adjacencies down and every OSPF route with them
| 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 ospf neighbor, show route ospf and show ospf interface brief taken from R13.
STEP 6: stub put back on R13 (final state) — the adjacencies and the default route come 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 ospf neighbor, show route ospf and ping and show route 1.1.1.1/32, ping and traceroute taken from R13.
The attempt to make the backbone a stub area is recorded in R2’s terminal log.
The captures were taken inside area 2 (between R11 and R13) in three runs, all filtered with ip proto 89.
Download the capture around the switch to a stub area (STEP 1)
Download the capture of the default-cost change (STEP 2)
Download the capture of the switch to a totally stubby area (STEP 3)
References
| RFC | Title | Summary |
|---|---|---|
| RFC 2328 | OSPF Version 2 | The definition of stub areas and their restrictions (section 3.6); originating summary-LSAs into a stub area, the default route, StubDefaultCost and the rule that type 4 LSAs are never originated into a stub area (section 12.4.3.1). |
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)