33To configure the DNS template:Step Command Remarks1. Enter system view. system-view N/A2. Create a DNS template andenter DNS template view. nqa template dns name N/A3. (Optional.) Specify thedestination IPv4 or IPv6address of DNS packets.• IPv4 address:destination ip ip-address• IPv6 address:destination ipv6 ipv6-addressBy default, no destinationaddress is specified.4. Configure the destination portnumber for the operation. destination port port-number By default, the destination portnumber is 53.5. Specify the domain name thatneeds to be translated. resolve-target domain-name By default, no domain name isspecified.6. Configure the domain nameresolution type. resolve-type { A | AAAA }By default, the type is type A.A type A query resolves adomain name to a mapped IPv4address, and a type AAAAquery to a mapped IPv6address.7. (Optional.) Specify the sourceIPv4 or IPv6 address for theprobe packets.• IPv4 address:source ip ip-address• IPv6 address:source ipv6 ipv6-addressBy default, no source IP addressis specified.The source IP address must bethe IP address of a localinterface, and the interface mustbe up. Otherwise, no probepackets can be sent out.8. (Optional.) Configure thesource port for probe packets. source port port-number By default, no source portnumber is configured.9. (Optional.) Specify the IPv4 orIPv6 address that is expected tobe returned.• IPv4 address:expect ip ip-address• IPv6 address:expect ipv6 ipv6-addressBy default, no expected IPaddress is specified.Configuring the TCP templateA feature that uses the TCP template performs the TCP operation to test the following items:• Whether the NQA client can establish a TCP connection to a specific port on the server.• Whether the requested service is available on the server.In TCP template view, you can specify the expected data to be returned. If you do not specify theexpected data, the TCP operation tests only whether the client can establish a TCP connection to theserver.The TCP operation requires both the NQA server and the NQA client. Before you perform a TCPoperation, configure a TCP listening service on the NQA server. For more information about the TCPlistening service configuration, see "Configuring the NQA server."To configure the TCP template: