What is stub area?

A network of small locations is considered a stub area. By making the OSPF area a stub area, LSAs about outside the area are summarized. This reduces the number of LSAs flowing into the area. There are the following types of stub areas

  • Normal stub
  • Totally stub
  • NSSA(Not So Stubby Area)
  • Totally NSA

Ciscoルータでのこれらのスタブエリアの設定と確認コマンドについて解説します。

Configuring and Verifying Normal Stub Area

To configure the area as a normal stub area, enter the following command in OSPF configuration mode.

Configuring stub area(config)#router ospf <process-id>
(config-router)#area <area-id> stub

<process-id> : process ID
<area-id> : area ID

It must be configured on all routers that belong to the stub area. The stub area configuration must match in order to become a neighbor. If the stub area configuration is mismatched, it is impossible to become a neighbor, so please configure it on all routers in the stub area.

To verify the normal stub area, use the following show command.

show commandSummary
#show ip ospfDisplays information about OSPF overview.
#show ip ospf databaseDisplays an overview of OSPF LSDB.

In the later part of the show ip ospf command, you can see that the area is configured as a normal stub area. The ABR for the stub area will also show that a default route is generated.

R21#show ip ospf
 Routing Process "ospf 1" with ID 21.21.21.21
~省略~
    Area BACKBONE(0)
        Number of interfaces in this area is 1
        Area has no authentication
        SPF algorithm last executed 00:00:35.112 ago
        SPF algorithm executed 6 times
        Area ranges are
        Number of LSA 19. Checksum Sum 0x08FB3D
        Number of opaque link LSA 0. Checksum Sum 0x000000
        Number of DCbitless LSA 0
        Number of indication LSA 0
        Number of DoNotAge LSA 0
        Flood list length 0
    Area 2
        Number of interfaces in this area is 1
        It is a stub area
          generates stub default route with cost 1
        Area has no authentication
        SPF algorithm last executed 00:00:20.092 ago
        SPF algorithm executed 7 times
        Area ranges are
        Number of LSA 13. Checksum Sum 0x05C824
        Number of opaque link LSA 0. Checksum Sum 0x000000
        Number of DCbitless LSA 0
        Number of indication LSA 0
        Number of DoNotAge LSA 0
        Flood list length 0

Also, if you look at the LSDB summary in the show ip ospf database command, you will see that there is no LSA Type 4 and LSA Type 5 in the LSDB. And there is an LSA Type 3 which represents the default route “0.0.0.0/0”.

R22#show ip ospf database

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

                Router Link States (Area 2)

Link ID         ADV Router      Age         Seq#       Checksum Link count
21.21.21.21     21.21.21.21     109         0x80000005 0x004FD3 1
22.22.22.22     22.22.22.22     104         0x80000005 0x00AF4D 2

                Net Link States (Area 2)

Link ID         ADV Router      Age         Seq#       Checksum
10.2.12.22      22.22.22.22     104         0x80000003 0x0034D2

                Summary Net Link States (Area 2)

Link ID         ADV Router      Age         Seq#       Checksum
0.0.0.0         21.21.21.21     118         0x80000001 0x0039B0
10.0.0.0        21.21.21.21     118         0x80000003 0x000DC7
10.1.1.0        21.21.21.21     118         0x80000002 0x006662
10.1.12.0       21.21.21.21     118         0x80000002 0x00E2DB
10.3.1.0        21.21.21.21     118         0x80000002 0x004E78
10.3.12.0       21.21.21.21     118         0x80000002 0x00CAF1
10.4.1.0        21.21.21.21     118         0x80000002 0x004283
10.4.12.0       21.21.21.21     121         0x80000002 0x00BEFC
10.5.1.0        21.21.21.21     121         0x80000002 0x00368E
10.5.12.0       21.21.21.21     121         0x80000002 0x00B208

Configuring and Verifying Totally Stub Area

Totally stub configuration is a prerequisite for normal stub configuration. Please configure all OSPF routers in the Totally Stub area as normal stub. Then, enter the following command in the ABR.

Configuring Totally Stub Area(config)#router ospf <process-id>
(config-router)#area <area-id> stub no-summary

<process-id> : process ID
<area-id> : area ID

The no-summary option filters out LSA Type 3 that describes individual network addresses outside the area and generates LSA Type 3 that describes the default route 0.0.0.0/0.

The show command for verifying the configuration of the Totally Stub area is the same as the following command for verifying the normal stub.

show commandSummary
#show ip ospfDisplays information about OSPF overview.
#show ip ospf databaseDisplays an overview of OSPF LSDB.

