In this post I wanted to go over the various OSPF area types and LSAs associated with each type, and then a configuration example for each, working with the above topology as in previous posts.
There is simply TONs of quality information and lessons out there on OSPF area types, LSAs etc, so I won’t re-invent the wheel here, just create (another) hopefully useful reference. 😊
Use this illustration below as a guide
Normal Area
Let’s first take a normal area – Area 3 – R8 – and run an ip ospf database command
You can see we have LSA types 1 – 5 – we expect the LSA types 4 and 5 since we have external AS routes being redistributed into our topology at the other side of the network.
Let’s look at the routing table on R8 also
Looks like this area is a good candidate to be a stub area – all the routes go through R7, so we can definitely make this more efficient.
Stub Area
To configure our Area 3 as a Stub area, we need to run this command on all routers in the area. So that’s R7 (the ABR), R8, and R9.
router ospf 1
area 3 stub
Let’s look at the OSPF database and routing table now on R8 now
We’ve replaced the external routes (E2 and E1) with a default route (via Type 3 LSA) and eliminated type 4 and 5 LSAs
But we still have all these inter-area routes that could use optimizing
Totally Stubby Area
Next, we’ll take this a step further and make Area 3 a Totally Stubby Area
Issue this command on ABR of the area – in this case, R7
router ospf 1
area 3 stub no-summary
R8’s route table and ospf database
We cut down the Type 3 Summary LSA’s down to a single LSA, and a single default route that represents all networks beyond the ABR…external and inter-area. Quite cool!
You can also run a show ip ospf command – and confirm that Area 3 is indeed a total stub area as shown below
Next, we’ll go over to the other side of the network and optimize those external AS routing
Here’s what we have so far
Not So Stubby Area (NSSA)
To make Area 2 a NSSA, we need to run this command on R3 (the ABR), R4, and the 2 ASBRs (R10 and R5)
router ospf 1
area 2 nssa
As show on R4’s routing table, the routes themselves don’t change, their designations do -the E2s become N2s, and E1s become N1s.
What does also change is type 5 LSAs are gone, replaced with Type 7 – as shown on R4
There is NO default rote injected in a NSSA – you need to manually inject the route from the ABR if you want to- the reason for this is that your ASBR may be injecting default routes into the area, for reaching the external networks, and you would not want multiple default routes. And in our case here, we have 2 external networks in Area 2
Let’s inject a default route into the nssa with tis command – appending default-information-originate
area 2 nssa default-information-originate
On R4, nothing magical happens – only difference is there is now a default route added (as a N2 route) with R3 as the next hop. Every other route has a longer prefix so the default route in this case does nothing to minimize the routing table, so this route is useless. Since the area contains ASBRs, advertising externally redistributed routes from 2 ASs, those routes remain.
Total Not So Stubby Area
Now we can try to reduce the type 3 LSAs (responsible of inter-area summary routes) here, and get a default route towards R3 for the destinations on the opposite side of the network. Also, I will remove the default-information-originate option
area 2 nssa no-summary default-information-originate
Here’s R4’s routing table now. The external routes remain for the 2 advertising ASBR routers, and now we have a single inter-area default route towards R3 for destinations beyond, and a smaller routing table ! This is as optimized as you can get with this topology.
Again, the no-summary option reduces the type 3 LSAs (to 1), and a default route towards the ABR is injected automatically for inter-area routes, without the need to specify default-information-originate, which was not helpful here anyway as it only represents external routes.
Thanks for reading this post- hope it serves as a useful reference!