Stub areas
Replace external details with an ABR default and distinguish stub from totally stubby.
Understand
A stub area excludes Type 5 externals and Type 4 ASBR summaries. It keeps internal topology and ordinary Type 3 inter-area prefixes; the ABR injects a Type 3 default. Routers in the area must agree on stub capability. Area 0 cannot be stub, a stub area cannot contain an ASBR importing external routes, and it cannot carry a virtual link as transit.
A totally stubby area is a vendor extension: no-summary at the ABR suppresses ordinary Type 3 summaries, retaining the default and intra-area routes. Other routers use area stub; no-summary is an ABR export behavior, not a requirement to type it on every router. A default shifts exit choice to the ABR and can hide specific external path choices.
Lab setup
Use a fresh lab for this lesson; changes from other lessons are not cumulative. All outputs are illustrative excerpts, not recorded router tests. Transit cost is explicitly 10 and Loopback0 cost is 1. Interface names may vary by image.
| Router | Interface | IPv4 address | Area |
|---|---|---|---|
| R1 | Gi1 | 192.0.2.1/30 | 0 |
| R2 | Gi1 | 192.0.2.2/30 | 0 |
| R2 | Gi2 | 192.0.2.5/30 | 1 |
| R3 | Gi1 | 192.0.2.6/30 | 1 |
Loopback0 is 10.255.0.<router number>/32; area assignments: R1: area 0, R2: area 0, R3: area 1.
Complete baseline configurations
R1
configure terminal
hostname R1
router ospf 1
router-id 10.255.0.1
passive-interface Loopback0
exit
interface Loopback0
ip address 10.255.0.1 255.255.255.255
ip ospf 1 area 0
ip ospf cost 1
exit
interface GigabitEthernet1
ip address 192.0.2.1 255.255.255.252
ip ospf network point-to-point
ip ospf cost 10
ip ospf 1 area 0
no shutdown
exit
endR2
configure terminal
hostname R2
router ospf 1
router-id 10.255.0.2
passive-interface Loopback0
exit
interface Loopback0
ip address 10.255.0.2 255.255.255.255
ip ospf 1 area 0
ip ospf cost 1
exit
interface GigabitEthernet1
ip address 192.0.2.2 255.255.255.252
ip ospf network point-to-point
ip ospf cost 10
ip ospf 1 area 0
no shutdown
exit
interface GigabitEthernet2
ip address 192.0.2.5 255.255.255.252
ip ospf network point-to-point
ip ospf cost 10
ip ospf 1 area 1
no shutdown
exit
endR3
configure terminal
hostname R3
router ospf 1
router-id 10.255.0.3
passive-interface Loopback0
exit
interface Loopback0
ip address 10.255.0.3 255.255.255.255
ip ospf 1 area 1
ip ospf cost 1
exit
interface GigabitEthernet1
ip address 192.0.2.6 255.255.255.252
ip ospf network point-to-point
ip ospf cost 10
ip ospf 1 area 1
no shutdown
exit
endApply
First apply the filtered R1 external import below while area 1 is normal. R3 initially sees E1 198.51.100.0/24. Then convert both area-1 routers to stub; coordinate this change because capability disagreement disrupts adjacency.
R1 · external test source
configure terminal
ip route 198.51.100.0 255.255.255.0 Null0
ip route 203.0.113.0 255.255.255.0 Null0
ip prefix-list OSPF-IMPORT seq 5 permit 198.51.100.0/24
route-map STATIC-IN permit 10
match ip address prefix-list OSPF-IMPORT
set tag 100
exit
router ospf 1
redistribute static subnets metric 20 metric-type 1 route-map STATIC-IN
endR2 · ABR
configure terminal
router ospf 1
area 1 stub
area 1 default-cost 5
endR3 · internal
configure terminal
router ospf 1
area 1 stub
endVerify and interpret
R3# show ip route ospf
O IA 10.255.0.1/32 [110/21] via 192.0.2.5, GigabitEthernet1
O IA 10.255.0.2/32 [110/11] via 192.0.2.5, GigabitEthernet1
O*IA 0.0.0.0/0 [110/15] via 192.0.2.5, GigabitEthernet1
R3# show ip ospf database external
[No Type 5 entries; explanatory annotation]The external /24 is absent as a specific route/LSA. The ABR’s default cost 5 plus the local 10 gives 15. Specific inter-area loopbacks remain.
R2 · totally stubby alternative
configure terminal
router ospf 1
area 1 stub no-summary
endR3# show ip route ospf
O*IA 0.0.0.0/0 [110/15] via 192.0.2.5, GigabitEthernet1Ordinary Type 3 prefixes are now suppressed; connected and intra-area reachability are unaffected. The lab’s external source remains discard-only.
Restore ordinary stub behavior on R2 with no area 1 stub no-summary followed by area 1 stub, then verify the specific O IA routes return. To return area 1 to normal, remove stub on both R2 and R3 during a coordinated change.
Technical references
Key Takeaways
- Stub excludes Type 5 and Type 4 while retaining ordinary Type 3.
- The ABR supplies a Type 3 default.
- All routers in an area must agree on its type.
- Totally stubby suppresses ordinary inter-area summaries at the ABR.
- Use NSSA when a leaf area must import local externals.