OSPF part 3: Areas and LSA types


Let’s talk deeper about our focus protocol for today, OSPF. OSPF is pretty unique in the design and operations. OSPF tries to bring efficiency of memory and CPU usage at all times.

What areas used for? Efficiency. Area types such as stub or nssa? You guessed it, efficiency. Even LSA2 and DR/BDR are based in efficiency.

I feel that OSPF is really well thought and it is able to deal with many scenarios and with old routers (at least in the times where OSPF was brand new) it had to live with not so powerful routers in terms of CPU power or memory available to store routes.

Area types

An area is defined as a group of routers that share the same database. All the routes will know every link and router in the area.

Inside an area the routers have in their database the topology information (who is connected to who and their links) and the reachability information (prefix information)

Key idea: Between areas the only information shared via LSA3 is reachability information(prefixes).

R0 or R1 in area 10 have no idea of how many routers are in area 0 or beyond that. That’s part of the plan, to be more efficient.

 R6 in Area 0 have no idea about other areas, just prefixes coming into Area 0.

This is by itself a very efficient mechanism to save memory between routers in different areas.

We have 6 types of areas:

  • Backbone: Defined with area number or 0, and it acts a regular area in the sense that it allows all the LSAs types.
  • Regular area: any area by default will stay as a regular unless we change it to another type. Allows all LSAs types.
  • Stub area: Allows only type 1,2 and 3. It blocks LSA 4 and 5, meaning no external routes can enter here.
    • If we check the hello packet inside a Stub Area , we will see the E bit set to 0. If the bit E is set to 1 it will allow external routes.
    • ABR will inject into the stub area automatically a default route as LSA 3 so we will be able to reach the external routes.
    • Configured with area X stub under the OSPF process, all routers in the Stub area must have this command installed.
  • Totally stub: Allows only type 1 and 2. Only allows a single default route LSA 3 which is generated automatically by the ABR.
    • Configured with area X stub no-summary. Only ABR will have to have stub no-summary command.
    • The no-summary part of the command is a reference of not allowing LSA 3 which are called summary LSAs.
    • We can reach the external routes by using the default route generated by the ABR as LSA type 3.
  • NSSA area: Very similar to the stub area, it allows type 1, 2 ,3 and a new type called Type 7 LSA. It blocks LSA 4 and 5.
    • This area is used if you want to block external routes to go in the area, but at the same time you want to use the area as a redistribution point.
    • Redistributed routes will be generated as Type 7, that way relaxing the requirement of not allowing LSA type 5 in the area.
    • Type 7 will be translated to type 5 at the ABR (actually that ABR is considered also a ASBR as it is generating type 5)
    • Configured under the OSPF process as: area X nssa
    • There is no default route generated by the ABR into the area automatically, meaning we cannot reach any external routes by default.
  • Totally nssa: Similar to the totally stub. We only allow type 1 ,2 and type 7. Blocking type 5 and type 3 LSAs.
    • In this case, ABR will create a LSA 3 default route using it we can reach externa subnets.
    • Configured in the ABRs of the NSSA area, adding the command no-summary. Very similar to Totally stub areas: Area x nssa no-summary

LSA types

LSA(A for advertisement) they contain information about prefixes and the topology information, carried under the LSA Update packet that they are exchange while forming the adjacency.

Every LSA have a purpose, we are going to check the most common here:

LSA 1 named Router LSA:

They are named router LSA for a reason, all routers will generate this kind of LSA. The scope of this LSA is the area where they were generated.

Inside a LSA type 1, we can see both reachability(prefixes) and topology information (who is connected to who)

Will be summarized together any LSA2 into LSA3 by ABRs.

LSA type 2 named Network LSA:

Generated within network type Broadcast(default for ethernet interfaces) or Non-Broadcast network type. Scope is a single area.

DR will generate it, BDR will wait DR to fail to start taking the role.

It shows the physical DR address for the segment, the mask address of the segment and a list of all fully adjacent neighbors with the DR.

Type 2 is just a optimization LSA, as every neighbor only have a full adjacency with the DR/BDR instead of full adjacency with each other

Is a way to fix the common problem of full mesh, meaning that we would need n(n-1)/2 connections to be fully adjacent with each others.

Think of above LSA1 Length is 48 bytes for a single router, and the length in bytes for LSA2 is 40 as you can see in the picture.

Type 3 LSA named Summary LSA:

Generated by ABR the scope is a single area.

The summary name is not referring to a subnet automatic summarization or similar, is related with summarizing LSA1 and LSA2 into a single LSA3.

Each LSA1+LSA2 prefixes will be converted into a single LSA3, if you have 10 LSA1 you will have 10 different LSA3.

Used to send reachability information into Area 0, and from Area 0 into other areas. Only we send prefixes, nothing about topology.

LSA3 will be regenerated per ABR, as the LSA3 scope is a single area.

Loop prevention: We can only replicate an existing Type 3 from Area 0 into a non-backbone area.

It includes the cost from the ABR to the network. Receiving a LSA3 won’t trigger a full SPF algorithm run, just partial run. (recalculate cost to the network)

Type 4 named ASBR summary:

Type 4 only make sense together with Type 5, they are used to tell how to reach an ASBR.

Generated by ABR, scope is a single area.

  • ABR will generate Type 4 if one of these two conditions are met:
    • A router claims to be ASBR into a Type 1 LSA
    • There is another Type 4 already in the area, will trigger the Type 4 regeneration

Only makes sense if you think Type 5 external LSA scope is whole domain, so R4 in the picture below will get the same information from R1.

Type 5 named External LSA:

Scope is whole domain, same LSA will be seen in all areas that allow external routes.

Always works together LSA4 to find the ASBR.

Contains prefixes that were redistributed into OSPF by an ASBR.

A router will claim to be ASBR by modifying Type 1 LSA, setting the E bit to 1(not into the Hello bit, the Type 1 LSA)

Type 7 named NSSA external:

Generated by ASBR, scope is single area(the nssa area)

It will be translated by a designated translator ABR from Type 7 into Type 5 and injected into Area 0.

After it is translated into a Type 5, the behavior is the same as a normal Type 5. A new type 4 will generated also for the new Type 5.



In this post we talked about general areas and LSA with some drawings to help illustrate why we need them to make OSPF more efficient.

I hope that I clarified some of the most difficult OSPF topics in this post, if you have any doubts or you would like me to expand a topic let me know.

What do you think?

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

As you found this post useful...

Follow us on social media!

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?

Leave a Reply