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

This tutorial explains how to configure, test, and verify OSPF areas, Stub area, and Totally Stubby area. It utilizes Packet Tracer network simulator software to explain the concepts and configurations of these area types.

OSPF areas

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. You can implement them according to the requirements.

ABR

The router that connects an area with another area is called an ABR. With the default configuration, the ABR shares the detailed routing information. It does not create any issues in small-sized networks. However, in large networks, it can significantly decrease overall network performance.

All routers operating within an area must maintain the same routing information. Because of this, it is not possible to filter the routing update shared inside the area. However, they do not need detailed information about the routes available outside the area. It allows you to summarize and filter routing information on ABR. Based on how much information is summarized and filtered on ABR, you can classify OSPF areas into the following five types:-

  1. Regular area
  2. Stub area
  3. Totally stub (or stubby) area
  4. NSSA
  5. Totally NSSA

OSPF area types

LSAs

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 essential. 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 OSPF. External routes are the routes redistributed into OSPF from other protocols. 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. You cannot configure an ASBR in a stub area. However, you 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 the ABR to reach external routes.

Totally stubby area

A totally stubby 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 stubby area. It allows ASBR while maintaining all other properties of a totally stubby 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 an IP configuration as shown in the following image.

OSPF area lab

Download Packet Tracer LAB with IP configuration.

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#

OSPF 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#

OSPF 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 R4

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. You cannot configure an ASBR in a stub or totally stubby area. You 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 you cannot configure area 0 as the stub area, you can use it to configure an ASBR. You also need an external link that the ASBR can insert into OSPF. You 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)#

Configuring the 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

Inserting a link in OSPF

Download Packet Tracer LAB with loopback interface configuration.

Verifying the 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. Use this command to verify the regular OSPF area. The following image shows the output of this command on R1.

The show ip route command 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 the ABR. It verifies the router is in a regular OSPF area. The following image shows the output of this command on R5.

The show ip route command 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

Run this command on all routers having interfaces in the targeted area. For example, if you want to convert area 1 into a stub area, 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 configuration on R1

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

stub area configuration on R2

Download Packet Tracer LAB with stub area configuration.

Verifying the 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. You configured area 1 as the stub area. R1 is in area 1. You 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.

The show ip route command on R1

Totally stubby area configuration

The following command configures a Totally stubby area.

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

Similar to a stub area configuration, you must 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 configuration on R1

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

Totally stub area configuration on R2

Download Packet Tracer LAB with a totally stubby area configuration.

Verifying the totally stubby area configuration

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

Verifying the totally stub area configuration

You 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. The following image shows routing entries on R5.

The show ip route command on R5

Conclusion

Unlike a flat network layout, where all routers share all routing information, OSPF supports a hierarchical network layout. In it, routers share complete routing information only within the same level. With other levels, they share summarized routing information. It enhances network performance and accelerates the sharing process.

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

We do not accept any kind of Guest Post. Except Guest post submission, for any other query (such as adverting opportunity, product advertisement, feedback, suggestion, error reporting and technical issue) or simply just say to hello mail us ComputerNetworkingNotes@gmail.com