Configuring the Loopback Interface
On the routing platform, you can configure one physical loopback interface,
lo0, and one or more addresses on the interface. To do this, include the following statements at the[edit interfaces]hierarchy level:[edit interfaces]lo0 {unit 0 {family inet {addressloopback-address;address <loopback-address2>;...}}}When specifying the loopback address, do not include a destination prefix. Also, in most cases, do not specify a loopback address on any unit other than unit 0.
If you configure the loopback interface, it is automatically used for unnumbered interfaces. If you do not configure the loopback interface, the routing platform chooses the first interface to come online as the default. If you configure more than one address on the loopback interface, we recommend that you configure one to be the primary address to ensure that it is selected for use with unnumbered interfaces. By default, the primary address is used as the source address when packets originate from the interface.
For more information about unnumbered interfaces, see Configuring an Unnumbered Interface. For more information about primary addresses, see Configuring the Interface Address.