Routing protocols play a crucial role in the modern and complex networks that we have today.
Although several routing protocols can provide intra-network communications within corporate networks, OSPF is the most popular choice, mainly because it is a standard protocol with great support for various features.
As a link-state routing protocol, OSPF uses the concept of areas where additional areas can be implemented besides the backbone area.
With proper summarization in play, this approach logically separates the OSPF network into smaller routing domains and optimizes the overall routing.
However, as valuable as the addition of these extra areas is, the OSPF deployment might be highly cumbersome in large and complex networks. Without proper tuning, routers usually have large link-state databases (LSDB) and routing tables and out-of-control flooding within the OSPF domain.
This article will provide the following:
Not what you were looking for today? View some of our popular articles:
OSPF is a more complex routing protocol when compared to other interior gateway protocols. Because of the concept of using areas, it requires very precise planning and design before starting with the implementation. Once the basic setup is configured, the tuning part of the areas can begin.
However, before we discover what these area types are all about, we must first discuss the OSPF-enabled routers' roles in the OSPF domain. Based on the roles, routers support different capabilities and have specific responsibilities.
The OSPF defines four main router types:
As you can see in the image above, based on the location of the routers throughout the OSPF domain, each router has a different role. Router R3 in area 0 is called a backbone router because all interfaces belong in the backbone (transit) area.
Routers R1 and R5 in areas 1 and 2 are called internal routers because their interfaces are part of a single area, like in our case. Routers R2 and R4 are ABRs because they belong in two areas, while R6 is ASBR because it also connects to an external AS.
To learn more about the routers' roles and the basics of OSPF, check out the following articles:
By default, each area is a normal area. Therefore, routers that are part of a normal area learn about networks that are part of the local area, networks from other areas, and networks external to the local AS. In other words, routers learn everything by default.
To reduce the amount of flooding, as well as the size of the LSDB and routing table of the routers, you can define different special-case area types:
These additional area types improve performance in OSPF networks by implementing route filtering and injecting default routers in the areas, which allows the networks to scale to significantly larger sizes.
Configuring a stub area greatly reduces the size of the LSDB and the routing table of each router inside the area. This results in reduced memory and processing resources spent on routing, which also improves the overall resource consumption on the routers.
The reason for these benefits is that a stub area does not allow external networks from other autonomous systems to be inserted into the area. This way, the internal routers in the area never learn about any external networks to the OSPF domain and use only a default route to get there. The ABR is responsible for advertising a default route to all the routers in the stub area.
As shown in the image above, area 1 is configured as a stub area, and the ABR performs route filtering. R2 only permits networks from other areas (areas 0 and 2) but not from the external AS behind R6.
At the same time, R2 as ABR also advertises a default route to R1, so that R1 can reach external networks outside of the OSPF domain. This default route points to R2. Lastly, R1 also learns about networks from the local area (area 1).
Remember that you must meet a few requirements to define a stub area. First and foremost, only additional areas can be configured as a stub, but not the backbone area (area 0).
Furthermore, there shouldn’t be a presence of an ASBR router in the area, as well as any virtual links established through the area. Finally, all internal routers in the area and the ABR must be configured as stub routers.
Changing an OSPF area from standard into stub is a straightforward process. All you have to do is to configure the area area-number stub command on internal routers in the area and the ABR (R1 and R2 in our case). The following configuration turns area 1 into a stub area:
The default cost of the default route advertised by the ABR router is 1. If there are two or more ABRs between the stub area and the backbone area, and you want to prioritize one default route over another, you can change the cost of the advertised default route by using the area default-cost command on the desired ABR.
Based on the IP addressing in the image above, the following output shows the routing table of R1 before area 1 is configured as a stub containing information about the network from the external AS:
The following output shows the routing table of R1 after area 1 was configured as a stub replacing the network from the external AS with a default route:
The totally stubby area feature provides additional filtering capabilities to the stub area. Because it is a Cisco proprietary enhancement, it can only be used on Cisco routers.
However, unlike the stub area deployment, it is configured only on ABRs. The internal routers in the totally stubby area should still be configured as stub routers.
So, what exactly is a totally stubby area? It is a stub area that, besides blocking external networks entering the area, also blocks networks from different OSPF areas. As a result, the internal routers in the totally stubby area learn only networks from the local area.
Just like with the stub area, the ABR is responsible for advertising a default route in the totally stubby area. However, in this case, the default route is used not just for reaching networks in the external AS, but also networks in other OSPF areas within the local AS.
As you can see in the image above, area 1 is configured as a totally stubby area, and the ABR performs additional route filtering. Now, R2 denies networks from the external AS and other areas (areas 0 and 2) in the OSPF domain.
To reach all those filtered networks, R2 as ABR advertises a default route to R1, which points to R2. The only networks that R1 learns are the networks from the local area (area 1).
Defining an OSPF area as a totally stubby area uses a similar configuration process, just like with the stub area feature. Since this is a Cisco proprietary technology, only the ABR router must be configured as a totally stubby router, while the rest of the internal routers as stub routers. This allows you to use routers from vendors as internal routers.
All you have to do is to configure the area area-number stub command on internal routers (R1) in the area and area area-number stub no-summary on the ABR (R2). The additional argument no-summary defines the area type as totally stubby. The following configuration turns area 1 into a totally stubby area:
The following output shows the routing table of R1 after area 1 was configured as a totally stubby area replacing the network from the external AS and networks from other areas with a default route:
As you can see in the configuration example above, now R1 learns only a default route from OSPF to reach all networks that are outside of the local area. This minimizes routing information further compared to the stub area feature, which results in increased stability and scalability and more optimized resource consumption.
_________________
Too many routers to configure and not enough engineering resources? PivIT's EXTEND SmartHands can help you out.
_________________
The OSPF NSSA feature is an extension of the stub area feature. This means that the same rules apply to an NSSA area as to a stub area. Only external networks are filtered out and not advertised to the internal stub routers, while at the same time, a default route is injected by the ABR.
So, the question is, what makes this stub area “not so stubby”?
The reason lies in one feature that allows the injection of external routes into the stub area. These injected networks from the external AS are later advertised to the rest of the other areas in the OSPF domain.
Now the strange name makes more sense. What happens is defining an area that does not permit networks from external AS, but at the same time, injects external networks into the OSPF domain.
As you can see in the image above, area 1 functions just like before when it was configured as a stub area. The only difference is that now R1 is ASBR and injects external routes into the rest of the areas.
To define an area as NSSA all you have to do is to configure the area area-number nssa command on internal routers in the area and the ABR (R1 and R2 in our case). The following configuration turns area 1 into an NSSA area:
Based on the topology example above, the routing table of R1 is the same as before when area 1 was configured as a stub area, with only one exception of the additional external network being present as well.
The following output shows the routing table of R5 in area 2 after area 1 was configured as NSSA:
As you can see in the configuration example above, R5 now learns the 209.165.100.0/24 network as an external route.
Keep in mind that when using NSSA, the default behavior on a Cisco router is to not advertise a default route into the NSSA area. To manually advertise a default route, you should use the default-information-originate command on the ABR.
_________________
If you're in the market for a new router, be sure to check out our wide selection of routers, ready to ship out to you at a moments notice.
_________________
Totally NSSA is an extension to the NSSA feature, just like the totally stubby feature is to the stub area. This is a Cisco proprietary feature that blocks external networks and networks from other areas within the OSPF domain while using a default route advertised by the ABR to reach those networks.
What makes the area totally NSSA is the ability to inject external networks into the OSPF domain through an NSSA. This means that one or more routers in the area can have the role of ASBR and inject external routes into the totally NSSA, that later will be advertised to the rest of the OSPF domain by the ABR connected to the NSSA.
As you can see in the image above, R1 does not learn any external networks or networks from the other areas just like when area 1 was configured as NSSA but injects networks from the external AS on the left into the OSPF domain.
To define an area as totally NSSA all you have to do is to configure the area area-number nssa command on all internal routers (R1) in the NSSA area, while the area area-number nssa no-summary command on the ABR (R2). The following configuration turns area 1 into a totally NSSA area:
Even though special area types are optional features and you can achieve the same results using other more manual methods, these additional features simplify the whole filtering process.
All you have to do is to replace the standard behavior of the areas with one of the four special types according to your requirements. This will not only optimize the routing, but significantly improve the overall resource consumption by minimizing the LSDBs and routing tables of the routers.