13 Replies Latest reply: Jan 30, 2010 4:12 PM by Sal RSS

    OSPF LSA (4/5)

    Cedric King

      Hi,

       

      Is there really a difference between Type 4 & 5 LSA?

         
        • 1. Re: OSPF LSA (4/5)
          mickey61

          LSA type 4 is a summary LSA ( ASBR location) and a type 5 LSA is a external LSA which is sent from an ASBR into and ospf area depending on what type of area you setup.

           

           

           

           

          • Type 4 - ASBR-Summary LSA - this is needed because Type 5 External LSAs are flooded to all areas and the detailed next-hop information may not be available in those other areas. This is solved by an Area Border Router flooding the information for the router (i.e. the Autonomous System Boundary Router) where the type 5 originated. The link-state ID is the router ID of the described ASBR for type 4 LSAs.
          • Type 5 - External LSA - these LSAs contain information imported into OSPF from other routing processes. They are flooded to all areas (except stub areas). For "External Type 1" LSAs routing decisions are made by adding the OSPF metric to get to the ASBR and the external metric from there on, while for "External Type 2" LSAs only the external metric is used. The link-state ID of the type 5 LSA is the external network number.
          • 2. Re: OSPF LSA (4/5)
            welly

            *LSA type 4 : ASBR-summary links
              - Links that point to ASBR
                note : --**ABR will create type 1 LSA and convert to type 4 so**--

                         #correction# ABR will learned type 1 LSA from ASBR and convert it to type 4 so
                         router on other area will know how to reach ASBR
            *LSA type 5 : External links
              - Originated by ASBR,
            describe routes to destinations external to the AS
              - Flooded all over entire domain

             

            thanks

            Welly

            • 3. Re: OSPF LSA (4/5)
              Scott Morris - CCDE/4xCCIE/2xJNCIE

              ABR doesn't create the type 1.  It learns the type 1 of the ASBR in the original area, but creates a type 4 (converts) in order to send to other areas.

               

              Just want to be sure we're all on the same page as wording may get confusing!

               

              Cheers,

               

              Scott

              • 4. Re: OSPF LSA (4/5)
                welly

                Thanks Scott for correcting me.

                 

                Sorry guys about the misconfusion

                 

                Welly

                • 5. Re: OSPF LSA (4/5)
                  Scott Morris - CCDE/4xCCIE/2xJNCIE

                  No worries.  We're all here to learn!  And sometimes the little nuances are easy to trip up on!  (We have all done it from time to time, myself certainly included!)

                   

                  Scott

                  • 6. Re: OSPF LSA (4/5)
                    Cedric King

                    Ok, but is it possible to have type 4s and no type 5s ?

                    • 7. Re: OSPF LSA (4/5)
                      welly

                      HI Cedric,

                       

                      Not a common case here, (attached is the topology)

                      but I have tried it on the lab, and it is possible to have the situation where LSA type 4 exist without LSA type 5

                       

                      *ASBR when advertising EIGRP routes

                      R3#sh run | section ospf
                      router ospf 1
                      log-adjacency-changes
                      redistribute eigrp 1 subnets
                      network 10.1.23.3 0.0.0.0 area 1

                       

                      R2#sh ip route       
                      Gateway of last resort is not set

                       

                           10.0.0.0/24 is subnetted, 3 subnets
                      C       10.1.12.0 is directly connected, Serial1/1
                      C       10.1.23.0 is directly connected, Serial1/2
                      O E2    10.1.34.0 [110/20] via 10.1.23.3, 00:00:02, Serial1/2
                      R2#

                       

                      R2#sh ip ospf database

                       

                                  OSPF Router with ID (10.1.23.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         525         0x80000007 0x006CD8 2
                      10.1.12.1       10.1.12.1       519         0x80000002 0x00918E 2
                      10.1.23.2       10.1.23.2       513         0x80000002 0x005EB3 2

                       

                                      Summary Net Link States (Area 0)

                       

                      Link ID         ADV Router      Age         Seq#       Checksum
                      10.1.23.0       10.1.23.2       518         0x80000001 0x006F47

                       

                                      Summary ASB Link States (Area 0)

                       

                      Link ID         ADV Router      Age         Seq#       Checksum
                      10.1.34.3       10.1.23.2       508         0x80000001 0x00C9DD

                       

                                      Router Link States (Area 1)

                       

                      Link ID         ADV Router      Age         Seq#       Checksum Link count
                      10.1.23.2       10.1.23.2       514         0x80000002 0x00B033 2
                      10.1.34.3       10.1.34.3       515         0x80000004 0x00795A 2

                       

                                      Summary Net Link States (Area 1)

                       

                      Link ID         ADV Router      Age         Seq#       Checksum
                      10.1.12.0       2.2.2.2         903         0x80000001 0x00BC21
                      10.1.12.0       10.1.23.2       518         0x80000001 0x00E8D8

                       

                                      Type-5 AS External Link States

                       

                      Link ID         ADV Router      Age         Seq#       Checksum Tag
                      10.1.34.0       10.1.34.3       536         0x80000001 0x007EC4 0

                       

                      =================================================================

                      Special case but its kind of weird : modifying ASBR not to redistributes any external routes

                       

                      R3#sh run | section ospf
                      router ospf 1
                      log-adjacency-changes
                      redistribute eigrp 1 subnets route-map NOT_ADVERTISE_EIGRP
                      network 10.1.23.3 0.0.0.0 area 1

                       

                      R3#sh run | begin route-map

                      route-map NO_ADV_EIGRP deny 10

                       

                      R2#sh ip route
                      Gateway of last resort is not set

                       

                           10.0.0.0/24 is subnetted, 2 subnets
                      C       10.1.12.0 is directly connected, Serial1/1
                      C       10.1.23.0 is directly connected, Serial1/2

                       

                      R2#sh ip ospf database

                       

                                  OSPF Router with ID (10.1.23.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         664         0x80000007 0x006CD8 2
                      10.1.12.1       10.1.12.1       657         0x80000002 0x00918E 2
                      10.1.23.2       10.1.23.2       652         0x80000002 0x005EB3 2

                       

                                      Summary Net Link States (Area 0)

                       

                      Link ID         ADV Router      Age         Seq#       Checksum
                      10.1.23.0       10.1.23.2       657         0x80000001 0x006F47

                       

                                      Summary ASB Link States (Area 0)

                       

                      Link ID         ADV Router      Age         Seq#       Checksum
                      10.1.34.3       10.1.23.2       647         0x80000001 0x00C9DD

                       

                                      Router Link States (Area 1)

                       

                      Link ID         ADV Router      Age         Seq#       Checksum Link count
                      10.1.23.2       10.1.23.2       653         0x80000002 0x00B033 2
                      10.1.34.3       10.1.34.3       653         0x80000004 0x00795A 2

                       

                                      Summary Net Link States (Area 1)

                       

                      Link ID         ADV Router      Age         Seq#       Checksum
                      10.1.12.0       2.2.2.2         1042        0x80000001 0x00BC21
                      10.1.12.0       10.1.23.2       657         0x80000001 0x00E8D8

                       

                      The question is that what is the consideration here to having the situation ASBR not advertising any routes?

                      Thanks,

                      please correct me

                       

                      Welly

                      • 8. Re: OSPF LSA (4/5)
                        Keith Bogart

                        Hi Welly,

                         

                        As I'm sure you know, every router participating within an OSPF area will send at least one Router LSA (Type-1) to describe one or more links it has in that area.  When an ASBR sends a Type-1 Router LSA it flips a bit within that LSA indicating that it is serving the role of an ASBR.  Even if that ASBR has nothing to redistribute...it will still flip that bit.

                         

                        So imagine that you have an ASBR that is configured to redistribute some protocol (such as RIP or EIGRP) but actually has no RIP or EIGRP routes to convert (maybe its neighbor is down...maybe it's having some Layer-1 or Layer-2 problems on the link connecting to it's RIP/EIGRP neighbor, etc). Even though it doesn't have any external routes to convert into OSPF it will still send its own Router LSAs with that bit set, advertising itself as an ASBR.

                         

                        When an ABR in that same area receives that Router LSA it will have the additional responsibility of generating a Type-4 ASBR-Summary LSA into Area-0 (or...if the ASBR resides in Area-0, advertising the Type-4 ASBR-Summary LSA into other adjacent areas).

                         

                        So in that case, you would see Type-4 LSAs in your Database but not any Type-5s.  But as mentioned above, this would most likely indicate an error of some kind.  If you've configured a router as an ASBR you're probably expecting that it should have something to redistribute.

                         

                        Hope that helps!

                        Keith

                        • 9. Re: OSPF LSA (4/5)
                          welly

                          Thanks Keith for your prompt explanation above,

                          and I am getting clearer now for the possible case (lost connectivity/link failure) you given so create the situation where ASBR will not advertised any routes.

                           

                          Appreciate that!

                           

                          Welly

                          • 10. Re: OSPF LSA (4/5)
                            Cedric King

                            Thanks everyone for the feedback. I wanted to make sure that I know this protocol inside and out before I moved on to studying the the monster of the Routing world (BGP)...

                            • 11. Re: OSPF LSA (4/5)
                              Scott Morris - CCDE/4xCCIE/2xJNCIE

                              heheheh...  BGPs lots of fun. 

                               

                              I've actually be spending a lot of time with it lately, not just on consulting stuff, but on recording audio content for an R&S class.  It's been making my other sections appear small!  heheeh.

                               

                              But like anything take it in small doses and try to get a feeling for how it "thinks".  putting things in context will always make it more manageable!  There's LOTS of stuff that you can do!

                               

                              Good luck in your studies!

                               

                              Scott

                              • 12. Re: OSPF LSA (4/5)
                                Sal

                                I had a look at another copy of the same book the typing error was fixed there!

                                 

                                 

                                Message was edited by: Sal

                                • 13. Re: OSPF LSA (4/5)
                                  Sal

                                  If External typ5 LSA come from outside the NSSA area (lets say from a backbone ASBR or an ASBR in another area, will the NSSA ABR translate them into Type-7 and pass them into the NSSA as it does in the opposite direction ie from type7 to type5.  And if it does not by default can that be configures. because there is a commant that I have notice that mentions something like this :  at the ABR  (area 2 nssa translate type 5 to 7)  . I not sure about the syntex but its something of this sort.