What is OSPF Router ID, OSPF Router ID Selection Algorithm and How to Configure OSPF Router ID
Each Router in an OSPF network needs a unique OSPF Router ID. The OSPF Router ID is used to provide a unique identity to the OSPF Router.
OSPF Router ID is an IPv4 address (32-bit binary number) assigned to each router running the OSPF protocol.
OSPF Router ID should not be changed after the OSPF process has been started and the ospf neighborships are established. If you change the OSPF router ID, we need to either reload the IOS or use "clear ip ospf process" command, for OSPF Router ID change to take effect. Reloading the IOS or using "clear ip ospf process" commad can cause temporary network outage.
OSPF Router ID selection algorithm works as below.
• Any manually configured OSPF Router ID in OSPF Process is selected as the OSPF Router ID.
• If there is no OSPF Router ID configured, the highest IP address on any of the Routers Loopback Interfaces is selected as the OSPF Router ID.
• If there is no Loopback Interfaces configured, the highest IP address on its active interfaces is selected as the OSPF Router ID.
To configure OSPF Route ID in OSPF Process, follow these steps.
omnisecu.com.R1>enable omnisecu.com.R1#configure terminal omnisecu.com.R1(config)#router ospf 100 omnisecu.com.R1(config-router)#router-id 220.127.116.11 omnisecu.com.R1(config-router)#exit omnisecu.com.R1(config)#exit omnisecu.com.R1#