OSPF Router ID

This topic is to discuss the following lesson:

Good Stuff.

Thanks for streamline it.

Renee

Hope you are well - can you tell me please if I configure a router ID on my router in OSPF which i just did on one of the GNS3 Vault Labs ā€¦ do I also have to specify that router ID or configure it also as a Loopback interface ? Anyway I just configured the router ID and it was preferred to the existing L0 address which I expected but not sure if it also needs to have its own address space on the router elsewhere ?

Thanks

Will

Sorry forgot to tick the ā€˜please email me of notificationā€™

Renee

Just wondering if you saw my post please as stuck on this issue ?

Rgds

Will

Hi Will,

I just got back from my holiday, thatā€™s why I replied a bit later.

Once you manually configure an OSPF router ID then you are finished. Thereā€™s no need to add this address on a loopback or anything.

Rene

Renee

Hoe gaat het in Nederland meneer

I have a question please on the use of the router ID - the question is this ā€¦ when I DO NOT configure a router ID on my OSPF routers in my lab network BUT I AM using Loopback interfaces (and as expected given OSPF rules) my single Loopback interface(s) (with Loopback 0 only configured per router) ā€¦ will be used as the router ID ā€¦ so no problem there ā€¦ however when I configure a unique and different router ID, i.e. NOT my loopback interface 0 ā€¦ as my router ID this will become my dominant ā€˜neigbor IDā€™ presumably when forming adjanceies with other routers ā€¦ again no problem i think ! in terms of understanding the concept ā€¦ however my confusion begins in terms of understanding why (as i have seen in a few working exmaples) anybody would use a router ID that was different to your loopback interface ID or best loopback interface ā€¦ this being from the perspective of ā€˜loopback interfaceā€™ is regarded as the king of interfaces in ospf right ?? so what advantage if any would one have or even disadvantage of configuring a router ID that was different to your actual loopback (or highest) llopback interface ?

Many Thanks

Will V

William,
It is considered best practice always to set the OSPF router-id manually, whether you happen to have a loopback or not. The reason for this is because there are certain OSPF functions that will break should the Router-ID ever change (an OSPF virtual link is a great example of this). If you rely on OSPF automatically choosing its Router-ID based on a loopback you have configured, this is no guarantee that the Router-ID wouldnā€™t change later (for example, you later needed another loopback for some other purpose, and this new loopback had a higher IP address than the first).

If you get into the habit of immediately setting the OSPF router-id as soon as you create the routing process, you will do yourself favors in the long run.

1 Like

Hi willam,
Same thing I am getting in my lab devices when I am trying to change the RID based on automatically thumbrule of RID selection which Rene mentioned in lesson,

Highest IP address on a non-loopback interface.
Non loopback means physical interface

Why itā€™s not effecting in OSPF database?
I tried with ip OSPF process and ip OSPF process id process but same result,itā€™s effecting when I am trying to do follow below mention 3 steps,
1.when I rebooting the Router .
Or
2.when i remove the ip address from the interface (which is stored in OSPF database) then the valid RID is coming in OSPF database.
Or
3. when I removing the OSPF configuration (router OSPF 1) .
So I think you already replied previously but not getting clearly so can you plz explain me in detail?
I wiil wait for your replyā€¦ Today I did spend 2 hrs in my lab to find out the cause but didnā€™t getā€¦I tried with lab devices(Cisco 7201,MPC480,Cisco 3560) and GNS3 as well but same result.

Rene,
I asked to you same thing in OSPF configuration lesson I shred with lot of outputs then I see in forum another one person probably asked same thing and William replied himā€¦
So please share the exact reason really I am very excited to know this.

Thanks & Regards,
Around in
India

Hi willam,
Same thing I am getting in my lab devices when I am trying to change the RID based on automatically thumbrule of RID selection which Rene mentioned in lesson,

Highest IP address on a non-loopback interface.
Non loopback means physical interface

