OSPF LSA (link state advertisements) are used to create a logical network topology. But Why we have 11 different LSAs ? What are their purposes ? Most important questions many time is not asked by the engineers thus you can’t find many places on the Internet which provides these answers.
The reason of having 11 Type of OSPF LSA packet is Scalability. If the network only consist of small amount of routers ( routers, link and the physical topology is important to define the size ) then you would have maximum two type of LSA.
Let me explain the ospf lsa types and why we would only have maximum two type of LSA will be understood.
Note : In this article only OSPFv2 LSA Types explained.
Figure – 1 OSPF LSA Types
OSPF LSA types :
OSPF Router LSA
Also called as OSPF type 1 LSA.
Every router within a single area generates a router LSA to advertise link and prefix information.
In an area every router has to have same routing information, otherwise routing loop might occur.
Important network design best practice is for the OSPF Router LSA is not to exceed the Interface MTU.
If Router LSA exceeds the interface mtu value, routers fragment and reassemble the fragmented packets. Fragmentation is always bad ! Especially if it is done by the routers. In IPv6 Routers don’t fragment or reassemble the packets though.
OSPF Network LSA
Also called as OSPF type 2 LSA.
Type 2 LSA is used to advertise connected routers to multi access network by the DR ( Designated Router).
OSPF uses DR (Designated Router) and BDR (Backup Designated Router) on multi access network such as Ethernet.
OSPF DR,BDR will be explained in detail later in the article.
In point to point networks there is no DR or BDR.
DR and BDR election takes time , thats why from design best practice point of view, if the requirement is fast convergence, it is good to change the OSPF network type to point to point, even if the physical connection is Ethernet. (When two routers are connected back to back via Ethernet, even though there are only two routers, still there will be DR/BDR election)
OSPF Summary LSA
Also called as OSPF type 3 LSA.
Generated by the OSPF ABR (Area Border Router) in multi area OSPF environment.
OSPF ABR doesn’t send topology information between the OSPF areas.
Instability in one area doesn’t effect the other areas.
OSPF Type 3 LSA is generated by the OSPF ABR. Important design question for the OSPF summary LSA is, how many ABR should be between two areas. The answer is two. One would be bad for the high availability and more than two ABR create unnecessary complexity since there would be 3x amount of Summary LSA for each prefix.
OSPF ABR has too much work in Multi Area OSPF design. On Multi access network OSPF DR also has more work than DR Other routers. Thats why it is good practice to have OSPF DR and OSPF ABR function on different routers whenever it is possible.
OSPF ASBR Summary LSA
Also called as OSPF Type 4 LSA.
In order to reach to an ASBR (Autonomous System Boundary Router) from different area, ABR creates a Type 4 LSA.
It is important to understand that ASBR doesn’t generate Type 4 LSA. ASBR generates Type 5 LSA for the external prefixes. Also ASBR generates Type 1 LSA for its own reachability information. When an ABR receives Type 1 LSA advertisement of ASBR, it generates Type 4 LSA and floods Type 4 LSA to the other areas.
If there is no Type 5 LSA, Type 4 LSA is not generated.
There are some special type of Areas which has been explained in different article on the website such as Stub, NSSA areas which don’t allow Type 5 LSA, in those areas, there is no Type 4 lsa as well.
OSPF External LSA
Also called as OSPF Type 5 LSA.
External LSA is used to advertise external reachability information.
External LSA is flooded to every router in the domain.ABR don’t regenerate it. ABR just passes that information as is.
From different routing domain such as BGP or EIGRP, routes might be redistributed for many reason. In that case, for those routes type 5 OSPF external LSA is created by the router which does the redistribution. That router is called an ASBR (Autonomous System Boundary Router).
OSPF NSSA External LSA
Also called as OSPF Type 7 LSA.
Used in NSSA (Not-so-stubby) area to allow redistribution external routing information.
This is a special type of LSA which is only used in NSSA area. This LSA type is translated (converted) to Type 5 External LSA by the ABR(Area Border Router) and send to the other areas as Type 5.
In NSSA area, Type 4 or Type 5 LSA is not allowed. So type 7 can go to other areas Type 5 but Type 5 LSA cannot go to the NSSA areas as Type 7 or any other LSA type. It is not allowed at all !
OSPF Opaque LSAs : Type 9,10 and 11 are the opaque LSAs.
RFC 5250 ‘ The OSPF Opaque LSA Option ‘ explain these LSAs in great detail.
Type 9 LSA is used for OSPF Graceful Restart operation.
Type 10 LSA is used for MPLS Traffic Engineering.
OSPF Area Types will be explained in different article. Using different LSAs and having different Area types in OSPF provides flexibility and scalability.
OSPF LSAs is similar to IS-IS TLVs, although there are some differences.