PacketLab
OSPF · External routing and special areas

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.

Lab topologyIllustrative topology
192.0.2.0/30area 0192.0.2.4/30area 1R1Lo0 · 10.255.0.1/32R2Lo0 · 10.255.0.2/32R3Lo0 · 10.255.0.3/32
Solid lines are physical links, configured as point-to-point. Interfaces and areas are listed below. Router symbol: GNS3, GPL-2.0. Original layout.
RouterInterfaceIPv4 addressArea
R1Gi1192.0.2.1/300
R2Gi1192.0.2.2/300
R2Gi2192.0.2.5/301
R3Gi1192.0.2.6/301

Loopback0 is 10.255.0.<router number>/32; area assignments: R1: area 0, R2: area 0, R3: area 1.

Complete baseline configurations

R1

Configuration
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
end

R2

Configuration
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
end

R3

Configuration
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
end

Apply

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

Configuration
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
end

R2 · ABR

Configuration
configure terminal
router ospf 1
 area 1 stub
 area 1 default-cost 5
end

R3 · internal

Configuration
configure terminal
router ospf 1
 area 1 stub
end

Verify and interpret

Illustrative output · excerpt
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

Configuration
configure terminal
router ospf 1
 area 1 stub no-summary
end
Illustrative output · excerpt
R3# show ip route ospf
O*IA 0.0.0.0/0 [110/15] via 192.0.2.5, GigabitEthernet1

Ordinary 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

OSPFv2 standard · Router configuration guide

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.

Stub areas Quiz

Six questions · four options each · select one answer per question. Submit all answers to see your score and explanations.

1. Which LSA is excluded from a stub area?
2. Who supplies the stub default?
3. What is R3’s default cost here?
4. What does no-summary add at the ABR?
5. Can area 0 be configured as stub?
6. A leaf needs local redistribution. Which area type fits?