OSPF Part-1

Hi Everyone
R1---- R2 ---- R3
0.0.0.1 0.0.0.2 0.0.0.3
R1#show ip ospf database

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

            Router Link States (Area 0)

Link ID ADV Router Age Seq# Checksum Link count
0.0.0.1 0.0.0.1 44 0x80000003 0x0058AB 18
0.0.0.2 0.0.0.2 88 0x80000002 0x00CE2C 1

as you can see here in the output the Link ID for R1 0.0.0.1

R1#show ip ospf database router

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

            Router Link States (Area 0)

LS age: 102
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 0.0.0.1
Advertising Router: 0.0.0.1
!
omited for brevity

but here in this output the headline is called Link State ID 0.0.0.1 NOT Link ID like the previous one

my question is , what is the differrence between
Link ID vs Link State ID ?
what is Link ID used for ?
what is Link State ID used for ?
thanks

In this case, RFC 2328 provides the best answer:
https://datatracker.ietf.org/doc/html/rfc2328#section-12.1.4

12.1.4. Link State ID

        This field identifies the piece of the routing domain that
        is being described by the LSA.

What value is populated into this field depends on the type of LSA. This is also described in the same section of that RFC.

The “Link State ID” field is an identifier for the LSA, to make this LSA different from any other LSA from this advertising router. Within the body of the LSA, every actual link (GigEthernet, Serial, Loopback, etc) is also given a unique value called a “Link ID”.

Hope that helps!

1 Like

why your answer is become hard ?please don`t do that
please sir when you explain anything to me try to explain it a little easier in order to understand.also providing examples is helpful for better understanding.

ok no problem i understand that

that is the point i`m asking about . in the show ip ospf data output i see this headline
Link ID 0.0.0.1
but in the show ip ospf data router i see this output
Link State ID 0.0.0.1
what is that ?

In this case, “Link ID” and “Link State ID” are the exact same thing.

On the line that reads,
Link ID ADV Router Age Seq#

“Link ID” is just a shortened form of “Link State ID”. All of the things on that single line are part of the common LSA header.

1 Like

ahhhhhh
ok ok ok
thanks great keith .
before i leave i want to tell you something. please dont give up if you find still cant understand something , sometimes i need extra help
thanks

sir, could you please explain this part ?
if the Link State ID is identifier like what you said ,then how about the ADV Router Field ?

The Link-State ID field in the LSA header doesn’t really have much of a purpose for Type-1 Router LSAs. This is because for a given area (like Area-0) that a router may be connected to, it will only generate one (1) Type-1 Router LSA for that area and describe all of its links in that area within that single Router LSA. So in my opinion, that single LSA could easily be described by just stamping it with your Advertising Router-ID value as well as the sequence number. The Link-State ID field is just a copy of the Advertising Router ID (in the Type-1 Router LSA).

However, when thinking about Type-3 Summary LSAs and Type-5 AS-External LSAs, the Link-State ID field actually does have a lot of relevance. Those LSAs describe only a single link and the Link-State ID field provides the prefix on that link. So I’m guessing that since it was a required element of the LSA header for those LSA types, the designers of OSPF probably just retained that field for the Type-1 Router LSA. But since the Type-1 Router LSA could describe several links, they just decided to populate it with the Advertising Router-ID.

1 Like