Cisco Support Community
Showing results for 
Search instead for 
Did you mean: 

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

OSPF router-id

Can someone tell me why and how the router-id keeps the highest ip, even if that ip address was deleted?

I orginally configured an ip at Then I configured another interface at When I deleted the 129 ip address. It keeps that ip for the router id.

I tried to clear the ip ospf process, but it keeps the router id at

How do I get the router to accept the current highest ip as the router id.

Why does the router keep the 129 router-id after it has been deleted?

Thanks in advance.


Re: OSPF router-id

OSPF has to choose between resetting all of its adjacencies and using an IP address that is no longer present on the box, once you're removed it. Generally, all implementations choose the latter, keeping the ip address even though it's no longer configured. Note that if you changed your router id when an interface that was supplying it was removed from the routing table, you'd also have to do this when it fails, which means you'd have to restart your adjacencies if your highest numbered interface failed, and then restart them when it comes back up.

And a series of failures, each on the highest numbered interface, would be a disaster on a router with a large number of neighbors.




Re: OSPF router-id

Russ already answered your second question (Why does the router keep the 129 router-id after it has been deleted?) but neglected to answer your first question (How do I get the router to accept the current highest ip as the router id?).

The cleanest way to change the OSPF router ID is to reboot the router. FWIW, EIGRP has the same problem, it's just not as obvious. Best practice is to carefully define your loopback addresses so the one you want is the highest loopback address (remember that the algorithm is to select the highest loopback address, and only select the highest real interface IP if there are NO loopback addresses defined.

Good luck and have fun!

Vincent C Jones

Thanks in advance.


Re: OSPF router-id

I also forgot to note that you can do this:

2651A(config-router)#router-id ?

A.B.C.D OSPF router-id in IP address format

Which will provide you a stable router id under all circumstances, no matter what happens to your interfaces.



CreatePlease to create content