cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
10293
Views
10
Helpful
12
Replies

OSPF LSA type 4

yangfrank
Level 1
Level 1

Dear All

Anyone can help me understand ospf lsa type4, or I can say we can use type 5 to replace type4. Why is type 4 necessary for all other router know where to find ASBR? Please see the diagram in attachment. Thank you

Frank

 

3 Accepted Solutions

Accepted Solutions

As per your network diagram, you will see Type 4 LSA in Area 0 and 51.

Type 4 LSA is basically to identify how to get to ASBR.

Area 2 where you are re-distributing external routes and where the ASBR is present will NOT have type 4 LSA. This is because all routers in area 2 where ASBR is present will know how to reach to ASBR router because they exchange Type 1 LSA. 

This is very good document about Type 4 LSA. A must read:

http://astorinonetworks.com/2011/06/06/understanding-ospf-type-4-lsas/

CF

View solution in original post

Hi Ashok,

I am afraid you are not entirely correct.

You are right that for E1 routes originated from other areas, the total cost is calculated as the cost from the particular router to the ABR (LSA-1 and LSA-2) plus the cost from the ABR to the ASBR (LSA-4) plus the cost of the redistributed route (LSA-5), while for E2 routes, its cost is directly taken from the LSA-5 and is not incremented in the OSPF domain. However, if two or more ASBRs advertise an E2 route with the same cost, OSPF tries to choose the path to the nearest ASBR, and to calculate that, you need to revert to the sum of the costs to reach the ABR (LSA-1 and LSA-2) plus the cost of reaching the ASBR (LSA-4). So even for E2 routes, metric information in LSA-4 is required even though it is not directly reflected in the E2 cost.

There is, however, a more profound need for the LSA-4. To explain, we first need to focus on a specific property of LSA-5. An LSA-5 is in fact the only LSA from the standard LSA set (types 1 through 5) that is flooded unmodified across all regular areas of an OSPF domain. Every LSA-5 is associated with the ASBR that originated it by the value of the Advertising Router ID in its header. This association is of utmost importance because if the Forwarding Address in an LSA-5 is zero (which, for the most cases, truly is) then the originating ASBR is to be used as the next hop for this particular external route. Therefore, every router processing such LSA-5 must know the location of the ASBR to be able to compute the shortest path to it, and through it, to the external route.

Now, in the area where the ASBR resides, every router immediately knows who the ASBR is because its LSA-1 is known to every router in the area. However, after the LSA-5 is flooded to another area, routers in that area have no clue - just by looking at the LSA-5's Advertising Router ID - who the ASBR is and how to reach it because its LSA-1 is known in the ASBR's own area only. In other words, in every other area, routers are unable to associate the LSA-5 with its orginating router because they do not know it and so they cannot compute the shortest path to it, and through it, to the external route.

This is where the LSA-4 comes in. An LSA-4 itself is originated by the ABR and it tells every router in the other area: "Hey, if you want to go to this particular ASBR, you can go through me and it will cost you this much." Now, every router in that other area knows that to reach the ASBR that originated the particular LSA-5, they first need to reach the particular ABR, and now the shortest path computation can be completed.

In graph theory terms, an LSA-4 is necessary in other areas to make the graph connected; otherwise, LSA-5 would constitute disconnected, unreachable components of the graph, thereby excluded from the shortest path calculation.

Best regards,
Peter

View solution in original post

Hi,

Yes, that one is exactly the LSA-4.

It does not denote "type 4" for the LSA type4

In general, sections in the show ip ospf database output are not denoted by the numerical LSA type. You always have to keep their verbose names in mind:

  • LSA-1: Router Link States (RFC 2328 name is Router-LSA)
  • LSA-2: Network Link States (RFC 2328 name is Network-LSA)
  • LSA-3: Summary Net Link States (RFC 2328 name is Type 3 Summary-LSA)
  • LSA-4: Summary ASB Link States (RFC 2328 name is Type 4 Summary-LSA)
  • LSA-5: Type-5 AS External Link States (RFC 2328 name is AS-external-LSA)
  • LSA-7: Type-7 AS External Link States (RFC 3101 name is Type-7 LSA or Type-7 AS-external-LSA)

