ip address dhcp-alloc

Syntax

ip address dhcp-alloc [ client-identifier mac interface-type interface-number ]

undo ip address dhcp-alloc

View

Interface view

Default level

2: System level

Parameters

client-identifier mac interface-type interface-number: Enables an interface to use its MAC address as the client ID to obtain an IP address.

Description

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.

By default, an interface does not use DHCP for IP address acquisition.

If no parameter is specified, the client uses a character string that comprises the current interface name and MAC address as its ID for address acquisition.

The DHCP client sends a DHCP-RELEASE message for releasing the IP address obtained through DHCP.

Examples

# Configure VLAN-interface 1 to use DHCP for IP address acquisition.

<Sysname> system-view
[Sysname] interface vlan-interface 1
[Sysname-Vlan-interface1] ip address dhcp-alloc