Enhance your Career in Networking With IPinBits!!!​

STUB AREA

  • As we know now, STUB area is required to reduce the number of external LSA’s, in turn reduce the routing table within.
  • Stub area is an area in which the external type 5 LSA’s which are generated by ASBR do not propagate , to know more on LSA’s refer our LSA article.
  • So instead of having type 5 LSA within stub area, ABR will push a default route with next-hop as itself, so that all the internal routers within the Stub area can reach external routing domain.
  • In addition to LSA 5, it will also block LSA 4 as its router-id of External LSA to identify the ASBR for external routing domains
  • So Stub area blocks LSA 4, 5 both.

We will use the below lab topology throughout this Stub articles. Let’s concentrate on the Stub area only in this article, we will make area 1 as Stub and see how it looks.

  • R1-R2 are in area 1.
  • R2-R3 are in area 0 backbone area, R2-R3 are also the ABR’s.
  • R3-R4 are in area 2.
  • We have configured R5 as external routing domain, R5-R1 is configured as RIP.
  • All the routers have 4 loopbacks which will act as external prefixes, which we have configured as redistributed connected subnets ( OE2 Routes).
  • We will play with Area 1 throughout by configuring it as Stub , Totally Stub, NSSA, totally NSSA and see the behavior for each areas.
  • OSPF is only running on the Physical interfaces (i.e. Ethernet in this topology), loopbacks are behaving like external routes or inter area routes.

Let’s Lab it up and see the Stub area behavior. We will make Area 1 as Stub and see how ABR gives default route to area 2 in order to Reach R5 who is in external routing domain, which will be used in later articles on NSSA and Totally NSSA.

We will make area 1 as Stub in this topology, lets check the configuration.

Few things to note, as soon as we make area 1 as stub, the ospf neighborship breaks, it comes up only when both neighbors have same stub capabilities.

R1(config-if)#router ospf 1    
R1(config-router)#area 1 ?
  authentication  Enable authentication
  capability      Enable area specific capability
  default-cost    Set the summary default-cost of a NSSA/stub area
  filter-list     Filter networks between OSPF areas
  nssa            Specify a NSSA area
  range           Summarize routes matching address/mask (border routers only)
  sham-link       Define a sham link and its parameters
  stub            Specify a stub area
  virtual-link    Define a virtual link and its parameters

R1(config-router)#area 1 stub
R1(config-router)#area 1 stub 
R1(config-router)#
*Jan 17 08:05:36.062: %OSPF-4-ASBR_WITHOUT_VALID_AREA: Router is currently an ASBR while having only one area which is a stub area
R1(config-router)#
R1(config-router)#
*Jan 17 08:05:36.067: %OSPF-5-ADJCHG: Process 1, Nbr 23.23.23.23 on Ethernet0/0 from FULL to DOWN, Neighbor Down: Adjacency forced to reset
R1(config-router)#
*Jan 17 08:05:54.165: %OSPF-5-ADJCHG: Process 1, Nbr 23.23.23.23 on Ethernet0/0 from LOADING to FULL, Loading Done
R1(config-router)#

Also Debug verifies the above point 

sum:AFD auth:0
R1(config-router)#area 1 stub   
R1(config-router)#
*Jan 17 08:45:35.265: %OSPF-4-ASBR_WITHOUT_VALID_AREA: Router is currently an ASBR while having only one area which is a stub area
*Jan 17 08:45:35.270: %OSPF-5-ADJCHG: Process 1, Nbr 23.23.23.23 on Ethernet0/0 from FULL to DOWN, Neighbor Down: Adjacency forced to reset
R1(config-router)#
*Jan 17 08:45:35.889: OSPF-1 PAK  : Et0/0: OUT: 192.168.12.1->224.0.0.5: ver:2 type:1 len:44 rid:13.13.13.13 area:0.0.0.1 chksum:7DA auth:0
R1(config-router)#
*Jan 17 08:45:38.274: OSPF-1 PAK  : Et0/0:  IN: 192.168.12.2->224.0.0.5: ver:2 type:1 len:48 rid:23.23.23.23 area:0.0.0.1 chksum:AFD auth:0
R1(config-router)#exit

Lets checking the routing table before and after making area 1 as stub, along with packet capture.

Before making area 1 as stub.

R1#show ip route ospf 
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
       a - application route
       + - replicated route, % - next hop override

Gateway of last resort is not set

      20.0.0.0/24 is subnetted, 1 subnets
O E2     20.20.20.0 [110/20] via 192.168.12.2, 00:04:20, Ethernet0/0
      21.0.0.0/24 is subnetted, 1 subnets
