How an OSPF router selects it's Router-ID
Written by Dale Henninger   
Saturday, 15 July 2006

Use the router-id 1.1.1.1 command if it is specified under router ospf

If loopback interfaces exist, choose the highest IP address from all of the loopbacks.

If no loopback interfaces exist, choose the highest IP address from all interfaces.