Christmas Offer - Every Learner Must Check Out - Flat 88% OFF on All Access Pass
00
days
:
00
hours
:
00
minutes
:
00
seconds
PyNet Labs- Network Automation Specialists

What is OSPF Stub Area and its Types?

Author : PyNet Labs
Last Modified: April 11, 2024 
A blog featured image with text What is OSPF Stub Area and an image of OSPF Stub Area topology

Introduction

OSPF, also known as Open Shortest Path First, is a routing protocol that utilizes link state information to determine the efficient paths between routers within a network. OSPF divides networks into units called areas, which are logical groupings of OSPF networks, routers, and links that share the same area identification. One advantage of utilizing areas is that they restrict the distribution of route information.

This helps in reducing the size of the link state database (LSDB) and the number of SPF (Shortest Path First) calculations required by each router. It’s not necessary for all areas to possess a level of knowledge about network topology. Certain areas can be configured as types known as OSPF stub areas. These stub areas exclude types of LSAs (link state advertisements), and in place of that, they utilize a default route. In this blog, we will explain the OSPF Stub Area and its different types. We will also look into some of the features of OSPF stub areas.

What is OSPF Stub Area?

An OSPF stub area is an area where external routes originating from outside the OSPF domain are not advertised. Typically, these external routes are injected into OSPF by an autonomous system boundary router (ASBR), which acts as an intermediary between routing protocols or networks. Type 5 external LSAs are responsible for carrying routes. These LSAs are distributed across the entire OSPF network.

In order to prevent LSAs of type 5 from entering or leaving a stub area, the area is blocked off. Instead, an area border router (ABR), which is a router with interfaces in areas, inserts a default summary route (0.0.0.0/0) into the stub area. This default route allows communication with destinations outside the stub area without needing information about networks.

Note: The purpose of using a stub area is to reduce the size of the Link State Database (LSDB) and routing table within that area. It also helps minimize LSA flooding and SPF calculations, which can enhance network performance and scalability in hierarchical networks.

Features of OSPF Stub Areas

Some of the features of OSPF stub area areas are:

  • They reduce the LSDB size and SPF calculations in the stub area.
  • They simplify the routing table in the stub area by replacing multiple external routes with a single default route.
  • They improve network stability and convergence time in the stub area.
  • They prevent unnecessary flooding of external routes in the stub area.

Rules Associated with OSPF Stub Areas

Below, we have explained some of the rules that are associated with OSPF stub areas.

  • All routers within the stub area, as well as ABRs connecting to that area, must be configured appropriately for it to function correctly. If there are any mismatches in the configuration of the stub area, it can lead to failed adjacency formation and routing errors.
  • Although a stub area blocks type 5 LSAs from entering or leaving, it can still receive type 3 summary LSAs from areas. These type 3 LSAs are used for advertising area routes. Opting for these routes would result in expenses compared to the default route. As a result, they will only be chosen if there are no options available to reach the desired destination.
  • A stub area cannot have an ASBR within the area, since type 5 external LSAs are not allowed. If there is a need to redistribute routes from another routing protocol or network into a stub area, a different type of stub area must be used.
  • A stub area can be connected to any other type of area, including another stub area or the backbone area (area 0). However, if a stub area is not directly connected to the backbone area, a virtual link must be configured to maintain connectivity.

Now that we have a basic understanding of OSPF stub areas, including their features and their different associated rules. Let’s discuss OSPF Stub Area types in detail.

Different OSPF Stub Area types

OSPF has four different types of stub areas: stub area, totally stubby area, NSSA (not so stubby area), and totally NSSA (totally not so stubby area). Each type has its own characteristics and use cases. Let’s see them in detail.

Stub Area

A stub area is the basic type of OSPF stub area that we have already discussed. It blocks Type 4 and 5 LSAs from entering the area and receives a default summary route from the ABR. It still allows Type 3 LSAs from other OSPF areas to enter the stub area.

Totally Stubby Area

A totally stubby area is a more restrictive type of OSPF stub area that blocks not only Type 4 and 5 LSAs but also Type 3 LSAs from other OSPF areas. The only exception is the default summary route that is injected by the ABR. This means that a totally stubby area has no knowledge of any inter-area or external routes except for the default route.

A totally stubby area is useful when you want to isolate an area from any unnecessary routing information and minimize the LSDB size and SPF calculations. However, you need to make sure that there is only one exit point from the totally stubby area to avoid suboptimal routing.

NSSA (Not So Stubby Area)

An NSSA is a variation of an OSPF stub area that allows an ASBR within the area. This means that an NSSA can import external routes from other routing protocols or static routes into OSPF. However, these external routes are not advertised as Type 5 LSAs but as Type 7 LSAs, which are specific to NSSAs.

Type 7 LSAs are flooded only within the NSSA and are translated into Type 5 LSAs by the ABR before being propagated to the rest of the OSPF domain. This way, we can have external routes in an OSPF stub area without violating the stub rules.

An NSSA is useful when you want to redistribute external routes into OSPF but still limit the amount of LSAs in the area. However, you need to be careful with the translation of Type 7 LSAs into Type 5 LSAs, as it can cause routing loops or inconsistencies.

Totally NSSA (Totally Not So Stubby Area)

A totally NSSA is a combination of a totally stubby area and an NSSA. It blocks Type 4 and 5 LSAs and Type 3 LSAs from other OSPF areas, except for the default summary route. It also allows an ASBR within the area that can generate Type 7 LSAs for external routes.

A totally NSSA is useful when you want to have the benefits of both a totally stubby area and an NSSA. However, you need to be aware of the same issues that apply to NSSAs regarding the translation of Type 7 LSAs into Type 5 LSAs.

Below, we have shown the table to easily understand which stub areas allow which LSA’s.

Stub Area typeType 3 LSAType 4 LSAType 5 LSAType 7 LSADefault Route
StubAllowedBlockedBlockedN/AYes
Totally StubbyBlockedBlockedBlockedN/AYes
NSSAAllowedBlockedBlockedAllowedYes
Totally NSSABlockedBlockedBlockedAllowedYes

These are the various types of OSPF Stub Area.

Frequently Asked Questions

Q1. What is OSPF area types?

OSPF area is a technique by which one can logically divide an OSPF network for better routing optimization and performance. Mainly, there are five types of OSPF areas, namely:

  • Backbone area (area 0)
  • Standard area
  • Stub area
  • Totally stub area
  • Not so stubby area

Q2. What is the difference between stub area and NSSA?

A stub area blocks external routes and uses a default route. An NSSA allows external routes from ASBRs and uses a default route.

Q3. Can area 0 be a stub OSPF?

No, it is not possible to make area 0 a stub area because area 0 is the backbone area that connects all other areas. Stub areas do not receive external routes from other autonomous systems.

Q4. How do I make an area stub?

One can make the area stub by using the command “area x stub”.

Conclusion

OSPF stub areas are special area types that help reduce the size of the LSDB and the routing table by blocking certain types and replacing them with a default summary route. In this blog, we have covered different OSPF stub areas in detail, along with their purposes and rules.

You can also learn configuration and other important aspects of OSPF Stub Area with CCNP Enterprise Core training or OSPF BGP Training. Any queries or feedback are most welcome. Please leave a comment below if you have any.

Recent Blog Post

Leave a Reply

Your email address will not be published. Required fields are marked *

linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram