You are configuring OSPF on a Junos device; however, you have not configured a router
ID. What is the default behavior in this situation?
A.
If you configure a dedicated management address and include that interface in OSPF, it
will be used as the router ID.
B.
If the loopback is configured with a 127/8 address, it will be used.
C.
If the loopback is not configured, it will use the interface with the highest IP address.
D.
If the loopback is configured and does not have a usable address, the IP address
associated with the first hardware interface is used.
Overview
The router identifier is used by OSPF to identify the routing device from which a packet originated. Junos OS selects a router identifier according to the following set of rules:
By default, Junos OS selects the lowest configured physical IP address of an interface as the router identifier.
If a loopback interface is configured, the IP address of the loopback interface becomes the router identifier.
If multiple loopback interfaces are configured, the lowest loopback address becomes the router identifier.
If a router identifier is explicitly configured using the router-id address statement under the [edit routing-options] hierarchy level, the above three rules are ignored.
http://www.juniper.net/documentation/en_US/junos14.2/topics/example/ospf-router-id-configuring.html
Juniper also states the following:
If you do not configure a router identifier, the IP address of the first interface to come online is used. This is usually the loopback interface. Otherwise, the first hardware interface with an IP address is used.
http://www.juniper.net/documentation/en_US/junos15.1/topics/topic-map/ospf-router-designated-router.html