Example for Configuring Test Results to Be Sent to the FTP Server
Networking Requirements
In Figure 6-57, SwitchA functioning as the client performs the ICMP test and sends test results to the FTP server through FTP.
Configuration Roadmap
The configuration roadmap is as follows:
- Configure VLANs and IP addresses for interfaces on Switch A and Switch B.
Set parameters for connecting to the FTP server on SwitchA, enable the FTP server to save NQA test results through FTP, and set related parameter for saving test results.
Start the test instance and send test results to the FTP server.
Enable the FTP service on the FTP server to receive test result.
Procedure
- Configure an IP address for each interface and ensure reachable routes between switches, as shown in Figure 6-57.
<HUAWEI> system-view
[HUAWEI] sysname SwitchA
[SwitchA] vlan batch 10 20
[SwitchA] interface gigabitethernet 1/0/1
[SwitchA-GigabitEthernet1/0/1] port link-type hybrid
[SwitchA-GigabitEthernet1/0/1] port hybrid pvid vlan 20
[SwitchA-GigabitEthernet1/0/1] port hybrid untagged vlan 20
[SwitchA-GigabitEthernet1/0/1] quit
[SwitchA] interface vlanif 20
[SwitchA-Vlanif20] ip address 10.1.1.11 24
[SwitchA-Vlanif20] quit
[SwitchA] interface gigabitethernet 1/0/2
[SwitchA-GigabitEthernet1/0/2] port link-type hybrid
[SwitchA-GigabitEthernet1/0/2] port hybrid pvid vlan 10
[SwitchA-GigabitEthernet1/0/2] port hybrid untagged vlan 10
[SwitchA-GigabitEthernet1/0/2] quit
[SwitchA] interface vlanif 10
[SwitchA-Vlanif10] ip address 10.1.2.1 24
[SwitchA-Vlanif10] quit
For configurations of SwitchB, see the configuration file.
- Set parameters for connecting to the FTP server on SwitchA.
[SwitchA] nqa-ftp-record ip-address 10.1.2.8
[SwitchA] nqa-ftp-record username ftp
[SwitchA] nqa-ftp-record password ftp
[SwitchA] nqa-ftp-record filename icmp
- Set the number of test results to be saved in a file through FTP.
[SwitchA] nqa-ftp-record item-num 10010
- Configure the duration of saving test results through FTP.
[SwitchA] nqa-ftp-record time 2
- Send an alarm to the NMS after the FTP transmission succeeds.
[SwitchA] nqa-ftp-record trap-enable
- Enable the FTP server to save NQA test results through FTP on SwitchA.
[SwitchA] nqa-ftp-record enable
- Enable the NQA client and create an NQA ICMP test instance.
[SwitchA] nqa test-instance admin icmp
[SwitchA-admin-icmp] test-type icmp
[SwitchA-admin-icmp] destination-address ipv4 10.1.1.1
- Start the test instance.
[SwitchA-admin-icmp] start now
[SwitchA-admin-icmp] quit
[SwitchA] quit
- Enable the FTP service on the FTP server.
Configure the FTP user name and password, which must be the same as those configured on Switch A.
Configure the FTP work directory.
Enable the FTP service.
- Check the configuration.
# If the configuration is successful, the ICMP test result is displayed.
<SwitchA> display nqa results test-instance admin icmp
NQA entry(admin, icmp) :testflag is inactive ,testtype is icmp 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:10.1.1.1 Min/Max/Average Completion Time: 2/3/2 Sum/Square-Sum Completion Time: 7/17 Last Good Probe Time: 2014-01-14 08:06:29.4 Lost packet ratio: 0 %
# A .txt file exists in the FTP work directory. This is the test result file.
Configuration Files
SwitchA configuration file
# sysname SwitchA # vlan batch 10 20 # interface Vlanif10 ip address 10.1.2.1 255.255.255.0 # interface Vlanif20 ip address 10.1.1.11 255.255.255.0 # interface GigabitEthernet1/0/1 port link-type hybrid port hybrid pvid vlan 20 port hybrid untagged vlan 20 # interface GigabitEthernet1/0/2 port link-type hybrid port hybrid pvid vlan 10 port hybrid untagged vlan 10 # nqa-ftp-record trap-enable nqa-ftp-record ip-address 10.1.2.8 nqa-ftp-record username ftp nqa-ftp-record password cipher %^%#pP]XJ%3W7Hce{[>x=r/)nQ`#!b5D3;H~*c#u3w|$%^%# nqa-ftp-record filename icmp nqa-ftp-record item-num 10010 nqa-ftp-record time 2 nqa-ftp-record enable # nqa test-instance admin icmp test-type icmp destination-address ipv4 10.1.1.1 # return
SwitchB configuration file
# sysname SwitchB # vlan batch 20 # interface Vlanif20 ip address 10.1.1.1 255.255.255.0 # interface GigabitEthernet1/0/1 port link-type hybrid port hybrid pvid vlan 20 port hybrid untagged vlan 20 # return