If you look at the show ip ospf command in the ABR in the Totally Stub area, you can see that it is filtering LSA Type 3.

R31#show ip ospf
 Routing Process "ospf 1" with ID 31.31.31.31
~省略~
    Area BACKBONE(0)
        Number of interfaces in this area is 1
        Area has no authentication
        SPF algorithm last executed 00:00:26.916 ago
        SPF algorithm executed 6 times
        Area ranges are
        Number of LSA 19. Checksum Sum 0x08FB3D
        Number of opaque link LSA 0. Checksum Sum 0x000000
        Number of DCbitless LSA 0
        Number of indication LSA 0
        Number of DoNotAge LSA 0
        Flood list length 0
    Area 3
        Number of interfaces in this area is 1
        It is a stub area, no summary LSA in this area
          generates stub default route with cost 1
        Area has no authentication
        SPF algorithm last executed 00:00:11.904 ago
        SPF algorithm executed 7 times
        Area ranges are
        Number of LSA 4. Checksum Sum 0x021283
        Number of opaque link LSA 0. Checksum Sum 0x000000
        Number of DCbitless LSA 0
        Number of indication LSA 0
        Number of DoNotAge LSA 0
        Flood list length 0

And there is no LSA Type4/5 in the LSDB. Furthermore, only LSA Type 3, which describes the default route 0.0.0.0/0, is registered as LSA Type 3.

R32#show ip ospf database

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

                Router Link States (Area 3)

Link ID         ADV Router      Age         Seq#       Checksum Link count
31.31.31.31     31.31.31.31     88          0x80000005 0x005963 1
32.32.32.32     32.32.32.32     87          0x80000005 0x00CACA 2

                Net Link States (Area 3)

Link ID         ADV Router      Age         Seq#       Checksum
10.3.12.32      32.32.32.32     87          0x80000003 0x00E1A1

                Summary Net Link States (Area 3)

Link ID         ADV Router      Age         Seq#       Checksum
0.0.0.0         31.31.31.31     102         0x80000001 0x000CB5

Configuring and Verifying NSSA

To configure NSSA, enter the following command in OSPF configuration mode.

Configuring NSSA(config)#router ospf <process-id>
(config-router)#area <area-id> nssa

<process-id> : process ID
<area-id> : area ID

As in the case of the normal stub area, please configure this on all OSPF routers in the NSSA.

Also, unlike other stub area ABRs, NSSA’s ABR does not automatically generate a default route. Enter the following command on the router where you want to generate the default route in the NSSA.

Generate a default route in NSSA(config)#router ospf <process-id>
(config-router)#area <area-id> nssa default-information-originate

<process-id> : process ID
<area-id> : area ID

This command will generate the default route 0.0.0.0/0 with the LSA Type 7.

The following commands are listed as show commands for verifying NSSA, as well as normal stubs and Totally Stubs.

show commandSummary
#show ip ospfDisplays information about OSPF overview.
#show ip ospf databaseDisplays an overview of OSPF LSDB.

show ip ospfコマンドで、エリアがNSSAとなっていることがわかります。NSSAのABRはLSA Type7からLSA Type5の変換を行うこともわかります。また、area nssa default-information-originateコマンドを入力していると、そのことも表示されます。

R41#show ip ospf
 Routing Process "ospf 1" with ID 41.41.41.41
~省略~
    Area BACKBONE(0)
        Number of interfaces in this area is 1
        Area has no authentication
        SPF algorithm last executed 00:00:22.144 ago
        SPF algorithm executed 7 times
        Area ranges are
        Number of LSA 18. Checksum Sum 0x0885CB
        Number of opaque link LSA 0. Checksum Sum 0x000000
        Number of DCbitless LSA 0
        Number of indication LSA 0
        Number of DoNotAge LSA 0
        Flood list length 1
    Area 4
        Number of interfaces in this area is 1
        It is a NSSA area
        Perform type-7/type-5 LSA translation
        generates NSSA default route with cost 1
        Area has no authentication
        SPF algorithm last executed 00:00:02.148 ago
        SPF algorithm executed 8 times
        Area ranges are
        Number of LSA 14. Checksum Sum 0x06A18E
        Number of opaque link LSA 0. Checksum Sum 0x000000
        Number of DCbitless LSA 0
        Number of indication LSA 0
        Number of DoNotAge LSA 0
        Flood list length 0

And if you look at the LSDB summary with the show ip ospf database command, you will see that there is no LSA Type 4/Type 5, and LSA Type 7, which describes routes in non-OSPF domains beyond the NSSA, is registered.

