OSPF Stub area, Totally Stub area, NSSA, and Totally NSSA

OSPF uses two levels of hierarchy. On the top level, it keeps the backbone area. Apart from the backbone area, all areas are non-backbone areas. The backbone area is compulsory. Non-backbone areas are optional. We can implement them as per requirement. The router that connects an area with another area is called ABR.

With the default configuration, the ABR shares the detailed routing information. Sharing detailed routing information does not create any issues in small-sized networks. However, in big-sized networks, it decreases overall network performance.

All routers running within an area need to maintain the same routing information. Because of this, it is not possible to filter the routing update shared inside the area. However, routers do not need detailed information about the routes available outside the area. It allows administrators to summarize and filter routing information on ABR.

Based on how much information is summarized and filtered on ABR, we can classify OSPF areas into the following five types:-

  1. Regular area
  2. Stub area
  3. Totally stub area
  4. NSSA
  5. Totally NSSA

ospf area type

LSA Type 3 and LSA Type 5

OSPF Routers use LSAs to exchange routing information. An LSA is a portion of the routing information. It contains information about a specific link. There are seven types of LSAs . Apart from Type 3 and Type 5, all other LSAs are essentials. We can not filter them. We can filter only Type 3 and Type 5.

Type 3 LSAs describe routers, network links, and summary routes within the area and a default route. ABRs use Type 3 LSAs to exchange routing information between areas. Type 5 LSAs describe external routes.

ASBR (Autonomous System Boundary Router)

An ASBR advertises external routes in the OSPF. External routes are the routes redistributed into OSPF from any other protocol. An ASBR uses Type 5 LSAs to insert external routes in OSPF.

Regular area

A regular area does not filter any routing information. All non-backbone areas share their routing information with the backbone area. The backbone area distributes the received information from a non-backbone area to all other non-backbone areas.

Stub area

A stub area filters external routes. An ASBR inserts external routes in OSPF. A stub area does not support ASBRs. We can not configure an ASBR in a stub area. However, we can configure a default summary route (0.0.0.0) on ABR to reach external routes. Routers in a stub area learn only the routes available within the stub area. They use a default route configured on ABR to reach external routes.

Totally stub area

A Totally stub area is an extended version of the stub area. In addition to blocking Type 5 LSAs, it also blocks Type 3 LSAs. Similar to the stub area, it also does not support ASBR.

NSSA (Not-So-Stubby Area)

NSSA is the modified version of the stub area. A stub area does not allow ASBR. However, an NSSA area allows ASBR while maintaining all other properties of a stub area. You can use an NSSA to introduce external routes into a stub area without converting it into a standard OSPF area.

Since a stub area filters LSA type 5 and external routes use LSA type 5, NSSA routers convert Type 5 LSAs into Type 7 LSAs before inserting them into the stub area.

Totally NSSA

Totally NSSA is the modified version of the Totally stub area. It allows ASBR while maintaining all other properties of a Totally stub area. It uses the same concept as discussed in the case of NSSA. It converts Type 5 LSA into Type 7 LSA before advertising them.

OSPF stub area configuration

Create a practice lab and assign IP configuration, as shown in the following image.

ospf area lab

Download Packet Tracer LAB with IP configuration

Configure an OSPF process on all routers.

R1

Router>enable
Router(config)#router ospf 1
Router(config-router)#router-id 1.1.1.1
Router(config-router)#network 10.0.0.0 0.255.255.255 area 1
Router(config-router)#network 192.168.1.0 0.0.0.255 area 1
Router(config-router)#exit
Router(config)#exit
Router#

opsf configuration on r1

R2

Router>enable
Router#configure terminal
Router(config)#router ospf 1
Router(config-router)#router-id 2.2.2.2
Router(config-router)#network 192.168.1.0 0.0.0.3 area 1
Router(config-router)#network 192.168.1.4 0.0.0.3 area 0
Router(config-router)#exit
Router(config)#exit
Router#

ospf configuration on r2

R3

Router>enable
Router(config)#router ospf 1
Router(config-router)#router-id 3.3.3.3
Router(config-router)#network 192.168.1.0 0.0.0.255 area 0
Router(config-router)#exit
Router(config)#exit
Router#

opsf configuration on r3

R4

Router>enable
Router#configure terminal
Router(config)#router ospf 1
Router(config-router)#router-id 4.4.4.4
Router(config-router)#network 192.168.1.8 0.0.0.3 area 0
Router(config-router)#network 192.168.1.12 0.0.0.3 area 2
Router(config-router)#exit
Router(config)#exit
Router#

ospf configuration on r3

R5

Router>enable
Router#configure terminal
Router(config)#router ospf 1
Router(config-router)#router-id 5.5.5.5
Router(config-router)#network 20.0.0.0 0.255.255.255 area 2
Router(config-router)#network 192.168.1.0 0.0.0.255 area 2
Router(config-router)#exit
Router(config)#exit
Router#

ospf configuration on r5

Download Packet Tracer LAB with OSPF configuration

Configuring ASBR and Inserting an external route

OSPF filters external routes in the stub area. The router that inserts external routes in OSPF is called the ASBR router. We cannot configure an ASBR in a stub or Totally stub area. We can configure an ASBR router in a regular, NSSA, or Totally NSSA area.

In OSPF area implementation, area 0 always remains a regular area. Since we can not configure area 0 as the stub area, we can use it to configure an ASBR in our network.

We also need an external link that the ASBR can insert into OSPF. We can configure a loopback interface and use its network as the external link.

The following commands configure a loopback interface on R3.

Router#configure terminal
Router(config)#interface loopback 0
Router(config-if)#ip address 172.16.1.1 255.255.0.0
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#

configure loopback interface

The following commands insert the network available on the loopback interface into OSPF.

Router(config)#router ospf 1
Router(config-router)#redistribute connected subnets
Router(config-router)#exit

insert link in ospf

Download Packet Tracer LAB with loopback interface configuration

Verifying regular OSPF area

As mentioned earlier, by default, all OSPF areas are regular OSPF areas. OSPF does not filter any routing information in regular areas. The 'show ip route' command lists the routing table entries. We can use this command to verify the regular OSPF area.

The following image shows the output of this command on R1.

show ip route on r1

As the above output shows, the router is not filtering any routing information. It is getting information about external routes (LSA Type 5) and routes available in other OSPF areas (LSA Type 3) from ABR. It verifies the router is in a regular OSPF area.

The following image shows the output of this command on R5.

show ip route on r5

Converting a regular area into a stub area

The following command converts a regular area into a stub area.

Router(config-router)#area [targeted area] stub

We must run this command on all routers having interfaces in the targeted area. For example, if we want to convert area 1 into a stub area, we will run this command on R1 and R2.

R1
Router(config)#router ospf 1
Router(config-router)#area 1 stub
Router(config-router)#exit
Router(config)#

stub area config on r1

R2
Router(config)#router ospf 1
Router(config-router)#area 1 stub
Router(config-router)#exit
Router(config)#

stub area config on r2

Download Packet Tracer LAB with stub area configuration

Verifying stub area

ABR does not advertise external routes in the stub area. Instead of external links, it advertises a default route (0.0.0.0) to reach external links. We configured area 1 as the stub area. R1 is in area 1. We can view routing table entries on R1 to verify the stub area configuration. The routing table must not contain external links. It should have a default route to ABR.

The following image shows the output of the 'show ip route' command on R1.

show ip route

Totally stub area configuration

The following command configures a Totally stub area.

Router(config-router)#area [targeted area] stub no-summary

Similar to a stub area configuration, we need to run this command on all routers of the targeted area.

R1

Router(config)#router ospf 1
Router(config-router)#area 1 stub no-summary
Router(config-router)#exit
Router(config)

Totally stub area configuation

R2

Router(config)#router ospf 1
Router(config-router)#area 1 stub no-summary
Router(config-router)#exit
Router(config)

totally stub area configuration r2

Download Packet Tracer LAB with totally stub area configuration

Verifying Totally stub area configuration

ABR does not advertise external links (Type 5) and routes available within other OSPF areas (Type 3) in the Totally stub area. It advertises only a default route. We can view routing table entries again on R1 to verify the Totally stub area configuration.

verifying totally stub area configuration

We converted only area 1 into the stub area. Apart from area 1, all other areas are still regular areas. To verify this, you can view routing table entries on all routers. Apart from R1, all other routers should display all links.

ComputerNetworkingNotes CCNA Study Guide OSPF Stub area, Totally Stub area, NSSA, and Totally NSSA