79
Configuring the DHCP client
About DHCP client
With DHCP client enabled, an interface uses DHCP to obtain configuration parameters from the
DHCP server, for example, an IP address.
Restrictions and guidelines: DHCP client
configuration
The DHCP client configuration is supported only on VLAN interfaces.
DHCP client tasks at a glance
To configure a DHCP client, perform the following tasks:
1. Enabling the DHCP client on an interface
2. Configuring a DHCP client ID for an interface
Perform thi
s task if the DHCP client uses the client ID to obtain IP addresses.
3. (Optional.) Enabling duplicated address detection
4. (Optional.) Setting the DSCP value for DHCP pack
ets sent by the DHCP client
Enabling the DHCP client on an interface
Restrictions and guidelines
• On some device models, if the number of IP address request failures reaches the
system-defined amount, the DHCP client-enabled interface uses a default IP address.
• An interface can be configured to acquire an IP address in multiple ways. The new configuration
overwrites the old.
• Secondary IP addresses cannot be configured on an interface that is enabled with the DHCP
client.
• If the interface obtains an IP address on the same segment as another interface on the device,
the interface does not use the assigned address. Instead, it requests a new IP address from the
DHCP server.
Procedure
1. Enter system view.
system-view
2. Enter interface view.
interface interface-type interface-number
3. Configure an interface to use DHCP for IP address acquisition.
ip address dhcp-alloc
By default, an interface does not use DHCP for IP address acquisition.