Configuring the DNS template
A feature that uses the DNS template performs the DNS operation to determine the status of the server. It is supported in both IPv4 and IPv6 networks.
In DNS template view, you can specify the address expected to be returned. If the returned IP addresses include the expected address, the DNS server is valid and the operation succeeds. Otherwise, the operation fails.
Create a mapping between the domain name and an address before you perform the DNS operation. For information about configuring the DNS server, see Layer 3—IP Services Configuration Guide.
To configure the DNS template:
Step | Command | Remarks |
---|---|---|
1. Enter system view. | system-view | N/A |
2. Create a DNS template and enter DNS template view. | nqa template dns name | By default, no DNS templates exist. |
3. (Optional.) Specify the destination IP address of DNS packets. |
| By default, no destination address is specified. |
4. (Optional.) Specify the destination port number for the operation. | destination port port-number | By default, the destination port number is 53. |
5. Specify the domain name to be translated. | resolve-target domain-name | By default, no domain name is specified. |
6. Specify the domain name resolution type. | resolve-type { A | AAAA } | By default, the type is type A. A type A query resolves a domain name to a mapped IPv4 address, and a type AAAA query to a mapped IPv6 address. |
7. (Optional.) Specify the source IP address for the probe packets. |
| By default, the packets take the primary IP address of the output interface as their source IP address. The source IP address must be the IP address of a local interface, and the interface must be up. Otherwise, no probe packets can be sent out. |
8. (Optional.) Specify the source port for probe packets. | source port port-number | By default, no source port number is specified. |
9. (Optional.) Specify the IP address that is expected to be returned. |
| By default, no expected IP address is specified. |