< Home

dhcp server domain-name (interface view)

Function

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.

Format

dhcp server domain-name domain-name

undo dhcp server domain-name

Parameters

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.

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

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

  1. The DHCP function has been enabled using the dhcp enable command in the system view.
  2. IP addresses in the interface address pool have been configured using the ip address command.

  3. 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.

Example

# Set the domain name assigned by the DHCP address pool on the interface to example.com.
<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
# Specify the domain name in the address pool on GE0/0/1 as huawei.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
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >