< Home

dns domain

Function

The dns domain command configures a domain name suffix of a server or a host on a DNS client that the DNS client wants to access.

The undo dns domain command deletes a configured domain name suffix from a DNS client.

By default, no domain name suffix is configured on a DNS client.

Format

dns domain domain-name

undo dns domain [ domain-name ]

Parameters

Parameter Description Value

domain-name

Specifies a domain name suffix on a DNS Client.

The value is a string of 1 to 64 characters, spaces not supported. The string is a combination of digits, letters, underscores (_), dots (.), and hyphen (-).

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Application Scenario

Generally, the domain name suffixes of some servers or hosts that a DNS client accesses are the same, for example, com.cn. In this case, you can set the domain name suffixes. When a DNS client accesses a host:
  • If the entered domain name does not carry dots (.), for example, "huawei", the system first adds the suffix com.cn to the domain name and sends a domain name request of "huawei.com.cn" to the DNS server to find the IP address corresponding to the domain name. If the DNS client does not receive any response from the server, it sends a domain name request of "huawei" to the DNS server to find the IP address corresponding to the domain name.
  • If the entered domain name carries dots (.), for example, "ilite.huawei", the system first sends a domain name request of "ilite.huawei" to the DNS server to find the IP address corresponding to the domain name. If the DNS client does not receive any response from the server, it adds the suffix com.cn to the domain name and sends a domain name request of "ilite.huawei.com.cn" to the DNS server to find the IP address corresponding to the domain name.

Precautions

A DNS client supports a maximum of 10 domain name suffixes. To configure multiple domain name suffixes, you can run the dns domain command repeatedly.

If the name of the suffix to be deleted is specified, the specified suffix is deleted. Otherwise, all the suffixes are deleted.

Example

# Configure a domain name suffix as com.cn.

<sysname> system-view
[sysname] dns domain com.cn
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >