OSPF LSA Types Explained

Hi All,

I am reading the following when talking about R1 redistributing rip routes.

“What happens is that R1 will flip a bit in the router LSA to identify itself as an ASBR”.

Is this bit flipped in all the router LSAs (type 1) from R1or is this bit flipped only for a specific router LSA from R1?

Hello Robert

R1 will flip a bit in the LSA Type 1 because it is an ASBR. The flipping of the bit occurs only for Type 1 LSAs.

I hope this has been helpful!

Laz

Hello Network lessons team,

thank you so much for this good explanation, can you please provide me some other topologies for practice. please

Hello Faraz

Take a look at Rene’s GNS3Vault page that has many lab scenarios for many networking technologies. The link below shows those for OSPF and include topologies for examining LSA types as well:

I hope this has been helpful!

Laz

R2 will translate this type 7 into a type 5 and flood it into the other areas.
is it true.

Hello Bahri

Yes this is true. R2 is an ABR and it will receive the type 7 LSA from the NSSA area and will incorporate its information into its OSPF database. It will then send out a type 5 LSA into Area 0 with the information learned from the type 7 LSA.

I hope this has been helpful!

Laz

Hello. I was hoping an elaboration can be provided as to why Type 2 LSAs are needed. I went to the Cisco Press book and it states that OSPF has to see things as Node -> Link -> Node so it uses LSA Type 2 to model this in situations when there are more than two routers on a link. My problem is with all the verbose jargon in the book. I was hoping someone a lot more knowledgeable than I am could provide a more clear elaboration as to what the Type 2 LSAs do. Thank you.

Hello Mike

Type 2 LSAs are sent by DRs to all DROTHER (non-DR and non-BDR) routers in a multiaccess network. A multiaccess network is one where you can have multiple routers connected to the same network segment such as in the following topology:

Such a topology requires the election of a DR and a BDR. A DR will accept all Type 1 LSAs from other routers within the specific broadcast domain (not the area mind you but the broadcast domain). It will then compile all the information found in all of those Type 1 LSAs and create a Type 2 LSA. It will then send this out to all of the DROTHER routers in the broadcast domain.

The very purpose of the Type 2 LSA is to be used solely by the DR (and BDR) in a multi-access network environment. Even if you only have two routers connected with each other via an Ethernet connection, they will still have a DR/BDR election and use both Type 1 and Type 2 LSAs just because the Ethernet technology is inherently multiaccess. Conversely, Type 2 LSAs will not be found in any point to point technologies such as serial connections between OSPF routers.

More info about DRs and BDRs can be found here:

I hope this has been helpful!

Laz

Hello. I was hoping an elaboration can be provided as to why Type 2 LSAs are needed. I went to the Cisco Press book and it states that OSPF has to see things as Node -> Link -> Node so it uses LSA Type 2 to model this in situations when there are more than two routers on a link. My problem is with all the verbose jargon in the book. I was hoping someone a lot more knowledgeable than I am could provide a more clear elaboration as to what the Type 2 LSAs do. Thank you.

Hello Mike

Please take a look at the post above:

I hope this has been helpful.

Laz

Still can’t say that I completely get Type 2 LSAs…seems like Type 1s could do the trick alone.

Hello Mike

Let me try again. Here are a few fundamental differences between Type 1 and 2 LSAs

  1. Type 1 LSAs by definition are sent from an OSPF router to ALL of its neighbors while Type 2 LSAs are sent only from DRs to all routers in their network segment.
  2. Type 1 LSAs contain information about routes that a single OSPF router knows about while Type 2 LSAs contain information regarding all OSPF routers in the LAN segment. This allows the OSPF algorithm to use a single Type 2 LSA to reference all routers in a segment. Type 1 LSAs cannot do this.

Now you are correct when you say that Type 1 LSAs are sufficient to do the job. However, there is a great gain in efficiency if you use Type 2 LSAs. The benefit is experienced when you have many, say, 10 OSPF routers on the same network segment, and you have no DR or BDR, then you would require N*(N-1)/2 adjacencies. That’s 10*(10-1)/2 = 45 adjacencies. That will require 45 exchanges of Type 1 LSAs in total just for that network segment to converge. This results in a lot of CPU and memory usage as well as bandwidth. Using Type 2, you only require 9 Type 1 LSAs sent from all routers to the DR plus 9 more Type 2 LSAs to be sent from the DR to all the other routers. This is a vast improvement.

I hope this has been helpful!

Laz

Thank you very much!

1 Like

When talking about the lsa 4 , what if we redistribute connected networks ?

Hello Sims

A type 4 LSA is one that is created when an ASBR redistributes its subnets that participate in a particular routing protocol, into OSPF. For example, if R1 has 10.10.10.0/24 on interface Gi0/1 which is participating in RIP, and it is redistributed into OSPF, then this would be contained within a type 4 LSA.

Conversely, if you redistributed directly connected networks that are not participating in OSPF, then you are using a type 5 LSA to convey this information to other OSPF routers.

I hope this has been helpful!

Laz

Hi Rene,

I think I found small typo in section “Let me summarize the LSA types for you:”
“Type 7 – External LSA: also known as not-so-stubby-area (NSSA) LSA: As you can see area 1 is a NSSA (not-so-stubby-area) which doesn’t allow external LSAs (type 5). To overcome this issue we are generating type 7 LSAs instead.”

On drawing NSSA its area 2 :wink:

Best regards,
Lukas

1 Like

Hi Lukas,

Late reply here. I just fixed this, thanks for sharing :slight_smile:

Rene

LSA type 4 is originated at ABR and sent to ASBR given in other training websites and on google too…LSA type 5 is originated at ASBR and sent to ABR…Here your explanation about LSA type 4 and LSA type 5 definition looks to be same… Not clearly defined

Hello!

I’ve been learning about type-5 LSAs or Autonomous System External LSAs and wondered how having more than one instance of OSPF running on the same device would affect this?

Would you have to redistribute from one process into another to share routes?

Would each instance or OSPF process ID be considered a different Autonomous System?

Thanks,

Gareth.

Hello Gareth

Yes, you’re absolutely correct.

Yes, that is the case. If you want one instance to learn about the routes of the other, you would have to perform redistribution between the two AS’es. Each interface would have to belong to either OSPF instance, and a router with two or more OSPF instances would be considered an ASBR in relation to networks that exist on its own interfaces.

I hope this has been helpful!

Laz