R0106-HP MSR Router Series Layer 3 - IP Services Command Reference(V7)

82
ip address dhcp-alloc
ip address dhcp-alloc
Use ip address dhcp-alloc to configure an interface to use DHCP for IP address acquisition.
Use undo ip address dhcp-alloc to cancel an interface from using DHCP.
Syntax
ip address dhcp-alloc
undo ip address dhcp-alloc
Default
An interface does not use DHCP for IP address acquisition.
Views
Interface view
Predefined user roles
network-admin
Usage guidelines
When you execute the undo ip address dhcp-alloc command, the interface sends a DHCP-RELEASE
message to release the IP address obtained through DHCP. If the interface is down, the message cannot
be sent out.
For a subinterface that obtained an IP address through DHCP, using the shutdown command on its
primary interface does not make the subinterface send a DHCP-RELEASE message for releasing the
subinterface's IP address.
Examples
# Configure interface GigabitEthernet 2/1/1 to use DHCP for IP address acquisition.
<Sysname> system-view
[Sysname] interface gigabitethernet 2/1/1
[Sysname-GigabitEthernet2/1/1] ip address dhcp-alloc
Related commands
display dhcp client
DHCP snooping commands
In this chapter, "MSR2000" refers to MSR2003. "MSR3000" collectively refers to MSR3012, MSR3024,
MSR3044, MSR3064. "MSR4000" collectively refers to MSR4060 and MSR4080.
DHCP snooping works between the DHCP client and the DHCP server or between the DHCP client and
the relay agent. DHCP snooping does not work between the DHCP server and the DHCP relay agent.
The DHCP snooping commands are supported only on the following models:
MSR routers that hold an Layer 2 switching module.