OSPF Router LSA (Type 1 LSA)

Written on by admin on. Posted in OSPF

Type 1 LSA (also called Router LSA) contains information about directed connected links in the area to which the router belong. They are flooded to all routers in that area. If the router is an ABR (Area Border Router), it generates type 1 LSAs for all the areas to which it is connected and send those LSAs to all neighbors in corresponding areas.

Router LSA

For example in the picture exposed above you see that ABR router has three links, two of them connected in area 0 and another one in area 1. So, it will generate one LSA for area 0 which will include links to R1 and R2, this LSA will be sent to all neighbors in area 0, i.e. to R1 and R2. Another LSA will be build for area 1 that will include links in area 1 which is link to R3, this LSA will be sent to R3 because R3 is only neighbor in area 1. This process also happens from opposite side, R1 with R2 send to ABR their type 1 LSAs with all directly connected links in area 0, R3 does the same with its link connected in area 1. LSA received by ABR from R2 is also transmitted to R1 and vice versa, R1 LSA is also carried to R2. I this way, every router in the area knows about all the other routers in the area and their enabled OSPF links. In next picture I added more details to our OSPF domain, let’s consider it and have a closer look on how router LSAs work .

Router-LSA-Topology

In this article I’m not going to show configurations for the routers (you can download GNS3 project from the attachment), all configurations are done according to the map above. We have four routers and two areas, where for each router I set router-id as follow: 1.1.1.1, 2.2.2.2, 3.3.3.3, 4.4.4.4. All ip addresses are configured on interfaces and OSPF is also configured. To get a quick picture of OSPF database (LSDB) use show ip ospf database command as follow:

ABR#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
1.1.1.1         1.1.1.1         1215        0x8000000B 0x0009F7 1
2.2.2.2         2.2.2.2         930         0x80000007 0x004722 2
4.4.4.4         4.4.4.4         1374        0x80000009 0x004CE3 3

                Net Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum
10.0.0.1        4.4.4.4         1374        0x80000002 0x0041CB

                Summary Net Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum
10.0.2.0        4.4.4.4         1374        0x80000006 0x00DEFF

                Router Link States (Area 1)

Link ID         ADV Router      Age         Seq#       Checksum Link count
3.3.3.3         3.3.3.3         336         0x80000006 0x001F41 2
4.4.4.4         4.4.4.4         1375        0x80000008 0x00A1B8 2

                Summary Net Link States (Area 1)

Link ID         ADV Router      Age         Seq#       Checksum
10.0.0.0        4.4.4.4         1375        0x80000004 0x00DA3E
10.0.1.0        4.4.4.4         1375        0x80000004 0x00EDF3
ABR#

As you can see, this output is from ABR, and colored in orange there are type 1 LSAs for area 0 and for area 1. As you might be expecting there are three router LSAs for area 0, one issued by R1, one by R2 and one by ABR. In area 1, there are two router LSAs, one issued by R3 and one by ABR. If you issue the same command on another router in area 0, you will not see any LSAs related to other areas than 0.

R1#show ip ospf database 

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

                Router Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum Link count
1.1.1.1         1.1.1.1         157         0x8000000C 0x0007F8 1
2.2.2.2         2.2.2.2         56          0x80000008 0x004523 2
4.4.4.4         4.4.4.4         297         0x8000000A 0x004AE4 3

                Net Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum
10.0.0.1        4.4.4.4         297         0x80000003 0x003FCC

                Summary Net Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum
10.0.2.0        4.4.4.4         297         0x80000007 0x00DC01
R1#

This command gives us a brief look on router LSAs, it shows Link state ID, advertising router, age, sequence number, checksum, and number of links the LSA represent.

Notice that Link state ID for Router LSA is the same as Router-ID.

To have a detailed view on router LSA use show ip ospf database router, or even more, you can specify Link ID or advertising router to filter LSAs like below:

R1#show ip ospf database router adv-router 4.4.4.4

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

                Router Link States (Area 0)

  Routing Bit Set on this LSA
  LS age: 6
  Options: (No TOS-capability, DC)
  LS Type: Router Links
  Link State ID: 4.4.4.4
  Advertising Router: 4.4.4.4
  LS Seq Number: 8000000B
  Checksum: 0x48E5
  Length: 60
  Area Border Router
  Number of Links: 3

    Link connected to: another Router (point-to-point)
     (Link ID) Neighboring Router ID: 2.2.2.2
     (Link Data) Router Interface address: 10.0.1.1
      Number of TOS metrics: 0
       TOS 0 Metrics: 64

    Link connected to: a Stub Network
     (Link ID) Network/subnet number: 10.0.1.0
     (Link Data) Network Mask: 255.255.255.252
      Number of TOS metrics: 0
       TOS 0 Metrics: 64

    Link connected to: a Transit Network
     (Link ID) Designated Router address: 10.0.0.1
     (Link Data) Router Interface address: 10.0.0.1
      Number of TOS metrics: 0
       TOS 0 Metrics: 10

R1#

The output is from ABR, where three links are described, but actually there are two physical links. The first two links describe connection between R2 and ABR, and the third one – connection between R1 and ABR. Here is also included cost for corresponding links.

In case there are any topology changes in area 1, only R3 and ABR will do spf calculations, R1 and R2 won’t. But if for example the link between ABR and R2 goes down, ABR will age out immediately LSA issued by R2 by setting age to 3600 and will send it to R1. ABR also will resend its own LSA with removed link to R2 within it, and with increased sequence number. This will lead to SPF calculations on all routers in area 0.

Well, that’s all for Router LSAs. I hope it was informing for you and thank you for reading!
16468 views

Comments (10)

  • Geronimo

    |

    Hi There!

    I’m just confused about one thing. What’s the difference between the link between R1 – ABR and the link between R2 – ABR (serial point to point)?

    One is red and the other it’s a straight line, what does that represent? To me they are both P2P links.

    Thanks!!

    Reply

    • admin

      |

      Hi,

      Straight line is a Ethernet link while red line is a Point to Point link. They behave different to each other. On a P2P segment can be connected only 2 routers, while a ethernet segment (multiaccess) can connect more than two routers.

      Imagine that between ABR and R1 you place a Layer 2 switch and from that switch you connect few more routers. OSPF behaves differently for these two kinds of links. On P2P links DR/BDR election doesn’t take place.

      BR

      Reply

      • Geronimo

        |

        Got it! I was just reading this book “OSPF Network Design Solutions (2nd edition)” and there’s a page at the beginning were explains the difference between those 2.

        Thanks for the quick reply and great job with these set of articles!

        Reply

  • D Sinha

    |

    2.2.2.2 2.2.2.2 930 0x80000007 0x004722 2

    why Link Count is 2 here???

    Reply

  • awais khan

    |

    the post is too informative about LSA , tnx dear

    Reply

  • Rajesh

    |

    Where can I find the link for gns3 lab attachment. Please point.

    Reply

    • admin

      |

      Hi Rajesh,
      Please check now, you should be able to download.
      Thanks

      Reply

  • Gurmeet

    |

    Nice

    Reply

  • Lachna

    |

    Thanks for writing this up.

    I have the same as D Sinha.

    2.2.2.2 2.2.2.2 930 0x80000007 0x004722 2
    why Link Count is 2 here???

    Thanks!

    Reply

    • Kevin Morales

      |

      Hi, Because R2 is has OSPF enable on those (Serial 0/0 and LoopBack ) interfaces…

      Reply

Leave a comment


three × = 6