The dhcp server domain-name command configures a DNS domain name assigned to a DHCP client.
The undo dhcp server domain-name command deletes a specified domain name.
By default, no domain name is configured for the DHCP client.
Parameter | Description | Value |
---|---|---|
domain-name |
Specifies the domain name that the DHCP server assigns to the client. |
The value is a string of 1 to 63 characters without spaces. NOTE:
When quotation marks are used around the string, spaces are allowed in the string. |
Usage Scenario
This command applies to DHCP servers. Run the dhcp server domain-name command on a DHCP server to specify a domain name for each interface address pool. When allocating IP addresses to clients, the DHCP server also sends the domain names to the clients.
Prerequisites
IP addresses in the interface address pool have been configured using the ip address command.
The DHCP server function has been enabled on the interface using the dhcp select interface command.
Precautions
If no domain name is specified for an interface address pool, a DHCP server does not send a domain name to clients, and users cannot access the Web service by using a domain name.
To configure a domain name for the global address pool, run the domain-name command.
<HUAWEI> system-view [HUAWEI] interface vlanif 100 [HUAWEI-Vlanif100] ip address 10.1.1.1 24 [HUAWEI-Vlanif100] dhcp select interface [HUAWEI-Vlanif100] dhcp server domain-name example.com
<HUAWEI> system-view [HUAWEI] dhcp enable [HUAWEI] interface gigabitethernet 0/0/1 [HUAWEI-GigabitEthernet0/0/1] undo portswitch [HUAWEI-GigabitEthernet0/0/1] ip address 10.10.10.10 24 [HUAWEI-GigabitEthernet0/0/1] dhcp select interface [HUAWEI-GigabitEthernet0/0/1] dhcp server domain-name huawei.com