Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

default-address-selection

Syntax

Hierarchy Level

Description

Use the loopback interface, lo0, as the source address for all locally generated IP packets when the packet is sent through a routed interface, and also when the packet is sent through a local interface such as fxp0. The lo0 interface is the interface to the router's or switch's Routing Engine.

The default address is used as the source address for all locally generated IP packets on outgoing interfaces that are unnumbered. If an outgoing interface is numbered, the default address is chosen using the following sequence:

The default address of the router is chosen using the following sequence:

  1. The primary address on the loopback interface lo0 that is not 127.0.0.1 is used.

  2. The primary address on the primary interface is used.

  3. When there are multiple interfaces with "primary" and "preferred" addresses, the interface with the lowest interface index is selected, and the primary address is used. In the case that none of the interface's IP addresses are explicitly marked with the primary statement, the numerically lowest address on that interface is used as the system default address.

  4. Any remaining interface with an IP address may be selected. This includes the router's management or internal interfaces. For this reason, it's recommended that you assign a loopback address, or explicitly configure a primary interface, to control default address selection.

An interface’s primary address is used by default as the local address for broadcast and multicast packets sourced locally and sent out through the interface. By default, the primary address on an interface is selected as the numerically lowest local address configured on the interface.

An interface’s preferred address is the default local address used for packets sourced by the local router or switch to destinations on the subnet. By default, the numerically lowest local address configured for the interface is chosen as the preferred address on the subnet.

Required Privilege Level

system—To view this statement in the configuration.

system-control—To add this statement to the configuration.

Release Information

Statement introduced before Junos OS Release 7.4.