OSPF - Link ID and ADV Router in the OSPF database

The Link ID and ADV Router fields in the OSPF database output are essential for understanding the OSPF topology and identifying the origin of each LSA (Link-State Advertisement). Here’s what these fields mean and how to interpret them:

The Link ID field in the show ip ospf database output has different meanings depending on the type of LSA. It serves as a unique identifier for the network or router being advertised by that specific LSA type. The meaning varies depending on the LSA type:

  • Router LSA (Type 1):

    • Link ID: The Router ID of the advertising router.
    • Example: Link ID = 1.1.1.1
  • Network LSA (Type 2):

    • Link ID: The IP address of the Designated Router (DR) interface on the OSPF network typesmulti-access network.
    • Example: Link ID = 192.168.1.1 (IP address of the DR on a broadcast segment)
  • Summary LSA (Type 3):

    • Link ID: The destination network’s IP address being advertised.
    • Example: Link ID = 10.1.1.0 (summary route for a network)
  • ASBR Summary LSA (Type 4):

    • Link ID: The Router ID of the ASBR being advertised.
    • Example: Link ID = 2.2.2.2
  • External LSA (Type 5):

    • Link ID: The external destination network’s IP address (e.g., a network learned via BGP).
    • Example: Link ID = 172.16.10.0 (external route outside the OSPF domain)
  • NSSA External LSA (Type 7):

    • Link ID: The external destination network’s IP address within a Not-So-Stubby Area (NSSA).
    • Example: Link ID = 192.168.50.0

2. ADV Router (Advertising Router)

The ADV Router field (short for Advertising Router) is the Router ID of the router that originated or generated the LSA. This helps you identify which router is responsible for advertising a particular network or link.

  • Router LSA (Type 1):

    • The ADV Router will be the same as the Link ID because the Router ID is used as the Link ID.
    • Example: ADV Router = 1.1.1.1
  • Network LSA (Type 2):

    • The ADV Router is the Router ID of the Designated Router (DR) on the multi-access segment.
    • Example: ADV Router = 2.2.2.2
  • Summary LSA (Type 3):

    • The ADV Router is the Router ID of the Area Border Router (ABR) that originated the LSA.
    • Example: ADV Router = 3.3.3.3
  • ASBR Summary LSA (Type 4):

    • The ADV Router is the Router ID of the ABR that is advertising the ASBR’s information to other areas.
    • Example: ADV Router = 4.4.4.4
  • External LSA (Type 5):

    • The ADV Router is the Router ID of the ASBR that originated the external route.
    • Example: ADV Router = 5.5.5.5
  • NSSA External LSA (Type 7):

    • The ADV Router is the Router ID of the ASBR originating the external route within the NSSA.
    • Example: ADV Router = 6.6.6.6

Example of show ip ospf database Output

Here’s a sample output snippet to explain this further:

Router Link States (Area 0) Link ID ADV Router Age Seq# Checksum Link count 1.1.1.1 1.1.1.1 600 0x8000000B 0x0027A3 3 2.2.2.2 2.2.2.2 450 0x8000000A 0x0033B2 4

Breaking Down the Fields:

  1. Link ID:

    • For Type 1 LSAs, the Link ID indicates the Router ID of the router that originated the LSA.
    • 1.1.1.1 and 2.2.2.2 are the Router IDs of two different routers in Area 0.
  2. ADV Router:

    • The ADV Router field also shows the Router ID of the advertising router.
    • ADV Router = 1.1.1.1 for the first entry means the router with Router ID 1.1.1.1 generated this Router LSA.
    • Similarly, the second entry (ADV Router = 2.2.2.2) means Router ID 2.2.2.2 originated the LSA.

Let’s say you see an unexpected route in your OSPF database, and you want to find out which router is advertising it:

  1. Check the Link ID: The Link ID will tell you the specific network or router being advertised (depending on the LSA type).
  2. Check the ADV Router: The ADV Router shows which router is sending this advertisement, helping you identify the originator of the LSA.
  3. Correlate with Neighbor Data: Use the show ip ospf neighbor command to see which OSPF neighbors correspond to that Router ID.
  4. Investigate the Advertising Router: Once you’ve identified the advertising router, check its configuration or OSPF settings to verify if it should be advertising that route.

By interpreting these fields correctly, you can effectively map out the OSPF topology, find the source of advertised routes, and troubleshoot OSPF behavior.

https://networklessons.com/ospf/how-to-read-the-ospf-database