Configuring dynamic domain name resolution
To use dynamic domain name resolution, a DNS server address is required so that DNS queries can be sent to a correct server for resolution.
In addition, you can configure a DNS suffix that the system automatically adds to the incomplete domain name that a user enters.
Configuration guidelines
Follow these guidelines when you configure dynamic domain name resolution:
In system view, you can specify a maximum of six DNS server IPv4 addresses for the public network or each VPN instance. You can specify DNS server IPv4 addresses for both public network and VPN instances.
In system view, you can specify a maximum of six DNS server IPv6 addresses for the public network or each VPN instance. You can specify DNS server IPv6 addresses for both public network and VPN instances.
In interface view, you can specify a maximum of six DNS server IPv4 addresses for the public network or each VPN instance. You can specify DNS server IPv4 addresses for both public network and VPN instances.
An IPv4 DNS query is first sent to the DNS server IPv4 addresses. If no reply is received, it is sent to the DNS server IPv6 addresses.
A DNS server address specified in system view takes priority over a DNS server address specified in interface view. A DNS server address specified earlier has a higher priority. A DNS server address manually specified takes priority over a DNS server address dynamically obtained, for example, through DHCP. The device first sends a DNS query to the DNS server address of the highest priority. If the first query fails, it sends the DNS query to the DNS server address of the second highest priority, and so on.
You can configure a maximum of 16 DNS suffixes for the public network or each VPN instance. You can configure DNS suffixes for both public network and VPN instances.
A DNS suffix manually configured takes priority over a DNS suffix dynamically obtained, for example, through DHCP. A DNS suffix configured earlier has a higher priority. The device first uses the suffix that has the highest priority. If the query fails, the device uses the suffix that has the second highest priority, and so on.
Configuration procedure
To configure dynamic domain name resolution:
Step | Command | Remarks |
---|---|---|
1. Enter system view. | system-view | N/A |
2. (Optional.) Configure a DNS suffix. | dns domain domain-name [ vpn-instance vpn-instance-name ] | By default, no DNS suffix is configured and only the domain name that a user enters is resolved. |
3. Specify a DNS server IPv4 address in system view. | dns server ip-address [ vpn-instance vpn-instance-name ] | Perform one or more of the tasks. By default, no DNS server address is specified. |
4. Specify a DNS server IPv4 address in interface view. | Enter interface view:interface interface-type interface-number Specify a DNS server IPv4 address:dns server ip-address [ vpn-instance vpn-instance-name ] | |
5. Specify a DNS server IPv6 address. | ipv6 dns server ipv6-address [ interface-type interface-number ] [ vpn-instance vpn-instance-name ] |