The FW serves as an NQA client to measure the speed at which the client obtains an IP address from a DHCP server.
As shown in Figure 1, the FW serves as the NQA client. The test is to measure the speed at which the client obtains an IP address from the DHCP server.
# Set an IP address for the interface.
<FW> system-view [FW] interface GigabitEthernet 0/0/1 [FW-GigabitEthernet0/0/1] ip address 10.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] 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 dhcp [FW-nqa-admin-dhcp] test-type dhcp [FW-nqa-admin-dhcp] source-interface GigabitEthernet 0/0/1
[FW_A-nqa-admin-dhcp] start now
Run the display nqa results command to view the test results.
<FW> display nqa results
NQA entry(admin, dhcp) :testflag is inactive ,testtype is dhcp
1 . Test 1 result The test is finished
Send operation times: 3 Receive response times: 3
Completion:success RTD OverThresholds number: 0
Attempts number:1 Drop operation number:0
Disconnect operation number:0 Operation timeout number:0
System busy operation number:0 Connection fail number:0
Operation sequence errors number:0 RTT Status errors number:0
Destination ip address:192.168.0.1
Min/Max/Average Completion Time: 996/999/997
Sum/Square-Sum Completion Time: 2992/2984026
Last Good Probe Time: 2016-01-20 18:21:42.5
Lost packet ratio: 0 %
# sysname FW # interface GigabitEthernet 0/0/1 undo shutdown ip address 10.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 dhcp test-type dhcp source-interface GigabitEthernet 0/0/1 start now /*This command is a one-time action. Therefore, the result is not saved in the configuration file.*/