Why itā€™s not effecting in OSPF database?
I tried with ip OSPF process and ip OSPF process id process but same result,itā€™s effecting when I am trying to do follow below mention 3 steps,
1.when I rebooting the Router .
Or
2.when i remove the ip address from the interface (which is stored in OSPF database) then the valid RID is coming in OSPF database.
Or
3. when I removing the OSPF configuration (router OSPF 1) .
So I think you already replied previously but not getting clearly so can you plz explain me in detail?
I wiil wait for your replyā€¦ Today I did spend 2 hrs in my lab to find out the cause but didnā€™t getā€¦I tried with lab devices(Cisco 7201,MPC480,Cisco 3560) and GNS3 as well but same result.

Rene,
I asked to you same thing in OSPF configuration lesson I shred with lot of outputs then I see in forum another one person probably asked same thing and William replied himā€¦
So please share the exact reason really I am very excited to know this.

Thanks & Regards,
Arindom
India

Hi Andrew,
sorry wrongly i typed ā€œHi William,ā€:grinning:
So Andrew Same thing I am getting in my lab devices when I am trying to change the RID based on automatically thumbrule of RID selection which Rene mentioned in lesson,

Highest IP address on a non-loopback interface.
Non loopback means physical interface

Why itā€™s not effecting in OSPF database?
I tried with ip OSPF process and ip OSPF process id process but same result,itā€™s effecting when I am trying to do follow below mention 3 steps,
1.when I rebooting the Router .
Or
2. when I removing the OSPF configuration (no router OSPF 1)
Or
3.when i remove the ip address from the interface (which is stored in OSPF database) then the valid RID is coming in OSPF database.

So I think you already replied previously but not getting clearly so can you plz explain me in detail?
I wiil wait for your replyā€¦ Yesterday I did spend 2 hrs in my lab to find out the cause but didnā€™t getā€¦I tried with lab devices(Cisco 7201,MPC480,Cisco 3560) and GNS3 as well but same result.

Thanks & Regards,
Arindom
India

Hello Arindom.

I answered a similar question that you had in this thread. Please take a look :slight_smile:

I hope this has been helpful!

Laz

When configuring RID manually, do you have to do the clear ip ospf process for ospf take the changes ?

I donā€™t think that I saw it mentioned. The ā€œip ospf costā€ value that you can place on the interface to help control the DR/BDR election.

Hi Juan,

Thatā€™s correct, you need to clear the ospf process before the new router ID works.

Rene

Hi Wes,

The DR/BDR election is based on the priority or router ID, in this order:

  1. Highest priority: default is 1, if you set it to 0 then the router wonā€™t join the election.
  2. Highest router ID (if configured)
  3. Highest IP address on loopback interface (this becomes the router ID).
  4. Highest IP address on physical interface (this becomes the router ID).

Changing the cost of an interface only influences the metric, it wonā€™t influence the DR/BDR election.

Rene

Because of this, two OSPF routers with the same router ID will not become neighbors but you could still have duplicated router IDs in the network with routers that are not directly connected to each other.

I understand two ospf neighbors cannot have the same router-ID.But i dont understand how it would not create a prblem when they have same router-id but not directly connected , still existing in the same ospf domain. when the lsaā€™s are exchanged will that not create a problem ?

Hello Vijay

The router IDs of OSPF routers will be exchanged during the formation of OSPF neighbours. If during this exchange the router ID is the same between the two negotiating routers, the adjacency will not form and OSPF will not function correctly.

Now an OSPF adjacency will take place only between directly connected routers. Directly connected routers are those that have an interface within the same subnet. Routers that are connected to each other via a layer 2 switch are also considered directly connected because their interfaces are still on the same subnet.

So an adjacency will occur only between directly connected routers. If you have two routers that are not directly connected but in the same OSPF area (or even in different OSPF areas), you can indeed have two routers with the same router ID. Their router IDs will not be compared because they will never be neighbours.

As for the LSAs, these are exchanged only between neighbors. And since neighbours never have identical router IDs, there is no conflict. When a router receives an LSA, it does not relay it to other routers as is, but it creates its own to send out of its own interfaces with its own router ID.

In a nutshell, router IDs have only a limited scope, specifically, between neighbours themselves. The router IDs in each neigbour relationship do not extend beyond that to other OSPF routers.

I hope this has been helpful!

Laz

3 Likes

Got it. Thanks Laz.

That was clear