The dns domain command adds a domain name suffix.
The undo dns domain command deletes a domain name suffix.
By default, domain names do not have suffixes.
Parameter | Description | Value |
---|---|---|
domain-name |
Specifies a domain name. |
The value is a string of 1 to 63 case-sensitive characters, spaces not supported. The string can contain letters, digits, underscores (_), and dots (.). |
vpn-instance vpn-name |
Specifies the name of a VPN instance. |
The value is a string of 1 to 31 case-sensitive characters, spaces not supported. In addition, the VPN instance name must not be _public_. When double quotation marks are used around the string, spaces are allowed in the string. |
Usage Scenario
The suffixes for frequently used domain names are usually the same. For example, many websites use "com" as their domain name suffixes. After you define "com" as the domain name suffix for a website, you need to enter only the domain name when performing a ping operation on the website. The DNS Client automatically adds suffix "com" to the domain name before resolving the domain name. If the corresponding IP address is not found, the DNS server then resolves the domain name. For example, after you enter "google", the DNS Client resolves "google.com" first. If the corresponding IP address is not found, the DNS Client then resolves "google".
Precautions
If domain-name is specified in the undo dns domain command, only the specified suffix is deleted; if domain-name is not specified in the undo dns domain command, all suffixes are deleted.