OSPF Stub Area

In this post I will explain OSPF stub area types and the impact this will have on the routing table / OSPF database. Below is the diagram I will use in this post :

OSPF Stub Stub No-Summary


Below the configuration for OSPF on the routers with which we will start.

OSPF Configurations :


Router 1 : 

router ospf 1
router-id 1.1.1.1
log-adjacency-changes
redistribute connected subnets route-map CONNECTED
network 172.16.15.1 0.0.0.0 area 51
!
route-map CONNECTED permit 10
 match interface FastEthernet3/0
!
interface FastEthernet3/0
 ip address 172.20.1.1 255.255.255.0
 duplex auto
 speed auto
end

Router 5 :

router ospf 1
 router-id 5.5.5.5
 log-adjacency-changes
 network 10.1.35.5 0.0.0.0 area 0
 network 172.16.15.5 0.0.0.0 area 51

Router 3 :

router ospf 1
 router-id 3.3.3.3
 log-adjacency-changes
 network 10.1.34.3 0.0.0.0 area 0
 network 10.1.35.3 0.0.0.0 area 0

Router 4 :

router ospf 1
 router-id 4.4.4.4
 log-adjacency-changes
 network 10.1.34.4 0.0.0.0 area 0
 network 192.168.14.4 0.0.0.0 area 2

Router 2 :

router ospf 1
 router-id 2.2.2.2
 log-adjacency-changes
 network 192.168.14.2 0.0.0.0 area 2
    

Let’s take a look at the routing table and the OSPF database of Router R2 since this will be the area we will make stub (and stub no-summary in the next post).

R2 :


R2#sh ip route
Codes: 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

Gateway of last resort is not set

     2.0.0.0/32 is subnetted, 1 subnets
C       2.2.2.2 is directly connected, Loopback0
C    192.168.14.0/24 is directly connected, FastEthernet2/0
     172.16.0.0/24 is subnetted, 1 subnets
O IA    172.16.15.0 [110/4] via 192.168.14.4, 00:52:10, FastEthernet2/0
     172.20.0.0/24 is subnetted, 1 subnets
O E2    172.20.1.0 [110/20] via 192.168.14.4, 00:52:00, FastEthernet2/0
     10.0.0.0/24 is subnetted, 2 subnets
O IA    10.1.35.0 [110/3] via 192.168.14.4, 00:52:10, FastEthernet2/0
O IA    10.1.34.0 [110/2] via 192.168.14.4, 00:52:10, FastEthernet2/0

R2#sh ip ospf database

            OSPF Router with ID (2.2.2.2) (Process ID 1)

                Router Link States (Area 2) <-- LSA type 1

Link ID         ADV Router      Age         Seq#       Checksum Link count
2.2.2.2         2.2.2.2         1252        0x80000003 0x0083A8 1
4.4.4.4         4.4.4.4         1243        0x80000003 0x000A0F 1

                Net Link States (Area 2) <-- LSA type 2

Link ID         ADV Router      Age         Seq#       Checksum
192.168.14.4    4.4.4.4         1243        0x80000002 0x009DF7

                Summary Net Link States (Area 2) <-- LSA type 3

Link ID         ADV Router      Age         Seq#       Checksum
10.1.34.0       4.4.4.4         1243        0x80000004 0x000FEC
10.1.35.0       4.4.4.4         1243        0x80000002 0x0012E9
172.16.15.0     4.4.4.4         1243        0x80000002 0x00025B

                Summary ASB Link States (Area 2) <-- LSA type 4

Link ID         ADV Router      Age         Seq#       Checksum
1.1.1.1         4.4.4.4         1243        0x80000002 0x00F033

                Type-5 AS External Link States <-- LSA type 5

Link ID         ADV Router      Age         Seq#       Checksum Tag
172.20.1.0      1.1.1.1         1238        0x80000002 0x0007D2 0
    

As you can see there are Inter-Area routes (IA) and External E2 routes (External E2 - these are the redistributed routes into OSPF on router R1) in the routing table.

In the OSPF database you can see LSA types 1,2,3,4 and 5. Now let’s change Area 2 into a Stub area and see what it will do to the routing table and the OSPF database.

R2 & R4 :


R4(config)#router ospf 1
R4(config-router)#area 2 stub

R2(config)#router ospf 1
R2(config-router)#area 2 stub
    

OSPF Stub Stub No-Summary

R2 :



R2#sh ip route
Codes: 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

Gateway of last resort is 192.168.14.4 to network 0.0.0.0

     2.0.0.0/32 is subnetted, 1 subnets
C       2.2.2.2 is directly connected, Loopback0
C    192.168.14.0/24 is directly connected, FastEthernet2/0
     172.16.0.0/24 is subnetted, 1 subnets
O IA    172.16.15.0 [110/4] via 192.168.14.4, 00:01:59, FastEthernet2/0
     10.0.0.0/24 is subnetted, 2 subnets
O IA    10.1.35.0 [110/3] via 192.168.14.4, 00:01:59, FastEthernet2/0
O IA    10.1.34.0 [110/2] via 192.168.14.4, 00:01:59, FastEthernet2/0
O*IA 0.0.0.0/0 [110/2] via 192.168.14.4, 00:01:59, FastEthernet2/0

R2#sh ip ospf database

            OSPF Router with ID (2.2.2.2) (Process ID 1)

                Router Link States (Area 2) <-- LSA type 1

Link ID         ADV Router      Age         Seq#       Checksum Link count
2.2.2.2         2.2.2.2         136         0x80000005 0x009D8E 1
4.4.4.4         4.4.4.4         136         0x80000005 0x0024F4 1

                Net Link States (Area 2) <-- LSA type 2

Link ID         ADV Router      Age         Seq#       Checksum
192.168.14.4    4.4.4.4         132         0x80000004 0x00B7DD

                Summary Net Link States (Area 2) <-- LSA type 3

Link ID         ADV Router      Age         Seq#       Checksum
0.0.0.0         4.4.4.4         154         0x80000001 0x0039F4
10.1.34.0       4.4.4.4         154         0x80000005 0x002BD1
10.1.35.0       4.4.4.4         154         0x80000003 0x002ECE
172.16.15.0     4.4.4.4         154         0x80000003 0x001E40
    

In the routing table you can see that the External E2 route is gone, in the OSPF database you can also see the type 4 and 5 LSA’s are gone. So looking at the routing table and the OSPF database we can now state that a stub area blocks type 5 LSA’s and therefore make the type 4 LSA’s unnecessary, the type 5 LSA’s are replaced with a default route. It does allow type 3 lsa’s.

In the next post I will write about stub no-summary area’s and show the impact on the routing-table and OSPF database.

Leave a comment

Your comment