The dhcp client hostname command configures a host name for a DHCP/BOOTP client.
The undo dhcp client hostname command deletes the configured host name of a DHCP/BOOTP client.
By default, no host name is configured for a DHCP/BOOTP client.
Parameter |
Description |
Value |
---|---|---|
hostname |
Specifies the name of a DHCP/BOOTP client. |
The value is a string of 1 to 64 case-sensitive characters. |
Usage Scenario
A DHCP server must obtain the host name of a client before assigning an IP address to the client. To configure a host name for a DHCP/BOOTP client, run the dhcp client hostname command. The host name is used to match the local domain name of the DHCP/BOOTP client.
Follow-up Procedure
After DHCP/BOOTP client is enabled, the device can use DHCP to obtain an IP address.
# Set the host name of a DHCP/BOOTP client to huawei gateway on VLANIF100.
<HUAWEI> system-view [HUAWEI] interface vlanif 100 [HUAWEI-Vlanif100] dhcp client hostname huawei gateway
<HUAWEI> system-view [HUAWEI] interface gigabitethernet 0/0/1 [HUAWEI-GigabitEthernet0/0/1] undo portswitch [HUAWEI-GigabitEthernet0/0/1] dhcp client hostname huawei gateway