The FW serves as an NQA client to measure the response speed of an HTTP server.
As shown in Figure 1The FW serves as an NQA client to measure the response speed of an HTTP server.
# Set an IP address for the interface.
<FW> system-view [FW] interface GigabitEthernet 0/0/1 [FW-GigabitEthernet0/0/1] ip address 1.1.1.1 24 [FW-GigabitEthernet0/0/1] quit
# Assign the interface to the Untrust zone.
[FW] firewall zone untrust [FW-untrust] add interface GigabitEthernet 0/0/1 [FW-untrust] quit
[FW] dns resolve [FW] dns server 8.8.8.8
[FW] security-policy [FW-policy-security] rule name nqa [FW-policy-security-rule-nqa] source-zone local [FW-policy-security-rule-nqa] destination-zone untrust [FW-policy-security-rule-nqa] action permit [FW-policy-security-rule-nqa] quit [FW-policy-security] quit
[FW] nqa test-instance admin http [FW-nqa-admin-http] test-type http [FW-nqa-admin-http] destination-address url www.example.com [FW-nqa-admin-http] http-operation get [FW-nqa-admin-http] http-url /test.html
[FW-nqa-admin-http] start now
Run the display nqa results command to view the test results.
<FW> display nqa results
NQA entry(admin, http) :testflag is inactive ,testtype is http
1 . Test 1 result The test is finished
SendProbe:3 ResponseProbe:3
Completion:success RTD OverThresholdsnumber: 0
MessageBodyOctetsSum: 2796 TargetAddress: 2.2.2.2
DNSQueryError number: 0 HTTPError number: 0
TcpConnError number : 0 System busy operation number:0
DNSRTT Sum/Min/Max:0/0/0 TCPConnectRTT Sum/Min/Max: 10/2/5
TransactionRTT Sum/Min/Max: 7/2/3
RTT Sum/Min/Max/Avg: 17/4/8/5
DNSServerTimeout:0 TCPConnectTimeout:0 TransactionTimeout: 0
Lost packet ratio:0%
# sysname FW # interface GigabitEthernet 0/0/1 undo shutdown ip address 1.1.1.1 255.255.255.0 # firewall zone untrust set priority 5 add interface GigabitEthernet 0/0/1 # security-policy rule name nqa source-zone local destination-zone untrust action permit # nqa test-instance admin http test-type http destination-address url www.example.com http-operation get http-url /test.html start now /*This command is a one-time action. Therefore, the result is not saved in the configuration file.*/