When you need to conserve IP addresses, you can configure unnumbered interfaces. Setting up an unnumbered interface enables IP processing on the interface without assigning an explicit IP address to the interface. The statements you use to configure an unnumbered interface depend on the type of interface you are configuring: a point-to-point interface or an Ethernet interface:
To configure a point-to-point interface to be unnumbered, configure the protocol family, but do not include the address statement:
- family family;
You can include this statement at the following hierarchy levels:
![]() |
Note: For interfaces with PPP encapsulation, you can configure an unnumbered interface by including the unnumbered-interface statement in the configuration. For more information, see Configuring IPCP Options. |
When configuring unnumbered interfaces, you must ensure that a source address is configured on some interface in the routing platform. This address is the default address. We recommend that you do this by assigning an address to the loopback interface (lo0), as described in Configuring the Loopback Interface. If you configure an address (other than a martian) on the lo0 interface, that address is always the default address, which is preferable because the loopback interface is independent of any physical interfaces and therefore is always accessible.
Configure an unnumbered point-to-point interface:
To configure an Ethernet or demultiplexing interface to be unnumbered, include the unnumbered-address statement in the configuration:
- unnumbered-address interface-name;
You can include this statement at the following hierarchy levels:
The unnumbered-address statement currently supports configuration of unnumbered Ethernet or unnumbered demux interfaces only for the IPv4 address family.
The interface that you configure to be unnumbered “borrows” an assigned IPv4 address from another interface, and is therefore referred to as the borrower interface. The interface from which the IP address is borrowed is referred to as the donor interface. In the unnumbered-address statement, interface-name specifies the donor interface. For an Ethernet unnumbered interface, the donor interface can be an Ethernet, ATM, SONET, or loopback interface that has a logical unit number and configured IP address and is not itself an unnumbered interface. For an IP demultiplexing unnumbered interface, the donor interface can be an Ethernet or loopback interface that has a logical unit number and configured IP address and is not itself an unnumbered interface. In addition, for either Ethernet or demux, the donor interface and the borrower interface must be members of the same routing instance and the same logical system.
When you configure an unnumbered Ethernet or demux interface, the IP address of the donor interface becomes the source address in packets generated by the unnumbered interface.
You can configure a host route that points to an unnumbered Ethernet or demux interface. For information about host routes, see the JUNOS MPLS Applications Configuration Guide.
For more information, see the following sections:
When a loopback interface with multiple secondary IPv4 addresses is configured as the donor interface for an unnumbered Ethernet or demux interface, you can optionally specify any one of the loopback interface’s secondary addresses as the preferred source address for the unnumbered Ethernet or demux interface. This feature enables you to use an IP address other than the primary IP address on some of the unnumbered Ethernet or demux interfaces in your network.
To configure a secondary address on a loopback donor interface as the preferred source address for an unnumbered Ethernet or demux interface, include the preferred-source-address option in the unnumbered-address statement:
- unnumbered-address interface-name <preferred-source-address address>;
You can include this statement at the following hierarchy levels:
The following considerations apply when you configure a preferred source address on an unnumbered Ethernet or demux interface:
For a configuration example that illustrates this feature, see Example: Configuring the Preferred Source Address for an Unnumbered Ethernet Interface.
To display the preferred source address for an unnumbered Ethernet or demux interface, use the show interfaces operational mode command. For information about using this command, see the JUNOS Interfaces Command Reference.
You can configure static routes on an unnumbered Ethernet interface. To do so, you use the qualified-next-hop statement to specify the unnumbered Ethernet interface as the next-hop interface for a configured static route. This feature enables you to specify independent preferences and metrics for static routes on a next-hop basis.
For a configuration example that illustrates this feature, see Example: Configuring an Unnumbered Ethernet Interface as the Next Hop for a Static Route.
For information about how to specify an independent preference for a static route, see the JUNOS Routing Protocols Configuration Guide.
The following restrictions apply when you configure unnumbered Ethernet interfaces:
In this example, ge-1/0/0 is the unnumbered interface and ge-0/0/0 is the donor interface from which ge-1/0/0 “borrows” an IP address.
-
- interfaces {
-
- ge-0/0/0 {
-
- unit 0 {
-
- family inet {
- address 4.4.4.1/24;
- }
- }
- }
-
- ge-1/0/0 {
-
- unit 0 {
-
- family inet {
- unnumbered-address ge-0/0/0.0;
- }
- }
- }
- }
In this example, loopback interface lo0 is the donor interface from which unnumbered Ethernet interface ge-4/0/0 “borrows” an IP address. The example also configures one of the loopback interface’s secondary addresses, 3.3.3.1, as the preferred source address for the unnumbered Ethernet interface.
-
- interfaces {
-
- lo0 {
-
- unit 0 {
-
- family inet {
- address 2.2.2.1/32;
- address 3.3.3.1/32;
- }
- }
- }
- }
-
- interfaces {
-
- ge-4/0/0 {
-
- unit 0 {
-
- family inet {
- unnumbered-address lo0.0 preferred-source-address 3.3.3.1;
- }
- }
- }
- }
In this example, ge-0/0/0 is the unnumbered interface and a loopback interface, lo0, is the donor interface from which ge-0/0/0 “borrows” an IP address. The example also configures a static route to 7.7.7.1/32 with a next hop through unnumbered interface ge-0/0/0.0.
-
- interfaces {
-
- lo0 {
-
- unit 0 {
-
- family inet {
- address 5.5.5.1/32;
- address 6.6.6.1/32;
- }
- }
- }
- }
-
- interfaces
-
- ge-0/0/0 {
-
- unit 0 {
-
- family inet {
- unnumbered-address lo0.0;
- }
- }
- }
- }
-
- routing-options {
-
- static {
-
- route 7.7.7.1/32 {
- qualified next-hop ge-0/0/0.0;
- }
- }
- }