Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Webcast-Catalyst9k
New Member

OSPF LSA Type 1 in same area

Hi All,

I am hoping if someone can help me understand how do OSPF neighbors see LSA Type 1 in the same area.

Please see the network topology attached.

I have got three routers( R1, R2 and R3) in the same area (Area 0)

R2 and R3 are directly connected to R1.

R2 is advertising two looback addresses to R1 and R3 but when I run Show ip ospf database on to R3 it does not show the loopback addresses.

I can see that the routes are being learned by R3 and also the Router links states count reflecting that R2 is advertising the routes.

Why are the loopback addresses not shown in IP OSPF database? When I run show ip ospf database router adv-router 2.2.2.2 the output shows that R2 is advertising those routes.

R3#sh ip ospf database

            OSPF Router with ID (3.3.3.3) (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         1784        0x80000002 0x003C66 2

2.2.2.2         2.2.2.2         1699        0x80000006 0x003D05 3

3.3.3.3         3.3.3.3         1916        0x80000003 0x00D504 1

                Net Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum

10.1.12.2       2.2.2.2         1699        0x80000002 0x00B05B

10.1.13.3       3.3.3.3         1916        0x80000002 0x009F62

R3#sh ip ospf database router adv-router 2.2.2.2

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

                Router Link States (Area 0)

  LS age: 136

  Options: (No TOS-capability, DC)

  LS Type: Router Links

  Link State ID: 2.2.2.2

  Advertising Router: 2.2.2.2

  LS Seq Number: 80000007

  Checksum: 0x3B06

  Length: 60

  Number of Links: 3

    Link connected to: a Stub Network

     (Link ID) Network/subnet number: 172.17.2.0

     (Link Data) Network Mask: 255.255.255.0

      Number of TOS metrics: 0

       TOS 0 Metrics: 1

    Link connected to: a Stub Network

     (Link ID) Network/subnet number: 172.17.1.0

     (Link Data) Network Mask: 255.255.255.0

      Number of TOS metrics: 0

       TOS 0 Metrics: 1

    Link connected to: a Transit Network

     (Link ID) Designated Router address: 10.1.12.2

     (Link Data) Router Interface address: 10.1.12.2

      Number of TOS metrics: 0

       TOS 0 Metrics: 10

Thank you in advance.

Regards,

Jay

Everyone's tags (5)
1 ACCEPTED SOLUTION

Accepted Solutions
Cisco Employee

OSPF LSA Type 1 in same area

Hello Jay,

Why are the loopback addresses not shown in IP OSPF database?

Please allow me to start from a more distant end. Each LSA has a header that contains several key  information, such as its type, sequence number, age, but most  importantly, its unique identifier (known as the Link-State ID) and its  originator (Advertising Router). The unique identifier is tremendously important because it is how one LSA refers to another - by referencing the other LSA's unique ID. Different types of LSAs use different values to populate this unique Link-State ID field:

  • LSA-1 uses the router's Router ID (completely unrelated to addressing)
  • LSA-2 uses the IP address of the Designated Router
  • LSA-3 uses the IP address of the network from another area
  • LSA-4 uses the ASBR's Router ID (completely unrelated to addressing)
  • LSA-5 and LSA-7 use the IP address of the external network

The Advertising Router field is simpler - it is always set to the Router ID of the router that generated the LSA.

Because of its importance, the Link State ID is also shown in the show ip ospf database output in the "Link ID" column. Tthe field's name is actually a misnomer because there is also something called "Link ID" in OSPF but it has a different meaning than Link-State ID. The show ip ospf database has a "Link ID" column but in reality, it is the Link-State ID which is shown there.

Notice that in LSA-1 and LSA-4, the Link-State ID has no relation to addressing, in other words, neither LSA-1 nor LSA-4 header contains any usable addressing information. If an LSA-1 carries addressing information, it is stored in the LSA-1's body which is not visible in the show ip ospf database output. You have to use the show ip ospf database router command to see the contents of LSA-1. This is probably what confuses you - that you expect the show ip ospf database output to actually contain addressing information, while it does not. Remember, this command shows you only the LSA headers - and with LSA-1 and LSA-4 in particular, they contain no addressing information.

This fact is confirmed by the output you have provided later yourself in the show ip ospf database router adv-router 2.2.2.2 - here, the loopback addresses are advertised as stub networks 172.17.1.0/24 and 172.17.2.0/24.

Please feel welcome to ask further!

Best regards,

Peter

2 REPLIES
Cisco Employee

OSPF LSA Type 1 in same area

Hello Jay,

Why are the loopback addresses not shown in IP OSPF database?

Please allow me to start from a more distant end. Each LSA has a header that contains several key  information, such as its type, sequence number, age, but most  importantly, its unique identifier (known as the Link-State ID) and its  originator (Advertising Router). The unique identifier is tremendously important because it is how one LSA refers to another - by referencing the other LSA's unique ID. Different types of LSAs use different values to populate this unique Link-State ID field:

  • LSA-1 uses the router's Router ID (completely unrelated to addressing)
  • LSA-2 uses the IP address of the Designated Router
  • LSA-3 uses the IP address of the network from another area
  • LSA-4 uses the ASBR's Router ID (completely unrelated to addressing)
  • LSA-5 and LSA-7 use the IP address of the external network

The Advertising Router field is simpler - it is always set to the Router ID of the router that generated the LSA.

Because of its importance, the Link State ID is also shown in the show ip ospf database output in the "Link ID" column. Tthe field's name is actually a misnomer because there is also something called "Link ID" in OSPF but it has a different meaning than Link-State ID. The show ip ospf database has a "Link ID" column but in reality, it is the Link-State ID which is shown there.

Notice that in LSA-1 and LSA-4, the Link-State ID has no relation to addressing, in other words, neither LSA-1 nor LSA-4 header contains any usable addressing information. If an LSA-1 carries addressing information, it is stored in the LSA-1's body which is not visible in the show ip ospf database output. You have to use the show ip ospf database router command to see the contents of LSA-1. This is probably what confuses you - that you expect the show ip ospf database output to actually contain addressing information, while it does not. Remember, this command shows you only the LSA headers - and with LSA-1 and LSA-4 in particular, they contain no addressing information.

This fact is confirmed by the output you have provided later yourself in the show ip ospf database router adv-router 2.2.2.2 - here, the loopback addresses are advertised as stub networks 172.17.1.0/24 and 172.17.2.0/24.

Please feel welcome to ask further!

Best regards,

Peter

New Member

OSPF LSA Type 1 in same area

Hello Peter,

Really appreciate your time for explaining this to me.

So in summary show ip ospf databse would only show the number and type of LSAs in the database.

The only way you can check the addresses in LSA is by show ip ospf database [ router | network|summary|asbr-summary] adv-router.

DBDs packet contains the Link state ID of the router.  So when the router requests for LS (request) the replying router would  send all the links on connected to it. For example -

-R1(link ID 1.1.1.1) --> R2

-R2(link ID 2.2.2.2) - > R1

-R1 -LS -request(ID2.2.2.2.2) - > R2

-R2 - LS UPDATE(172.17.1.0,172.17.2.0) - > R1

Is this right?

Also i have found an old post in which someone has asked the same question as me and you had explained very well in that too,

https://supportforums.cisco.com/message/3196257#3196257 

Sorry i should have searched before.

Thank you,

Jay

2509
Views
0
Helpful
2
Replies
CreatePlease to create content