R42#show ip ospf database

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

                Router Link States (Area 4)

Link ID         ADV Router      Age         Seq#       Checksum Link count
41.41.41.41     41.41.41.41     91          0x80000005 0x00F05B 1
42.42.42.42     42.42.42.42     88          0x80000005 0x0073B0 2

                Net Link States (Area 4)

Link ID         ADV Router      Age         Seq#       Checksum
10.4.12.42      42.42.42.42     88          0x80000003 0x0017E0

                Summary Net Link States (Area 4)

Link ID         ADV Router      Age         Seq#       Checksum
10.0.0.0        41.41.41.41     106         0x80000003 0x003A42
10.1.1.0        41.41.41.41     106         0x80000002 0x0093DC
10.1.12.0       41.41.41.41     106         0x80000002 0x001056
10.2.1.0        41.41.41.41     106         0x80000002 0x0087E7
10.2.12.0       41.41.41.41     106         0x80000002 0x000461
10.3.1.0        41.41.41.41     106         0x80000002 0x007BF2
10.3.12.0       41.41.41.41     106         0x80000002 0x00F76C
10.5.1.0        41.41.41.41     108         0x80000002 0x006309
10.5.12.0       41.41.41.41     108         0x80000002 0x00DF82

                Type-7 AS External Link States (Area 4)

Link ID         ADV Router      Age         Seq#       Checksum Tag
0.0.0.0         41.41.41.41     108         0x80000001 0x003AD2 0
172.17.0.0      42.42.42.42     95          0x80000001 0x00CA2C 0

Configuring and Verifying Totally NSSA

Totally NSSA is based on the prerequisite that NSSA has been configured. After that, enter the following command in the ABR of Totally NSSA.

Configuring Totally NSSA(config)#router ospf <process-id>
(config-router)#area <area-id> nssa no-summary

<process-id> : process ID
<area-id> : area ID

The ABR of the Totally NSSA automatically generates an LSA Type 3 describing the default route 0.0.0.0/0.

The show command to verify the Totally NSSA is also the same as the previous one.

show commandSummary
#show ip ospfDisplays information about OSPF overview.
#show ip ospf databaseDisplays an overview of OSPF LSDB.

If you look at the show ip ospf command on the Totally NSSA router, you will see that the area is NSSA.

R51#show ip ospf
 Routing Process "ospf 1" with ID 51.51.51.51
~省略~
    Area BACKBONE(0)
        Number of interfaces in this area is 1
        Area has no authentication
        SPF algorithm last executed 00:07:34.188 ago
        SPF algorithm executed 7 times
        Area ranges are
        Number of LSA 17. Checksum Sum 0x080BAE
        Number of opaque link LSA 0. Checksum Sum 0x000000
        Number of DCbitless LSA 0
        Number of indication LSA 0
        Number of DoNotAge LSA 0
        Flood list length 0
    Area 5
        Number of interfaces in this area is 1
        It is a NSSA area
        Perform type-7/type-5 LSA translation
        Area has no authentication
        SPF algorithm last executed 00:07:11.992 ago
        SPF algorithm executed 7 times
        Area ranges are
        Number of LSA 5. Checksum Sum 0x02B18F
        Number of opaque link LSA 0. Checksum Sum 0x000000
        Number of DCbitless LSA 0
        Number of indication LSA 0
        Number of DoNotAge LSA 0
        Flood list length 0

Also, if you look at the show ip ospf database command, there is only one LSA Type3 that describes the default route 0.0.0.0/0 as well as the Totally stub. And there is an LSA Type 7 that describes a non-OSPF domain network beyond the Totally NSSA.

R52#show ip ospf database

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

                Router Link States (Area 5)

Link ID         ADV Router      Age         Seq#       Checksum Link count
51.51.51.51     51.51.51.51     521         0x80000005 0x00FAEA 1
52.52.52.52     52.52.52.52     520         0x80000005 0x008E2E 2

                Net Link States (Area 5)

Link ID         ADV Router      Age         Seq#       Checksum
10.5.12.52      52.52.52.52     520         0x80000003 0x00C4AF

                Summary Net Link States (Area 5)

Link ID         ADV Router      Age         Seq#       Checksum
0.0.0.0         51.51.51.51     544         0x80000001 0x003930

                Type-7 AS External Link States (Area 5)

Link ID         ADV Router      Age         Seq#       Checksum Tag
172.18.0.0      52.52.52.52     525         0x80000001 0x002A98 0

Related articles

How the OSPF works