OSPF LSA Types Explained

Hii Team,

If R1 & R2 is connected with Serial Link. Then each router will generate 2 Router LSA’s each. As there is no DR/BDR Election for this segment.

Can u please explain Rules to be followed by routers to generate LSA type 1.

Hello Chandrasekhar

If R1 and R2 are connected via a serial link, then yes, you are correct, there will be no DR/BDR election. This means that the routers will simply create Type1 LSAs and exchange them. No Type 2 LSAs will be generated. But each router will simply create one LSA for the directly connected network. If there are other networks connected to these routers, then those too will be included in the LSA.

All routers on all networks generate Type1 LSAs. Even within a multiaccess network, routers will generate Type1 LSAs and send them to the DR/BDR. Remember that Type 2 LSAs are only generated by the DR/BDR from the Type1 LSAs that they receive on the network segment.

I hope this has been helpful!


@lagapidis Isn’t Type 4 LSA is created by ABR and advertised to other areas so other routers can reach ASBR? Isn’t type5 LSA used to advertise routes redistributed into OSPF? What exactly Type4 is doing here with redistribution? Thanks in advance.


Hello Nihar

Yes, you are correct. The Type 4 LSA is indeed generated by the ABR. The process that takes place is described below. Take a look at this diagram:

R1 has at least one interface in Area 2, but also has an interface that connects to a non-OSPF routing domain. In other words, R1 obtains additional routing information from a source other than the local OSPF processes. This makes R1 an ASBR. When an ASBR shares its Type 1 Router LSA within Area 2, it flips the E-bit in the LSA Options field indicating that it is an ASBR. (More about the E-bit can be found at RFC2328) When the ABR receives this LSA, it knows that it comes from an ASBR. So The ABR will prepare a Type 4 LSA which contains the IP address of the ASBR. This is then flooded into all other areas.

The result is that all OSPF routers in all areas learn that R1 is an ASBR. That is the whole purpose of the Type 4 LSA.

Conversely, an ASBR will generate Type 5 LSAs directly, and these include the prefixes that the ASBR shares. But you still need the information provided by the Type 4 LSA (the address of the ASBR) in order to route those prefixes.

I hope this has been helpful.


1 Like

this was very informative !!

1 Like

Routers that run OSPF and are connected to network of another site that runs OSPF routing protocol only is also called as autonomous system border routers or ASBR.?

Hello Vijay

An ASBR is a router that is connected to a network that is not participating in the local instance of OSPF. Take a look at this diagram:

R1 is an ASBR because it is connected to a router that belongs to a RIP routing domain. But if that RIP router was an OSPF router that was running an independent OSPF network with a different process ID within the router, and with a completely separate backbone area 0, then R1 would still be an ASBR.

Remember the ASBR by definition, connects to an independent routing domain, regardless of the routing protocol used within that domain, as it could be EIGRP, RIP, OSPF, or even static routing.

I hope this has been helpful!



@lagapidis @ReneMolenaar
Q) if R3 is receiving type-3 from R2 already to reach ASBR then why do we require type-4 LSA?
Wouldn’t type-4 become redundant?

Hello Tejas

A Type 3 LSAs will only redistribute routes found within the attached OSPF area. So the Type 3 LSA that is being advertised by R2 to R3 that you see here is only advertising

Type 5 LSAs will advertise the routes external to the OSPF area, and you can see this in the OSPF database, were is being advertised.

Now, the advertising router is, and the type 5 LSA includes this information. But there is no guarantee that all other areas in an OSPF topology will have a route to this particular router, which is the ASBR. How does R3 know how to get to R1? The only way it can know this is through the Type 4 LSA that informs the whole OSPF topology of the existence of this ASBR and how to reach it.

I hope this has been helpful!


1 Like

Hello @lagapidis ,

I am still confused that if R2(ABR) is injecting routes in area 1 then can’t the R3 just check that to reach network we need to reach & is reachable via R2. So can’t R2 just route R3 towards ASBR(as R2 knows from LSA1 that where is ASBR).

R2 helps R3 to reach all networks in Area0 so can’t R2 just help R3 to reach ASBR?

Hello Tejas

Yes I understand your concern. It makes sense that if R3 learns about the route and knows how to reach R1 to get to that route, then doesn’t it make sense to use an additional LSA to send that information out again. It sounds redundant.

Imagine however that there was no network. R1 would send its information about the external route to via a Type 1 LSA. R2, the ABR would send this information to R3 using a Type 5 LSA. That type 5 LSA, if you were to take a look at it in the OSPF database, would have a link-state ID of and an advertising router of, as shown in the lesson. That means that R3 should send all traffic destined for to But where is R3 will not have this destination in its routing table (unless it is explicitly advertised by R1, which by no means is certain).

In this case, you must have that extra piece of information that is found within a Type 4 advertisement, which tells R3 how to find the ASBR. If you were to look at that type 4 LSA in the OSFP database, you would see a link ID of, which is the ASBR router, and an advertising router of So R3 will know that to get to the ASBR, its next hop address used should be that of R2.

An excellent and detailed description of all OSPF LSA types and how they appear in the OSPF database can be found in this Cisco documentation, along with a more detailed explanation of the importance and uses of Type-4 LSAs.

I hope this has been helpful!


1 Like

@lagapidis thank you soo much for a detailed explanation. This clears my doubt.

1 Like

Can you explain the LSA recursion process like , How LSA-3 recursion happens and how Lsa-5 recursion happens ??..Do u mean that LSA-5 is recursed to LSA-5.

What is the meaning of routing bit set , on which LSA these are set , what if there is no routing bit is set ??.

Why there is a LSA-4 when the ASBR is already adverting the LSA-5 , what is the use case of LSA-4 ?

What is the use of Forwarding address ?, what is the Non-zero and zero field in forwarding address ??

How LSA AGE is being maintained,Does that mean every hour the routers need to flood their LSDB once again ??

Hello Narad

Recursion is the process that an OSPF router takes to “solve” the shortest path algorithm. When a type 5 LSA is received, it must be “recursed” to the point where there is a type 1 LSA in the LSDB that points to the next hop router.

For example, take a look at this image:

R2 receives a type 5 LSA from R1 which is an intra-area ASBR, you will see the type 5 entry in the LSDB, but that entry will have a forward address of This means that in order to reach the destination, the router must solve the shortest path to the ASBR. You will also see in the LSDB that there is a type 1 LSA that points to R1 which is the intra area ASBR. So R2 recurses the type 5 LSA to a type 1 LSA and solves the shortest path to reach that external prefix.

A similar process takes place with a type 3 LSA as well as a type 5 LSA that is received from an inter-area ASBR as well.

The routing bit is an internal implementation variable that is used only by Cisco. It is a bit that is set on an LSA only if the LSA should be considered during the SPF calculation. The bit is set only after the LSA has passed all necessary checks. This makes it more efficient so that these checks don’t have to be performed over and over. If the routing bit is set, the router knows that the LSA is eligible for processing. Note that this is a bit in the options field of the LSA and is not propagated from router to router.

Take a look at this post:

As stated in this Cisco documentation:

Data traffic for the advertised destination will be forwarded to this address. If the forwarding address is set to, data traffic will be forwarded instead to the advertisement’s originator.

You can find detailed information about this in the following lesson:

I hope this has been helpful!


Hi, I would like to ask, what is the difference between type 1 LSA & hello message. Both seems to share information about the router itself.

Hello Deep

First of all, let’s clarify the terminology. There are five message types that OSPF uses:

  • Hello
  • Database Description
  • Link state request
  • Link state update
  • Link state acknowledgment

LSAs of any type are not a type of OSPF message. However, all types of LSAs are contained within the LS Update OSPF messages.

Take a look at this lesson to learn more about these message types.

Now having said that, all OSPF messages are similar in structure. They all contain an OSPF header that contains information about the OSPF version number, a field that indicates the type of message, the area ID, and the source OSPF router of the message.

The rest of the sections of an OSPF packet depend on the type:

  • A hello packet will have a hello header, and an OSPF LLS data block
  • A database description will have an OSPF DB description header and an LLS data block
  • A link-state request will have only a Link State Request header
  • A link-state update will have only an LS update header (which contains the LSAs)
  • A link-state acknowledgment will have acknowledgments for specific LSAs that were received

You can take a detailed look at what these look like in the following Wireshark packet capture:


I hope this has been helpful!


Thank you Laz, this is very clear and useful.

1 Like

My question is How do i minimize LSA type 4 translation in my network.

Translation process as LSA hits ABR
-If i have multiple ABrs how does my translation works?

Hello Prashant

Can you be a little more specific about what you want to achieve? A Type 4 LSA is necessary when you have an ASBR sharing routes from another routing domain. The Type 4 LSA is required to let other areas of OSPF know where to find the ASBR. One way to limit the number of Type 4 LSAs is to modify your network architecture to eliminate ASBRs, but this may not be possible in some cases. Please elaborate on what you are trying to achieve so we can help you further.

I hope this has been helpful!