For dynamic domain name resolution, the DNS server needs to provide the mapping between domain names and IP addresses and receive domain name resolution requests from clients.
To implement dynamic domain name resolution, you need to enable dynamic domain name resolution function, configure the IP address of DNS server, configure the source IP address of the DNS packets sent by the local device, and configure a domain name suffix.
If the device functions as a DNS client and both IPv4 DNS servers and IPv6 DNS servers are configured, the device sends query packets to IPv4 DNS servers in the configured sequence when the dynamic domain name resolution is performed. If the query on the first DNS server times out, the device sends a query request to the next one. If the query on all IPv4 DNS servers times out or no IPv4 DNS server is configured, the device sends query packets to IPv6 DNS servers in the configured sequence.
The system view is displayed.
The dynamic domain name resolution function is enabled.
By default, the dynamic domain name resolution function is disabled.
Run dns server ip-address
An IPv4 address is configured for the DNS server.
Run dns server ipv6 ipv6-address [ interface-type interface-number ]
An IPv6 address is configured for the DNS server.
By default, no IP address is configured for the DNS server.
Run dns server unnumbered interface interface-type interface-number
The device is configured to use the IPv4 address of the DNS server obtained from the specified interface.
Run dns server ipv6 unnumbered interface interface-type interface-number { dhcpv6 | nd-ra }
The device is configured to use the IPv6 address of the DNS server obtained from the specified interface.
By default, the IP address of the DNS server obtained from a specified interface cannot be directly used.
Run dns server source-ip ip-address
The source IPv4 address used by the device to communicate with the IPv4 DNS server is configured.
Run dns server ipv6 source-ip ipv6-address
The source IPv6 address used by the device to communicate with the IPv6 DNS server is configured.
The IP address of the specified interface is configured as the source IP address of the DNS query messages sent by the device to the DNS server.
This function is supported only if the device performs a DNS query through the DNS server with an IPv4 address and is not supported if the device performs a DNS query through the DNS server with an IPv6 address.
By default, no source IP address is configured for the device to communicate with the DNS server. The device uses the IP address of the interface through which DNS query packets are sent to communicate with the DNS server.
The device is configured to send DNS query requests to the DNS server on a specified VPN.
By default, the device can only send DNS query requests to the DNS server on a public network.
If you run this command multiple times, only the latest configuration takes effect.
The device can send DNS query requests to the DNS server on a public network or specified VPN network.
After a VPN instance is bound to the interface connected to the DNS client, the DNS proxy or relay function does not take effect.
The domain name suffix is configured.
By default, no domain name suffix is configured.
The maximum and minimum life cycle for the DNS application cache is configured.
Run dns-server-select-algorithm { fixed | auto }
The mode for the device to select the DNS server is configured.
By default, the mode for a device to select the DNS server is auto.
Run dns forward retry-number number
The number of times for the device to retransmit query requests to the destination DNS server is configured.
By default, the number of times for a device to retransmit DNS query requests to the destination DNS server is 2.
Run dns forward retry-timeout time
The retransmission timeout period for query requests sent by the device to the destination DNS server is configured.
By default, the retransmission timeout period for DNS query requests sent by a device to the destination DNS server is 3 seconds.