# OSPF Part-1

**URL:** <https://legacy-community.ine.com/t/ospf-part-1/2597>\
**Category:** CCNP Enterprise\
**Tags:** networking\
**Created:** [July 11, 2022, 2:47pm UTC](https://legacy-community.ine.com/t/ospf-part-1/2597 "2022-07-11T14:47:51Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![major133-ac9365513dd](https://avatars.discourse-cdn.com/v4/letter/m/f4b2a3/32.png) [@major133-ac9365513dd](https://legacy-community.ine.com/u/major133-ac9365513dd)\
**Post date:** [July 11, 2022, 2:47pm UTC](https://legacy-community.ine.com/t/ospf-part-1/2597/1 "2022-07-11T14:47:51Z")

</div>

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

 ![image](https://us1.discourse-cdn.com/flex015/uploads/ine/original/1X/aaa10412934702b1e44ab1903c1260059d821e12.png)

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

---

<div class="post-metadata">

**Author:** ![kbogart-81b6c89deee9](https://avatars.discourse-cdn.com/v4/letter/k/4af34b/32.png) [@kbogart-81b6c89deee9](https://legacy-community.ine.com/u/kbogart-81b6c89deee9)\
**Post date:** [July 11, 2022, 3:07pm UTC](https://legacy-community.ine.com/t/ospf-part-1/2597/2 "2022-07-11T15:07:46Z")

</div>

In this case, RFC 2328 provides the best answer:  
[https://datatracker.ietf.org/doc/html/rfc2328#section-12.1.4](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!

---

<div class="post-metadata">

**Author:** ![major133-ac9365513dd](https://avatars.discourse-cdn.com/v4/letter/m/f4b2a3/32.png) [@major133-ac9365513dd](https://legacy-community.ine.com/u/major133-ac9365513dd)\
**Post date:** [July 11, 2022, 7:38pm UTC](https://legacy-community.ine.com/t/ospf-part-1/2597/3 "2022-07-11T19:38:33Z")

</div>

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.

> [@kbogart-81b6c89deee9](#):
>
> What value is populated into this field depends on the type of LSA. This is also described in the same section of that RFC.

ok no problem i understand that

> [@kbogart-81b6c89deee9](#):
>
> The “Link State ID” field is an identifier for the LSA, to make this LSA different from any other LSA from this advertising router.

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 ?

---

<div class="post-metadata">

**Author:** ![kbogart-81b6c89deee9](https://avatars.discourse-cdn.com/v4/letter/k/4af34b/32.png) [@kbogart-81b6c89deee9](https://legacy-community.ine.com/u/kbogart-81b6c89deee9)\
**Post date:** [July 11, 2022, 9:32pm UTC](https://legacy-community.ine.com/t/ospf-part-1/2597/4 "2022-07-11T21:32:33Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![major133-ac9365513dd](https://avatars.discourse-cdn.com/v4/letter/m/f4b2a3/32.png) [@major133-ac9365513dd](https://legacy-community.ine.com/u/major133-ac9365513dd)\
**Post date:** [July 12, 2022, 5:30am UTC](https://legacy-community.ine.com/t/ospf-part-1/2597/5 "2022-07-12T05:30:00Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![major133-ac9365513dd](https://avatars.discourse-cdn.com/v4/letter/m/f4b2a3/32.png) [@major133-ac9365513dd](https://legacy-community.ine.com/u/major133-ac9365513dd)\
**Post date:** [July 13, 2022, 12:03pm UTC](https://legacy-community.ine.com/t/ospf-part-1/2597/6 "2022-07-13T12:03:32Z")

</div>

> [@kbogart-81b6c89deee9](#):
>
> 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!

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 ?

---

<div class="post-metadata">

**Author:** ![kbogart-81b6c89deee9](https://avatars.discourse-cdn.com/v4/letter/k/4af34b/32.png) [@kbogart-81b6c89deee9](https://legacy-community.ine.com/u/kbogart-81b6c89deee9)\
**Post date:** [July 13, 2022, 1:23pm UTC](https://legacy-community.ine.com/t/ospf-part-1/2597/7 "2022-07-13T13:23:14Z")

</div>

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.
