How an OSPF Router Selects It's Router ID
From NetworkChatter
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.