< Home

dhcp client hostname

Function

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.

Format

dhcp client hostname hostname

undo dhcp client hostname

Parameters

Parameter

Description

Value

hostname

Specifies the name of a DHCP/BOOTP client.

The value is a string of 1 to 64 case-sensitive characters.

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

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.

Example

# 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
# Set the host name of a DHCP/BOOTP client to huawei gateway on GE0/0/1.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] undo portswitch
[HUAWEI-GigabitEthernet0/0/1] dhcp client hostname huawei gateway
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >