area [id] stub
Configures an OSPF area as a stub area to reduce the size of the LSDB by blocking Type 5 LSAs and requiring a default route from the ABR.
area [id] stubWhen to Use This Command
- In a remote branch office with a single connection to headquarters, configure area 1 as stub to minimize routing table size and LSA flooding.
- When designing a hierarchical OSPF network, use stub areas for leaf areas that do not need external route knowledge.
- To simplify OSPF configuration in a small campus network where all inter-area traffic goes through a single ABR.
- When you want to prevent Type 5 external LSAs from entering an area, but still allow inter-area routes (Type 3).
Command Examples
Basic stub area configuration
area 1 stubRouter(config-router)# area 1 stub Router(config-router)#
The command is entered without any output confirmation. It configures area 1 as a stub area on this router. All routers in area 1 must also be configured as stub.
Verifying stub area with show ip ospf
show ip ospfRouting Process "ospf 1" with ID 192.168.1.1
Start time: 00:01:23.456, Time elapsed: 02:34:56
Supports only single TOS(TOS0) routes
Supports opaque LSA
Supports Link-local Signaling (LLS)
Supports area transit capability
Router is not originating router-LSAs with maximum metric
Initial SPF schedule delay 5000 msecs
Minimum hold time between two consecutive SPFs 10000 msecs
Maximum wait time between two consecutive SPFs 10000 msecs
Incremental-SPF disabled
Minimum LSA interval 5 secs
Minimum LSA arrival 1000 msecs
LSA group pacing timer 240 secs
Interface flood pacing timer 33 msecs
Retransmission pacing timer 66 msecs
Number of external LSA 0. Checksum Sum 0x000000
Number of opaque AS LSA 0. Checksum Sum 0x000000
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. 1 normal 0 stub 0 nssa
Number of areas transit capable is 0
External flood list length 0
IETF NSF helper support enabled
Cisco NSF helper support enabled
Reference bandwidth unit is 100 mbps
Area BACKBONE(0)
Number of interfaces in this area is 2
Area has no authentication
SPF algorithm last executed 00:01:23.456 ago
SPF algorithm executed 5 times
Area ranges are
Number of LSA 3. Checksum Sum 0x00A1B2
The output shows 'Number of areas in this router is 1. 1 normal 0 stub 0 nssa' indicating that no stub areas are configured yet. After applying 'area 1 stub', the line would show '1 normal 1 stub 0 nssa' if area 1 is configured. The 'Number of external LSA 0' confirms no external LSAs are present.
Understanding the Output
The 'show ip ospf' command displays OSPF process information. The key line for stub verification is 'Number of areas in this router is X. X normal Y stub Z nssa'. A stub area will increment the 'stub' count. Additionally, 'Number of external LSA' should be 0 in a stub area because Type 5 LSAs are blocked. In a properly configured stub area, you should see no external LSAs. If external LSAs appear, the stub configuration is inconsistent across the area. The ABR will inject a default route (0.0.0.0/0) into the stub area, which can be verified with 'show ip route ospf'.
CCNA Exam Tips
Remember that all routers in a stub area must be configured as stub; otherwise, neighbor adjacencies will not form.
Stub areas block Type 5 LSAs but allow Type 3 inter-area routes; NSSA allows Type 7 LSAs for external routes.
The backbone area (area 0) cannot be configured as a stub area.
Virtual links cannot be configured through a stub area.
Common Mistakes
Configuring stub on only one router in the area, causing OSPF neighbors to fail to form.
Confusing stub with totally stubby (which also blocks Type 3 LSAs except default route).
Attempting to configure area 0 as stub, which is not allowed.
Related Commands
Practice for the CCNA 200-301
Test your knowledge with hundreds of CCNA practice questions covering all exam domains.
Practice CCNA Questions