OSPF Error

Answered Question
Mar 6th, 2009

Hi,

I get error "OSPF detected duplicate router-id" to resolve the issue I changed the router-id to 1.1.2.2 and ospf process started working.

Question : How to check on network which device uses the same router-id

What is the best practise of having the Router-id ( I should put router-id is rtr-loopback ip or something else )

Correct Answer by adamclarkuk_2 about 7 years 11 months ago

You can use the Loopback IP but does not matter as long as it's hard coded.

If you let OSPF choose one it's self (as mentioned above), then what happens if someone adds a new Loopback or L3 interface to the device. The router ID wont change straight away, but if the ospf process is reset or even the router, the router id will change.

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 4.5 (2 ratings)
Loading.
adamclarkuk_2 Fri, 03/06/2009 - 11:58

The only real way to find out what the OSPF router-id's are, is to logon to the devices and type 'show ip protocols' and you will see the router id :-

Routing Protocol is "ospf 1"

Outgoing update filter list for all interfaces is not set

Incoming update filter list for all interfaces is not set

Router ID 2.2.2.2

By default the OSPF router-id is usually the highest IP address on the box, or the highest loopback address, but I prefer to specify using the command :-

Router(config-router)#router-id x.x.x.x

But Loopbacks are always better to use.

If you do have duplicate router id, as you have learned, you will soon know about it.

ronald.ramzy Fri, 03/06/2009 - 12:04

Thanks for your kind reply.

You mean that I hardcord loopback ip address as router-id

Correct Answer
adamclarkuk_2 Fri, 03/06/2009 - 12:13

You can use the Loopback IP but does not matter as long as it's hard coded.

If you let OSPF choose one it's self (as mentioned above), then what happens if someone adds a new Loopback or L3 interface to the device. The router ID wont change straight away, but if the ospf process is reset or even the router, the router id will change.

adamclarkuk_2 Fri, 03/06/2009 - 12:16

As a side note, the above situation can affect DR/DBR election as well, as the router with the highest OSPF priority on a segment will become the DR for that segment, same for BDR. In case of a tie, the router with the highest RID will win :-s

by the way to set the ospf priority on an interface use the interface level command :-

ip ospf priority

ronald.ramzy Fri, 03/06/2009 - 12:54

in my scenario ; I have Ospf configured on coreSwitch and have three routers connected to different networks via vpn / mpls / gre-tunnel.

All routes are configured with OSPF.

so you mean to say I should configure core-switch to be DR and have ip ospf priority as 255

adamclarkuk_2 Fri, 03/06/2009 - 12:59

Hi

If they are all connected to different networks (VLANS/Subnet) then they will not share a broadcast domain, so no, it's not needed, it was just an FYI.

Actions

This Discussion