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 VLAN-interface 10 to use DHCP for IP address acquisition.
<Sysname> system-view [Sysname] interface vlan-interface 10 [Sysname-Vlan-interface10] ip address dhcp-alloc