In fact, the Type-5 or Type-7 is shown only with LSA-5 and LSA-7 because they both advertise external routes, and if you called them simply "External Link States" in the show ip ospf database output, they would not be distiguishable.

Best regards,
Peter

View solution in original post

12 Replies 12

Reza Sharifi
Hall of Fame
Hall of Fame

Hi,

They are different and have different functions and one can't replace the other.

Have a look at this doc for explanation:

 

https://learningnetwork.cisco.com/servlet/JiveServlet/previewBody/13399-102-1-51101/OSPFLSATypes.pdf

HTH

 

 

 

Thanks for your reply. Can we see type 4 when we show ip ospf database ? I did not see type 4

As per your network diagram, you will see Type 4 LSA in Area 0 and 51.

Type 4 LSA is basically to identify how to get to ASBR.

Area 2 where you are re-distributing external routes and where the ASBR is present will NOT have type 4 LSA. This is because all routers in area 2 where ASBR is present will know how to reach to ASBR router because they exchange Type 1 LSA. 

This is very good document about Type 4 LSA. A must read:

http://astorinonetworks.com/2011/06/06/understanding-ospf-type-4-lsas/

CF

Thank all for your excellent reply. Please see the diagram in attachment. So I can only see LSA 4 using command -- show ip ospf database asbr-summary at R2, right ? But unlike LSA5, LSA4 is not indicated as LSA4 when using show ip ospf database, right ?  

 

Hi,

So I can only see LSA 4 using command -- show ip ospf database asbr-summary at R2, right ?

You will see it both on R2 and R5 but on R5, the LSA-4 will be in the link-state database for Area 25 only (remember that ABR maintain a separate link-state database for each area they are connected to).

But unlike LSA5, LSA4 is not indicated as LSA4 when using show ip ospf database, right ? 

No, this is not correct. LSA-4 are printed out in a section titled Summary ASB Link States. In this output, you can see LSA-1, LSA-3, LSA-4, and LSA-5 summarily printed out in a show ip ospf database output:

 

R1# show ip ospf database

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

        Router Link States (Area 1)

Link ID         ADV Router      Age         Seq#       Checksum Link count
10.255.255.1    10.255.255.1    52          0x80000001 0x004FBD 2
10.255.255.2    10.255.255.2    48          0x80000002 0x0044C4 2

        Summary Net Link States (Area 1)

Link ID         ADV Router      Age         Seq#       Checksum
10.0.23.0       10.255.255.2    56          0x80000001 0x008E1D

        Summary ASB Link States (Area 1)

Link ID         ADV Router      Age         Seq#       Checksum
10.255.255.3    10.255.255.2    56          0x80000001 0x00605E

        Type-5 AS External Link States

Link ID         ADV Router      Age         Seq#       Checksum Tag
10.1.23.0       10.255.255.3    59          0x80000001 0x00EE82 0
10.1.34.0       10.255.255.3    59          0x80000001 0x0075F0 0
10.255.255.3    10.255.255.3    62          0x80000001 0x00DAAB 0

 

Best regards,
Peter

Hi Peter

Thank you! Based on your above post, the LSA4 should be below: right ? It does not denote "type 4" for the LSA type4

Summary ASB Link States (Area 1)

Link ID         ADV Router      Age         Seq#       Checksum
10.255.255.3    10.255.255.2    56          0x80000001 0x00605E

Hi,

Yes, that one is exactly the LSA-4.

It does not denote "type 4" for the LSA type4

In general, sections in the show ip ospf database output are not denoted by the numerical LSA type. You always have to keep their verbose names in mind:

  • LSA-1: Router Link States (RFC 2328 name is Router-LSA)
  • LSA-2: Network Link States (RFC 2328 name is Network-LSA)
  • LSA-3: Summary Net Link States (RFC 2328 name is Type 3 Summary-LSA)
  • LSA-4: Summary ASB Link States (RFC 2328 name is Type 4 Summary-LSA)
  • LSA-5: Type-5 AS External Link States (RFC 2328 name is AS-external-LSA)
  • LSA-7: Type-7 AS External Link States (RFC 3101 name is Type-7 LSA or Type-7 AS-external-LSA)

