Configuring IP Unnumbered on an Interface
Context
In some scenarios, an interface can borrow an IP address from another interface to conserve IP addresses. For example, if an interface is seldom used, configure IP unnumbered on this interface so that the interface can share an IP address with another interface.
The restrictions for IP unnumbered interface configuration are as follows:
The IP address to be borrowed cannot be a borrowed IP address.
The IP address can be lent to multiple interfaces.
- If an interface has multiple IP addresses and the all-address parameter is notconfigured, the IP unnumbered interface can borrow only the primary IP address.If an interface has multiple interfaces and the all-address parameter is configured,the IP unnumbered interface can borrow all addresses.
If the interface assigned to an IP unnumbered interface has no IP address, the IP unnumbered interface obtains the IP address 0.0.0.0.
The interface that borrows an IP address cannot be an Ethernet interface.
The IP address of the loopback interface can be lent to other interfaces, but the loopback interface cannot borrow an IP address from another interface.
Procedure
- Run system-view
The system view is displayed.
- Run interface interface-type interface-number
The interface view is displayed.
The interface can be a VLANIF interface, tunnel interface, VT interface, or MTunnel interface.
- Run ip address unnumbered interface interface-type interface-number [ all-address ]
The interface is configured to borrow the IP address from a specified interface.
The all-address parameter can be configured only in the VLANIF interface view, indicating that all IP addresses of the specified interface can be borrowed.
The ip address unnumbered command only configures an interface to borrow the IP address from another interface. Other attributes of the interface that borrows an IP address, such as the enablement of routing protocols, need to be configured separately.