OSPF Router ID selection algorithm
From CT3
Every OSPF process running in Cisco IOS requires a router-wide unique router ID. An IP address of an active interface is commonly used as the OSPF router ID; you can also use the router-id address router configuration command to ensure the OSPF router ID does not change even when the interface IP addresses change.
Router ID selection algorithm
If the router-id is specified in the OSPF configuration, the specified IP address is used. If the IP address configured with the router-id command overlaps with the router ID of another already active OSPF process, the router-id command fails.
If OSPF router ID was not set with the router-id configuration command (no router-id command was used in the OSPF configuration or there was a router ID overlap with another OSPF process), OSPF uses an interface IP address as its router ID.
The following algorithm is used to select an interface IP address as the OSPF router ID:
- IP addresses of all applicable loopback interfaces are collected. Addresses already used as OSPF router ID of other OSPF processes are removed. If any addresses are left, the highest IP address is used as the OSPF router ID.
- If the OSPF router ID has not been selected in the first step, IP addresses of all other applicable interfaces are collected. OSPF router IDs of active OSPF processes are removed from the list and the highest IP address is used.
- If the router was still not able to select an OSPF router ID, an error message is logged and the OSPF process does not start.
An OSPF process that failed to select a router ID retries the selection process every time an IP address becomes available (an applicable interface changes its state to up or an IP address is configured on an applicable interface).
Changing the OSPF router ID
Once an OSPF router ID is selected, it is not changed even if the interface that was used to select it changes its operational state or its IP address.
To change the OSPF router ID, you have to reset the OSPF process with the clear ip ospf process command (even when the new router ID was requested with the router-id router configuration command).
BlogMarks
del.icio.us
digg
Facebook
LinkedIn
Newsvine
reddit
Slashdot