OSPF modifying the router ID
When implementing OSPF , a unique OSPF router ID must be used by each router participating in OSPF. Changing the router ID once it has been assigned is not straightforward, as routers will in some cases maintain the obtained router ID even after a clearing of the OSPF process or after manually modifying it. Specifically:
Once a router chooses the router ID, it cannot be changed even using the clear ip ospf process
command. Even when the router ID is manually configured, and then removed, the initial manually configured router ID remains.
From experimentation, it has been found that in order for OSPF to change the router ID, you must either reload the router, or delete the OSPF configuration and reinstate it.
Note the following:
- When the router ID has been chosen as the IP address of a physical interface, even if you create a loopback interface and clear the OSPF process, the router ID will not change. You must either reboot the machine or delete and recreate the OSPF config.
- When the router ID has been chosen as the IP address of a loopback, even if you create a new loopback with a higher IP address, clearing the OSPF process will not change the router ID. The only way it will change is if you delete the loopback interface or change its IP address to something else or reboot the machine.
- When creating, changing, or deleting a manually configured router ID, the router ID will change after clearing the OSPF process.
Links
https://forum.networklessons.com/t/ospf-router-id/1256/31?u=lagapides