Cisco CCNA And CCNP Exam Training: OSPF Stub Areas
By Chris Bryant, CCIE #12933
When I first started studying for the CCNA and CCNP, OSPF area types and what they did didn't make a lot of sense to me. The books would list them, but not really show an example or show when a stub area is a good idea. In this tutorial, we'll take an in-depth look at stub areas that will help you pass the CCNA and CCNP exams as well as decide when an OSPF stub area is appropriate for your network.
Let’s take another look at the network topology from the ASBR tutorial, paying special attention to the routing table of R4. Some of the connectivity has changed, but R1 is still an ASBR, redistributing RIP routes into the OSPF domain.

R4’s OSPF Routing Table:
R4#show ip route ospf
5.0.0.0/24 is subnetted, 3 subnets
O E2 5.1.1.0 [110/20] via 34.34.34.3, 00:03:37, Serial0
O E2 5.2.1.0 [110/20] via 34.34.34.3, 00:03:37, Serial0
O E2 5.3.1.0 [110/20] via 34.34.34.3, 00:03:37, Serial0
172.12.0.0/24 is subnetted, 1 subnets
O IA 172.12.123.0 [110/128] via 34.34.34.3, 00:03:37, Serial0
10.0.0.0/24 is subnetted, 1 subnets
O E2 10.1.1.0 [110/20] via 34.34.34.3, 00:03:37, Serial0
R4 has four E2 routes, all learned by OSPF via redistribution. Note that there is only one way for R4 to get to these four routes, and that is via R3. There’s no reason for R4 to have multiple external routes when a default route for these external routes will do the same thing; keeping the routing table concise yet complete cuts down on CPU and memory usage. Configuring Area 34 as a stub area will do this.
R3(config)#router ospf 1
R3(config-router)#area 34 stub
01:01:55: %OSPF-5-ADJCHG: Process 1, Nbr 4.4.4.4 on Serial1 from FULL to DOWN, Neighbor Down: Adjacency forced to reset
R4#conf t
R4(config)#router ospf 1
R4(config-router)#area 34 stub
R4#show ip ospf nei
Neighbor ID Pri State Dead Time Address Interface
172.12.123.3 1 FULL/ - 00:00:38 34.34.34.3 Serial0
The adjacency between R3 and R4 came down when Area 34 was configured as stub on R3. All routers in an area must agree that an area is stub. Once R4 was configured with area 34 stub, the adjacency came back.
What does R4’s routing table look like now?
R4#show ip route ospf
172.12.0.0/24 is subnetted, 1 subnets
O IA 172.12.123.0 [110/128] via 34.34.34.3, 00:03:47, Serial0
O*IA 0.0.0.0/0 [110/65] via 34.34.34.3, 00:03:47, Serial0
The multiple external routes have been replaced in the routing table with a default route, with R3 as the next-hop IP address. This allows for faster and more efficient routing while lessening the load on the router. With a stub area, OSPF inter-area routes are still in the routing table.
Using this default route, R4 has no problem pinging R5’s loopback addresses:
R4#ping 5.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 5.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 100/102/112 m
R4#ping 5.2.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 5.2.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 96/99/104 ms
R4#ping 5.3.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 5.3.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 96/100/104 ms
The OSPF area allows R4 to have complete network connectivity through the single default route, saving on the load on R4's CPU and memory.
To your success,
Chris Bryant
CCIE #12933
chris@thebryantadvantage.com
|