O E2     21.21.21.0 [110/20] via 192.168.12.2, 00:04:20, Ethernet0/0
      22.0.0.0/24 is subnetted, 1 subnets
O E2     22.22.22.0 [110/20] via 192.168.12.2, 00:04:20, Ethernet0/0
      23.0.0.0/24 is subnetted, 1 subnets
O E2     23.23.23.0 [110/20] via 192.168.12.2, 00:04:20, Ethernet0/0
      40.0.0.0/24 is subnetted, 1 subnets
O E2     40.40.40.0 [110/20] via 192.168.12.2, 00:01:51, Ethernet0/0
      41.0.0.0/24 is subnetted, 1 subnets
O E2     41.41.41.0 [110/20] via 192.168.12.2, 00:01:51, Ethernet0/0
      42.0.0.0/24 is subnetted, 1 subnets
O E2     42.42.42.0 [110/20] via 192.168.12.2, 00:01:51, Ethernet0/0
      43.0.0.0/24 is subnetted, 1 subnets
O E2     43.43.43.0 [110/20] via 192.168.12.2, 00:01:51, Ethernet0/0
O IA  192.168.23.0/24 [110/20] via 192.168.12.2, 00:04:20, Ethernet0/0
O IA  192.168.34.0/24 [110/30] via 192.168.12.2, 00:02:53, Ethernet0/0
R1#

After making Area 1 as stub

1(config-router)#do 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
       a - application route
       + - replicated route, % - next hop override

Gateway of last resort is 192.168.12.2 to network 0.0.0.0

O*IA  0.0.0.0/0 [110/11] via 192.168.12.2, 00:03:00, Ethernet0/0
      1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        1.1.1.0/24 is directly connected, Loopback0
L        1.1.1.1/32 is directly connected, Loopback0
      10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        10.10.10.0/24 is directly connected, Loopback10
L        10.10.10.10/32 is directly connected, Loopback10
      11.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        11.11.11.0/24 is directly connected, Loopback11
L        11.11.11.11/32 is directly connected, Loopback11
      12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        12.12.12.0/24 is directly connected, Loopback12
L        12.12.12.12/32 is directly connected, Loopback12
      13.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        13.13.13.0/24 is directly connected, Loopback13
L        13.13.13.13/32 is directly connected, Loopback13
      192.168.12.0/24 is variably subnetted, 2 subnets, 2 masks
C        192.168.12.0/24 is directly connected, Ethernet0/0
L        192.168.12.1/32 is directly connected, Ethernet0/0
O IA  192.168.23.0/24 [110/20] via 192.168.12.2, 00:03:00, Ethernet0/0
O IA  192.168.34.0/24 [110/30] via 192.168.12.2, 00:03:00, Ethernet0/0
R1(config-router)#

So from the above output it is clear, as soon we make area 1 as stub, the external routers /Type 5 lsa’s are gone, and if you seen carefully there is one default route to reach those external prefixes, which is generated by the ABR, in this case it’s R2.

Same can be verified with the help of OSPF database as below.

Before making Area 1 stub, as you see LSA 3,4,5 are all injected into OSPF database, you can refer the LSA articles to know more in detail.

R1#show ip ospf database 

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

                Router Link States (Area 1)

Link ID         ADV Router      Age         Seq#       Checksum Link count
13.13.13.13     13.13.13.13     304         0x8000000B 0x008641 1
23.23.23.23     23.23.23.23     305         0x80000009 0x00A0D6 1

                Net Link States (Area 1)

Link ID         ADV Router      Age         Seq#       Checksum
192.168.12.2    23.23.23.23     305         0x80000007 0x00329D

                Summary Net Link States (Area 1)

Link ID         ADV Router      Age         Seq#       Checksum
192.168.23.0    23.23.23.23     312         0x80000005 0x0081D0
192.168.34.0    23.23.23.23     312         0x80000005 0x006CD0

                Summary ASB Link States (Area 1)

Link ID         ADV Router      Age         Seq#       Checksum
43.43.43.43     23.23.23.23     312         0x80000001 0x00CD51

                Type-5 AS External Link States

