< Home

Enabling the DHCP Client Function

Context

Before a device can function as a DHCP client, you must enable the DHCP client function.

After an interface is enabled with the DHCP client function, the interface can obtain network parameters including the IP address from the DHCP server. If the allocated IP address and IP addresses of other interfaces are on the same network segment, the interface does not use this IP address and does not re-apply for an IP address. To allow the interface to re-apply for an IP address, run the shutdown and then the undo shutdown commands on the interface. Alternatively, run the undo ip address dhcp-alloc and then the ip address dhcp-alloc command on the interface.

Procedure

  1. Enter the system view.

    system-view

  2. Enter the interface view.

    interface interface-type interface-number

  3. Enable the DHCP client function.

    ip address dhcp-alloc

    By default, the DHCP client function is disabled on an interface.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
Next topic >