skip to main | skip to sidebar

Friday, July 4, 2008

OSPF router-id does not change when the interface IP address changes

The rules used to establish OSPF router ID on Cisco IOS are well known:
Take the highest IP address of all loopback interfaces configured on the router when the OSPF process is started.
If there is no loopback interface, take the highest IP address of an operating interface.In the old days, when Cisco believed that the router ID had to match an interface address, this also implied that the router ID would have changed if the interface IP address changed (and we told the students that you have to use loopback interfaces to make your network stable, as the OSPF process would restart if the interface giving the router ID went down).Most of these “wisdoms” are no longer true. For recent releases of Cisco IOS, OSPF router ID is a 32-bit value that has to be unique (that's all that the OSPF RFC ever asked for) and just happens to be taken from an interface address at the time the OSPF process is started. Even more, you can configure it to any value you like with the router-id A.B.C.D router configuration command.The new behavior, while definitely making your network more stable, can also bring unexpected side effects: if you don't use the router-id command and misconfigure an interface IP address (resulting in duplicate router IDs), correcting the interface IP address will not fix the problem. You also have to reset the OSPF process with the clear ip ospf pid process command

0 comments: