July 8, 2023

OSPF Areas: Not-So-Stubby Area (NSSA)

3 min read

Do you know about Sergeant Stubby? He was a famous dog of high rank who has been commissioned to serve in the infantry division of the US in the first World War ever in history. Though he was born a year or two before the Great War ends, it was said that he had served for 18 months as a war dog. At a young age, he had faced several battles on the field. Like any other man on the field, he got wounded a lot of times like foreleg injury due to German’s hand grenades.

Our topic for today is not about Sergeant Stubby but how a Stub network can be not so stubby. Isn’t it exciting?

Not-So-Stubby Area (NSSA) behaves like Stub area. It allows Inter-Area (O IA), Intra-Area, and default routes. LSA Type 1, Type 2, Type 3 are allowed but unlike the Stub area, External LSAs are allowed in NSSA area. External LSA in an NSSA area is not using Type 5 LSA but Type 7 LSA. Type 7 LSA tricks the OSPF area but in fact, it is the same as a Type 5 LSA. Type 5 LSA cannot propagate through an NSSA area and in order to do that a Type 5 to Type 7 translation (vice-versa) is being done by the ABR. Thus, it allows routes to be redistributed from an ASBR into that area with the use of Type 7 LSA.

In any case, the router in your Stub network needs to be connected to a new external network, then you need to configure it as NSSA. As discussed in my previous post, a Stub network will not be able to redistribute the routes as External LSA.

OSPF Not-So-Stubby (NSSA) Area

Let us redistribute Loopback 30 into Aedes and assigned both Aedes and Anopheles as NSSA network.

Aedes(config)#router ospf 3
Aedes(config-router)#no area 20 stub
Aedes(config-router)#area 20 nssa
Aedes(config-router)#area 20 nssa
Aedes(config-router)#redistribute connected subnets
Aedes(config-router)#end

Anopheles#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Anopheles(config)#router ospf 2
Anopheles(config-router)#no area 20 stub
Anopheles(config-router)#area 20 nssa

Now that we have done redistribution, the routing table and database for Culex are changed:

Culex: show ip route

Culex learned external network 172.30.200.0 via Anopheles and tagged it as O E2 in the routing table. OSPF External Type 2 metric is the default since we did not configure it manually.

Not-So-Stubby Area (NSSA): show ip ospf database

And finally, we got Type 5 LSA in the Culex routing table with 192.168.2.1 (Anopheles router ID) as the advertising router.

Let’s check what happened to Anopheles routing table and database.

Not-So-Stubby Area (NSSA): show ip route

It has learned the external network 172.30.200.0 and tagged it as “O N2.” In Culex, it is tagged as “O E2” because the router is not in NSSA Area, unlike Anopheles.

The Anopheles database should match exactly with Culex and Aedes.

Not-So-Stubby Area (NSSA): show ip ospf database

.Going to Aedes, let us check the routing table and the database.

Not-So-Stubby Area (NSSA): show ip route

It has the same routing table as when we configured it is a stub. However, notice that there is no default route for Inter-Area. Why there is no default route being injected to the Aedes router automatically like what Stub does? It is how OSPF NSSA is designed. You can never argue if it is really how it is designed. However, this opens up another big discussion as it is all about the OSPF route preference which is the way OSPF calculates SPF and chooses the best path. For now, let be like that but if you still insist to have the default route, you can actually explicitly enter this command in the ABR:

Anopheles(config)#router ospf 2
Anopheles(config-router)#area 20 nssa default-information originate

Not-So-Stubby Area (NSSA): sh ip ospf database

As you can see, there is no Type 5 LSA but only Type 7 LSA. Its database is exactly the same as Anopheles.

LSA Types Allowed LSA Types Not Allowed
Type 1, Type 2, Type 3, Type 7 Type 5

Leave a Reply