Link ID         ADV Router      Age         Seq#       Checksum Tag
1.1.1.0         13.13.13.13     316         0x80000001 0x003C2D 0
5.0.0.0         13.13.13.13     267         0x80000001 0x001F48 0
10.10.10.0      13.13.13.13     316         0x80000001 0x00F657 0
11.11.11.0      13.13.13.13     316         0x80000001 0x00D278 0
12.12.12.0      13.13.13.13     316         0x80000001 0x00AE99 0
13.13.13.0      13.13.13.13     316         0x80000001 0x008ABA 0
20.20.20.0      23.23.23.23     616         0x80000002 0x005EA8 0
21.21.21.0      23.23.23.23     616         0x80000002 0x003AC9 0
22.22.22.0      23.23.23.23     616         0x80000002 0x0016EA 0
23.23.23.0      23.23.23.23     616         0x80000002 0x00F10C 0
40.40.40.0      43.43.43.43     487         0x80000002 0x003149 0
41.41.41.0      43.43.43.43     487         0x80000002 0x000D6A 0
42.42.42.0      43.43.43.43     487         0x80000002 0x00E88B 0
43.43.43.0      43.43.43.43     487         0x80000002 0x00C4AC 0
51.51.51.0      13.13.13.13     316         0x80000001 0x002DA5 0
R1#

Before Making Area 1 as stub

R3#show ip ospf database 

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

                Router Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum Link count
23.23.23.23     23.23.23.23     726         0x80000003 0x0087E1 1
33.33.33.33     33.33.33.33     722         0x80000002 0x009684 1

                Net Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum
192.168.23.1    23.23.23.23     726         0x80000001 0x00BAC0

                Summary Net Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum
192.168.12.0    23.23.23.23     806         0x80000001 0x00035E
192.168.34.0    33.33.33.33     727         0x80000001 0x00E240

                Summary ASB Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum
13.13.13.13     23.23.23.23     6           0x80000001 0x00D2CE
43.43.43.43     33.33.33.33     664         0x80000001 0x003CC4

                Router Link States (Area 2)

Link ID         ADV Router      Age         Seq#       Checksum Link count
33.33.33.33     33.33.33.33     669         0x80000003 0x00798B 1
43.43.43.43     43.43.43.43     665         0x80000002 0x009122 1

                Net Link States (Area 2)

Link ID         ADV Router      Age         Seq#       Checksum
192.168.34.1    33.33.33.33     669         0x80000001 0x005F98

                Summary Net Link States (Area 2)

Link ID         ADV Router      Age         Seq#       Checksum
192.168.12.0    33.33.33.33     719         0x80000001 0x003AF4
192.168.23.0    33.33.33.33     719         0x80000001 0x005CD1

                Summary ASB Link States (Area 2)

Link ID         ADV Router      Age         Seq#       Checksum
13.13.13.13     33.33.33.33     5           0x80000001 0x000A65
23.23.23.23     33.33.33.33     719         0x80000001 0x00D779

                Type-5 AS External Link States

Link ID         ADV Router      Age         Seq#       Checksum Tag
1.1.1.0         13.13.13.13     19          0x80000001 0x003C2D 0
10.10.10.0      13.13.13.13     19          0x80000001 0x00F657 0
11.11.11.0      13.13.13.13     19          0x80000001 0x00D278 0
12.12.12.0      13.13.13.13     19          0x80000001 0x00AE99 0
13.13.13.0      13.13.13.13     19          0x80000001 0x008ABA 0
20.20.20.0      23.23.23.23     820         0x80000001 0x0060A7 0
21.21.21.0      23.23.23.23     820         0x80000001 0x003CC8 0
22.22.22.0      23.23.23.23     820         0x80000001 0x0018E9 0
23.23.23.0      23.23.23.23     820         0x80000001 0x00F30B 0
40.40.40.0      43.43.43.43     668         0x80000001 0x003348 0
41.41.41.0      43.43.43.43     668         0x80000001 0x000F69 0
42.42.42.0      43.43.43.43     668         0x80000001 0x00EA8A 0
43.43.43.0      43.43.43.43     668         0x80000001 0x00C6AB 0
R3#

Area 1 as Stub, no external LSA present, which verifies our above theory of Stub.
R1#show ip ospf database 

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

                Router Link States (Area 1)

Link ID         ADV Router      Age         Seq#       Checksum Link count
13.13.13.13     13.13.13.13     16          0x80000009 0x00A22B 1
23.23.23.23     23.23.23.23     17          0x80000007 0x00BCC0 1

                Net Link States (Area 1)

Link ID         ADV Router      Age         Seq#       Checksum
192.168.12.2    23.23.23.23     17          0x80000005 0x00547F

                Summary Net Link States (Area 1)

Link ID         ADV Router      Age         Seq#       Checksum
0.0.0.0         23.23.23.23     24          0x80000001 0x00FCE4
192.168.23.0    23.23.23.23     24          0x80000004 0x00A1B3
192.168.34.0    23.23.23.23     24          0x80000004 0x008CB3
R1#

As you can see the LSA 4, 5 both are removed from the database after making area 1 as stub. This clears Stub area blocks LSA 4, 5.

I hope this has been informative to you and seen you in the next article !!!

Related blog posts