OSPF IPv4 - Stub

Stub

In OSPF (Open Shortest Path First) for IPv4, a Stub Area is a designated OSPF area that aims to reduce the complexity of routing information within the Autonomous System (AS). In a Stub Area, routers do not receive detailed external route information; instead, they receive only a default route from the Area Border Router (ABR). This default route serves as a summary for all routes outside the OSPF domain, simplifying the routing tables and enhancing scalability. OSPF Stub Areas are useful in situations where routers within the area do not need to know the specific details of external routes, leading to more efficient network operations. The use of Stub Areas helps optimize OSPF routing in larger networks by minimizing the amount of routing information exchanged within the area while still enabling routers within the area to reach destinations outside the OSPF domain through the default route.

Lab:

Disclaimer

This Configuration Guide is designed to assist members to enhance their skills in particular technology area. While every effort has been made to ensure that all material is as complete and accurate as possible, the enclosed material is presented on an Dzas isdz basis. Neither the authors nor Forum assume any liability or responsibility to any person or entity with respect to loss or damages incurred from the information contained in this guide. This configuration guide was developed by Forum. Any similarities between material presented in this configuration guide and any other material is completely coincidental.

Cisco IOS Software, Linux Software (I86BI_LINUX-ADVENTERPRISEK9-M), Version 15.2(4)M1, DEVELOPMENT TEST SOFTWARE

Task 1: Configure OSPF Stub

Step 1: In the configuration mode of router configure loopbacks with network address in sequence & redistribute these connected network in OSPF process

R2:
interface loop100
ip address 100.0.0.2 255.255.255.0
interface loop101
ip address 100.0.1.2 255.255.255.0
interface loop102
ip address 100.0.2.2 255.255.255.0
interface loop103
ip address 100.0.3.2 255.255.255.0
exit
R2:
router ospf 2
redistribute connected subnet metric-type 1
exit
R1#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - OSPF, EX - OSPF external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       + - replicated route, % - next hop override

Gateway of last resort is not set

            11.0.0.0/32 is subnetted, 3 subnets
C        11.0.0.0/24 is directly connected, Loopback0
L        11.0.0.1/32 is directly connected, Loopback0
C        11.0.1.0/24 is directly connected, Loopback1
L        11.0.1.1/32 is directly connected, Loopback1
C        11.0.2.0/24 is directly connected, Loopback2
L        11.0.2.1/32 is directly connected, Loopback2
C        11.0.3.0/24 is directly connected, Loopback3
L        11.0.3.1/32 is directly connected, Loopback3
      12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        12.0.0.0/24 is directly connected, Serial2/0
L        12.0.0.1/32 is directly connected, Serial2/0
      22.0.0.0/22 is subnetted, 1 subnets
O IA     22.0.0.0 [110/65] via 12.0.0.2, 00:33:04, Serial2/0
      23.0.0.0/24 is subnetted, 1 subnets
O IA     23.0.0.0 [110/74] via 12.0.0.2, 02:05:41, Serial2/0
      33.0.0.0/32 is subnetted, 3 subnets
O IA     33.0.1.3 [110/75] via 12.0.0.2, 02:05:41, Serial2/0
O IA     33.0.2.3 [110/75] via 12.0.0.2, 02:05:41, Serial2/0
O IA     33.0.3.3 [110/75] via 12.0.0.2, 02:05:41, Serial2/0
      34.0.0.0/24 is subnetted, 1 subnets
O IA     34.0.0.0 [110/138] via 12.0.0.2, 02:05:41, Serial2/0
      44.0.0.0/32 is subnetted, 3 subnets
O IA     44.0.1.4 [110/139] via 12.0.0.2, 02:05:41, Serial2/0
O IA     44.0.2.4 [110/139] via 12.0.0.2, 02:05:41, Serial2/0
O IA     44.0.3.4 [110/139] via 12.0.0.2, 02:05:41, Serial2/0
      100.0.0.0/24 is subnetted, 4 subnets
O E1     100.0.0.0 [110/84] via 12.0.0.2, 00:00:16, Serial2/0
O E1     100.0.1.0 [110/84] via 12.0.0.2, 00:00:16, Serial2/0
O E1     100.0.2.0 [110/84] via 12.0.0.2, 00:00:16, Serial2/0
O E1     100.0.3.0 [110/84] via 12.0.0.2, 00:00:16, Serial2/0

Step 2: Configure OSPF Stub

R2:
router ospf 2
area 1 stub
exit
R1:
router ospf 1
area 1 stub
exit

Task 2: Verification:

Step 1: Verify routes on neighbor router routing table

R1#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       + - replicated route, % - next hop override

Gateway of last resort is 12.0.0.2 to network 0.0.0.0

O*IA  0.0.0.0/0 [110/65] via 12.0.0.2, 00:04:14, Serial2/0
      11.0.0.0/32 is subnetted, 3 subnets
C        11.0.0.0/24 is directly connected, Loopback0
L        11.0.0.1/32 is directly connected, Loopback0
C        11.0.1.0/24 is directly connected, Loopback1
L        11.0.1.1/32 is directly connected, Loopback1
C        11.0.2.0/24 is directly connected, Loopback2
L        11.0.2.1/32 is directly connected, Loopback2
C        11.0.3.0/24 is directly connected, Loopback3
L        11.0.3.1/32 is directly connected, Loopback3
      12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        12.0.0.0/24 is directly connected, Serial2/0
L        12.0.0.1/32 is directly connected, Serial2/0
      22.0.0.0/22 is subnetted, 1 subnets
O IA     22.0.0.0 [110/65] via 12.0.0.2, 00:04:14, Serial2/0
      23.0.0.0/24 is subnetted, 1 subnets
O IA     23.0.0.0 [110/74] via 12.0.0.2, 00:04:14, Serial2/0
      33.0.0.0/32 is subnetted, 3 subnets
O IA     33.0.1.3 [110/75] via 12.0.0.2, 00:04:14, Serial2/0
O IA     33.0.2.3 [110/75] via 12.0.0.2, 00:04:14, Serial2/0
O IA     33.0.3.3 [110/75] via 12.0.0.2, 00:04:14, Serial2/0
      34.0.0.0/24 is subnetted, 1 subnets
O IA     34.0.0.0 [110/138] via 12.0.0.2, 00:04:14, Serial2/0
      44.0.0.0/32 is subnetted, 3 subnets
O IA     44.0.1.4 [110/139] via 12.0.0.2, 00:04:14, Serial2/0
O IA     44.0.2.4 [110/139] via 12.0.0.2, 00:04:14, Serial2/0
O IA     44.0.3.4 [110/139] via 12.0.0.2, 00:04:14, Serial2/0

Stub area is area in which external routes LSA 5 does not propagate, instead it automatically creates default route 0.0.0.0 towards ABR.

R1#ping 100.0.1.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 100.0.1.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/8/9 ms