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.
R1>enable R1#configure terminal R1(config)#router ospf 100 R1(config-router)#router-id 18.104.22.168 R1(config-router)#exit R1(config)#exit R1#