The dns domain command configures a domain name suffix.
The undo dns domain command deletes a domain name suffix.
By default, no domain name suffix is configured.
dns domain domain-name [ vpn-instance vpn-instance-name ]
undo dns domain [ domain-name [ vpn-instance vpn-instance-name ] ]
Parameter |
Description |
Value |
---|---|---|
domain-name |
Specifies the suffix of a domain name. |
The value is a string of 1 to 64 characters without spaces. A combination of digits, letters, underscores (_), hyphens (-), and dots (.) is allowed. |
vpn-instance vpn-instance-name |
Specifies the name of a VPN instance. |
The value must be an existing VPN instance name. |
Usage Scenario
Many servers or hosts have the same suffix. In this case, you can configure domain name suffixes. For example, you can configure a suffix com.cn for the host whose domain name is huawei. When a DNS client accesses the host, it enters only "huawei" to send a query message to the DNS server. The DNS client automatically adds the suffix com.cn. Then the DNS server searches for the IP address mapped to "huawei.com.cn" first. If receiving no response, the DNS client sends a query message containing "huawei" to the DNS server to search for the mapped IP address.
Precautions
The switch 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.
If vpn-instance vpn-instance-name is specified, the specified domain name suffix can be used to search for the IP address corresponding to a domain name only when users access the domain name from the specified VPN instance.