OSPF LSA Types Explained

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

Thanks for confirming Laz.

1 Like

Hii Rene,

I have a doubt on LSA Type 4.Summary ASBR LSA.
i am attaching my configuration which i tried in GNS Lab.
R1->R4->R2(R1 is in Area 1 and ASBR,R4 is ABR, R2 is in Area0)

In R4 ABR why we didnot find any LSA Type 4 for Area 1. other router in Area1 also should locate ASBR.so how other routers in Area1 knows abt ASBR. ? Please explain.

R1#
interface FastEthernet1/0
 ip address 10.10.2.1 255.255.255.0
interface Ethernet3/0
 ip address 192.168.1.1 255.255.255.0
interface Ethernet3/1
 ip address 192.168.2.1 255.255.255.0
interface Ethernet3/2
 ip address 192.168.3.1 255.255.255.0
router ospf 1
 router-id 1.1.1.1
  redistribute connected subnets
 passive-interface Ethernet3/0
 passive-interface Ethernet3/1
 passive-interface Ethernet3/2
 network 10.10.2.0 0.0.0.255 area 1

R4
interface FastEthernet0/0
 ip address 11.11.1.1 255.255.255.0
interface FastEthernet1/0
 ip address 10.10.2.2 255.255.255.0
router ospf 1
 router-id 4.4.4.4
 network 10.10.2.0 0.0.0.255 area 1
 network 11.11.1.0 0.0.0.255 area 0
 
R2
interface FastEthernet0/0
 ip address 11.11.1.2 255.255.255.0
router ospf 1
 router-id 2.2.2.2
 network 11.11.1.0 0.0.0.255 area 0
###########OUTPUT ###########
R1
C       10.10.2.0 is directly connected, FastEthernet1/0
     11.0.0.0/24 is subnetted, 1 subnets
O IA    11.11.1.0 [110/2] via 10.10.2.2, 00:00:15, FastEthernet1/0
C    192.168.1.0/24 is directly connected, Ethernet3/0
C    192.168.2.0/24 is directly connected, Ethernet3/1
C    192.168.3.0/24 is directly connected, Ethernet3/2
R1#show ip ospf database

            OSPF Router with ID (1.1.1.1) (Process ID 1)

                Router Link States (Area 1)

Link ID         ADV Router      Age         Seq#       Checksum Link count
1.1.1.1         1.1.1.1         74          0x80000006 0x00678D 1
4.4.4.4         4.4.4.4         75          0x80000005 0x008F4E 1

                Net Link States (Area 1)

Link ID         ADV Router      Age         Seq#       Checksum
10.10.2.2       4.4.4.4         80          0x80000001 0x00BC41

                Summary Net Link States (Area 1)

Link ID         ADV Router      Age         Seq#       Checksum
11.11.1.0       4.4.4.4         85          0x80000001 0x00FB19

                Type-5 AS External Link States

Link ID         ADV Router      Age         Seq#       Checksum Tag
192.168.1.0     1.1.1.1         75          0x80000003 0x000927 0
192.168.2.0     1.1.1.1         75          0x80000003 0x00FD31 0
192.168.3.0     1.1.1.1         76          0x80000003 0x00F23B 0
R4
     10.0.0.0/24 is subnetted, 1 subnets
C       10.10.2.0 is directly connected, FastEthernet1/0
     11.0.0.0/24 is subnetted, 1 subnets
C       11.11.1.0 is directly connected, FastEthernet0/0
O E2 192.168.1.0/24 [110/20] via 10.10.2.1, 00:01:49, FastEthernet1/0
O E2 192.168.2.0/24 [110/20] via 10.10.2.1, 00:01:49, FastEthernet1/0
O E2 192.168.3.0/24 [110/20] via 10.10.2.1, 00:01:49, FastEthernet1/0
R4#show ip ospf database

            OSPF Router with ID (4.4.4.4) (Process ID 1)

                Router Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum Link count
2.2.2.2         2.2.2.2         147         0x80000005 0x0035B7 1
4.4.4.4         4.4.4.4         145         0x80000004 0x00934A 1

                Net Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum
11.11.1.2       2.2.2.2         151         0x80000001 0x003DC3

                Summary Net Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum
10.10.2.0       4.4.4.4         143         0x80000003 0x00060E

                Summary ASB Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum
1.1.1.1         4.4.4.4         123         0x80000005 0x00D64C

                Router Link States (Area 1)

Link ID         ADV Router      Age         Seq#       Checksum Link count
1.1.1.1         1.1.1.1         138         0x80000006 0x00678D 1
4.4.4.4         4.4.4.4         139         0x80000005 0x008F4E 1

                Net Link States (Area 1)

Link ID         ADV Router      Age         Seq#       Checksum
10.10.2.2       4.4.4.4         144         0x80000001 0x00BC41

                Summary Net Link States (Area 1)

Link ID         ADV Router      Age         Seq#       Checksum
11.11.1.0       4.4.4.4         149         0x80000001 0x00FB19

                Type-5 AS External Link States

Link ID         ADV Router      Age         Seq#       Checksum Tag
192.168.1.0     1.1.1.1         141         0x80000003 0x000927 0
192.168.2.0     1.1.1.1         141         0x80000003 0x00FD31 0
192.168.3.0     1.1.1.1         141         0x80000003 0x00F23B 0

R2
O IA    10.10.2.0 [110/2] via 11.11.1.1, 00:02:47, FastEthernet0/0
     11.0.0.0/24 is subnetted, 1 subnets
C       11.11.1.0 is directly connected, FastEthernet0/0
O E2 192.168.1.0/24 [110/20] via 11.11.1.1, 00:02:27, FastEthernet0/0
O E2 192.168.2.0/24 [110/20] via 11.11.1.1, 00:02:27, FastEthernet0/0
O E2 192.168.3.0/24 [110/20] via 11.11.1.1, 00:02:27, FastEthernet0/0

R2#show ip ospf database

            OSPF Router with ID (2.2.2.2) (Process ID 1)

                Router Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum Link count
2.2.2.2         2.2.2.2         195         0x80000005 0x0035B7 1
4.4.4.4         4.4.4.4         195         0x80000004 0x00934A 1

                Net Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum
11.11.1.2       2.2.2.2         199         0x80000001 0x003DC3

                Summary Net Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum
10.10.2.0       4.4.4.4         192         0x80000003 0x00060E

                Summary ASB Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum
1.1.1.1         4.4.4.4         172         0x80000005 0x00D64C

                Type-5 AS External Link States

Link ID         ADV Router      Age         Seq#       Checksum Tag
192.168.1.0     1.1.1.1         189         0x80000003 0x000927 0
192.168.2.0     1.1.1.1         191         0x80000003 0x00FD31 0
192.168.3.0     1.1.1.1         191         0x80000003 0x00F23B 0
R2#