OSPF Router ID, ID Selection Algorithm and How to Configure OSPF Router ID

To determine a particular Router in OSPF, each Router in an OSPF network needs to have a unique OSPF Router ID. This OSPF Router ID is in turn used to provide a unique identity to the OSPF Router.

In an OSPF network, 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 neighbor ships are established. At this point any change you make on 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” command 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 1.1.1.1

R1(config-router)#exit

R1(config)#exit

Leave a Reply

Your email address will not be published. Required fields are marked *