The routing platform has a default address and a primary interface, and interfaces have primary and preferred addresses.
The default address of the routing platform is used as the source address on unnumbered interfaces. The routing protocol process tries to pick the default address as the routing platform ID, which is used by protocols, including OSPF and internal BGP (IBGP).
The primary interface for the routing platform is the interface that packets go out when no interface name is specified and when the destination address does not imply a particular outgoing interface.
An interface’s primary address is used by default as the local address for broadcast and multicast packets sourced locally and sent out the interface. An interface’s preferred address is the default local address used for packets sourced by the local routing platform to destinations on the subnet.
The default address of the routing platform is chosen using the following sequence:
To configure these addresses and interfaces, you can do the following:
The primary interface for the routing platform has the following characteristics:
By default, the multicast-capable interface with the lowest-index address is chosen as the primary interface. If there is no such interface, the point-to-point interface with the lowest index address is chosen. Otherwise, any interface with an address could be picked. In practice, this means that, on the routing platform, the fxp0 interface is picked by default.
To configure a different interface to be the primary interface, include the primary statement:
-
primary;
You can include this statement at the following hierarchy levels:
The primary address on an interface is the address that is used by default as the local address for broadcast and multicast packets sourced locally and sent out the interface. For example, the local address in the packets sent by a ping interface so-0/0/0.0 255.255.255.255 command is the primary address on interface so-0/0/0.0. The primary address flag also can be useful for selecting the local address used for packets sent out unnumbered interfaces when multiple non-127 addresses are configured on the loopback interface, lo0. By default, the primary address on an interface is selected as the numerically lowest local address configured on the interface.
To set a different primary address, include the primary statement:
-
primary;
You can include this statement at the following hierarchy levels:
The preferred address on an interface is the default local address used for packets sourced by the local routing platform to destinations on the subnet. By default, the numerically lowest local address is chosen. For example, if the addresses 172.16.1.1/12, 172.16.1.2/12, and 172.16.1.3/12 are configured on the same interface, the preferred address on the subnet (by default, 172.16.1.1) would be used as a local address when you issue a ping 172.16.1.5 command.
To set a different preferred address for the subnet, include the preferred statement:
-
preferred;
You can include this statement at the following hierarchy levels: