Refer to the exhibit. Which OSPF router ID does router R1 use?
When no explicit router-id is configured for OSPF, the router selects the highest IP address on any loopback interface. Only if no loopback exists does it use the highest IP address on an active non-loopback interface. Because R1 has Loopback0 configured with 172.16.15.10, that address is chosen as the OSPF router ID.
router-id
Community Discussion