27
Configuration prerequisites
Assign an IP address to the interface from which you want to borrow the IP address. Alternatively,
you can configure the interface to obtain one through BOOTP, DHCP, or PPP address negotiation.
Configuration procedure
To configure IP unnumbered on an interface:
Step Command Remarks
1. Enter system view.
system-view
N/A
2. Enter interface view.
interface
interface-type
interface-number
N/A
3. Specify the interface to borrow
the IP address of the specified
interface.
ip
address
unnumbered
interface
interface-type
interface-number
By default, the interface does
not borrow IP addresses from
other interfaces.
A dynamic routing protocol cannot be enabled on the interface where IP unnumbered is configured.
To enable the interface to communicate with other devices, configure a static route to the peer device
on the interface. For more configuration information, see "IP unnumbered configuration example."
Displaying and maintaining IP addressing
Execute display commands in any view.
Task Command
Display IP configuration and statistics for the
specified or all Layer 3 interfaces.
display
ip
interface
[ interface-type
interface-number ]
Display brief IP configuration for Layer 3 interfaces.
display
ip
interface
[ interface-type
[ interface-number ] ]
brief
[
description
]
Configuration examples
IP address configuration example
Network requirements
As shown in Figure 13, GigabitEthernet 2/0/1 on the router is connected to a LAN comprising two
segments: 172.16.1.0/24 and 172.16.2.0/24.
To enable the hosts on the two network segments to communicate with the external network through
the router, and to enable the hosts on the LAN to communicate with each other:
• Assign a primary IP address and a secondary IP address to GigabitEthernet 2/0/1 on the router.
• Set the primary IP address of the router as the gateway address of the PCs on subnet
172.16.1.0/24. Set the secondary IP address of the router as the gateway address of the PCs
on subnet 172.16.2.0/24.