In fact, the Type-5 or Type-7 is shown only with LSA-5 and LSA-7 because they both advertise external routes, and if you called them simply "External Link States" in the show ip ospf database output, they would not be distiguishable.

Best regards,
Peter

Excellent explanation! Thank you!

Excellent explanation on shared link.. Thanks Cisco Freak ..

Ashok Kumar
Cisco Employee
Cisco Employee

Hi yangfrank,

You might have heard of E1 & E2 OSPF routes & also about the difference.

E1 = Cost to reach ASBR (LSA 4) + Cost to reach from ASBR to Router originating that route (LSA 5)

E2 = Cost to reach from ASBR to Router originating that route (LSA 5)

LSA 4 points to the ASBR & gives the Cost to reach ASBR.

So, answer to your question is that, LSA 4 is used in conjunction with LSA 5 to create the E1 & E2 OSPF routes 


- Ashok

******************************************************************************************************

Please rate the post or mark as correct answer as it will help others looking for similar information

******************************************************************************************************

Hi Ashok,

I am afraid you are not entirely correct.

You are right that for E1 routes originated from other areas, the total cost is calculated as the cost from the particular router to the ABR (LSA-1 and LSA-2) plus the cost from the ABR to the ASBR (LSA-4) plus the cost of the redistributed route (LSA-5), while for E2 routes, its cost is directly taken from the LSA-5 and is not incremented in the OSPF domain. However, if two or more ASBRs advertise an E2 route with the same cost, OSPF tries to choose the path to the nearest ASBR, and to calculate that, you need to revert to the sum of the costs to reach the ABR (LSA-1 and LSA-2) plus the cost of reaching the ASBR (LSA-4). So even for E2 routes, metric information in LSA-4 is required even though it is not directly reflected in the E2 cost.

There is, however, a more profound need for the LSA-4. To explain, we first need to focus on a specific property of LSA-5. An LSA-5 is in fact the only LSA from the standard LSA set (types 1 through 5) that is flooded unmodified across all regular areas of an OSPF domain. Every LSA-5 is associated with the ASBR that originated it by the value of the Advertising Router ID in its header. This association is of utmost importance because if the Forwarding Address in an LSA-5 is zero (which, for the most cases, truly is) then the originating ASBR is to be used as the next hop for this particular external route. Therefore, every router processing such LSA-5 must know the location of the ASBR to be able to compute the shortest path to it, and through it, to the external route.

Now, in the area where the ASBR resides, every router immediately knows who the ASBR is because its LSA-1 is known to every router in the area. However, after the LSA-5 is flooded to another area, routers in that area have no clue - just by looking at the LSA-5's Advertising Router ID - who the ASBR is and how to reach it because its LSA-1 is known in the ASBR's own area only. In other words, in every other area, routers are unable to associate the LSA-5 with its orginating router because they do not know it and so they cannot compute the shortest path to it, and through it, to the external route.

This is where the LSA-4 comes in. An LSA-4 itself is originated by the ABR and it tells every router in the other area: "Hey, if you want to go to this particular ASBR, you can go through me and it will cost you this much." Now, every router in that other area knows that to reach the ASBR that originated the particular LSA-5, they first need to reach the particular ABR, and now the shortest path computation can be completed.

In graph theory terms, an LSA-4 is necessary in other areas to make the graph connected; otherwise, LSA-5 would constitute disconnected, unreachable components of the graph, thereby excluded from the shortest path calculation.

Best regards,
Peter

Hi Peter,

Thanks for adding your comments & through explanation.

Since, it was too obvious; that OSPF's SPF take into account the dijkstra's algorithm. 

So didn't mention, complex graph theory part in there.

Thanks again for adding your valuable feedback.  I've edited my post.


- Ashok

******************************************************************************************************

Please rate the post or mark as correct answer as it will help others looking for similar information

******************************************************************************************************

 

Review Cisco Networking for a $25 gift card