OSPF Router ID Selection Trivia
True or false: If you have an (enabled) loopback interface configured on the router, its IP address will always be used as the OSPF router ID.
Answer: False. Each OSPF process running on the router needs a unique Router ID. If you have a single loopback interface and two OSPF processes, the second OSPF process is forced to select another interface address as its router ID.
Here is a sample router printout:
Test#show running | inc ^interface|^ ip address
interface Loopback0
ip address 10.0.0.1 255.255.255.255
interface FastEthernet0/0
ip address 10.1.0.1 255.255.255.0
Test#show ip ospf | inc Routing Process
Routing Process "ospf 2" with ID 10.1.0.1
Routing Process "ospf 1" with ID 10.0.0.1
http://blog.ioshints.info/2007/10/ospf-router-id-does-not-change-when.html
-as
regards
shivlu jain
1) router-id command
2) ip address of loopback interface (higher address in case of more that one loopback)
3) ip address of interface wiht higher ip address