OSPF Router IDs

Posted by Bradley | OSPF | Wednesday 16 July 2008 22:44

I have blitzed through EIGRP in the last few days and am starting on OSPF, here is the first of a few posts I will make on it in the next few days.

For a router to send OSPF messages it has to define its OSPF Router Identifier (RID). This is a 32bit dotted decimal number which uniquely identifies the router.

Its a simple 3 steps for the router to choose what the RID will be

  1. If the router-id id command is configured under router ospf then that that will always be used as the RID
  2. If there is no router-id configured it uses the numerically highest up loopback interface
  3. Finally if there is no router-id command set or no loopback interfaces up then it uses the highest interface IP address which is up.

It should be noted that the RID is only used to uniquely identify the OSPF router and does not need to be reachable or exist in the routing table. If the RID is changed then all OSPF routers in the area will have to recalculate SPF as its unique identifier has changed.

The final point is that the RID will only change when the router-id command is entered, or OSPF is restarted.