Example for Configuring an FTP Download Test Instance
Networking Requirements
In Figure 6-28, the performance of the FTP download function needs to be checked.
Configuration Roadmap
The configuration roadmap is as follows:
Configure SwitchA as an NQA client.
Configure SwitchB as the FTP server. Log in to the FTP server using user name user1 and password hello123 to download file test.txt.
Create and start an FTP test instance on SwitchA to check whether SwitchA can set up a connection with the FTP server and to obtain duration for downloading the file from the FTP server.
Procedure
- Configure SwitchB.
# Configure an IP address for SwitchB.
<HUAWEI> system-view
[HUAWEI] sysname SwitchB
[SwitchB] vlan 100
[SwitchB-vlan100] quit
[SwitchB] interface gigabitethernet 1/0/1
[SwitchB-GigabitEthernet1/0/1] port link-type hybrid
[SwitchB-GigabitEthernet1/0/1] port hybrid pvid vlan 100
[SwitchB-GigabitEthernet1/0/1] port hybrid untagged vlan 100
[SwitchB-GigabitEthernet1/0/1] quit
[SwitchB] interface vlanif 100
[SwitchB-Vlanif100] ip address 10.1.1.2 24
[SwitchB-Vlanif100] quit
# Configure SwitchB as the FTP server.
[SwitchB] ftp server enable
[SwitchB] aaa
[SwitchB-aaa] local-user user1 password irreversible-cipher hello123
[SwitchB-aaa] local-user user1 privilege level 15
[SwitchB-aaa] local-user user1 service-type ftp
[SwitchB-aaa] local-user user1 ftp-directory flash:/
[SwitchB-aaa] quit
- Configure SwitchA.
# Configure an IP address for SwitchA.
<HUAWEI> system-view
[HUAWEI] sysname SwitchA
[SwitchA] vlan 100
[SwitchA-vlan100] quit
[SwitchA] interface gigabitethernet 1/0/1
[SwitchA-GigabitEthernet1/0/1] port link-type hybrid
[SwitchA-GigabitEthernet1/0/1] port hybrid pvid vlan 100
[SwitchA-GigabitEthernet1/0/1] port hybrid untagged vlan 100
[SwitchA-GigabitEthernet1/0/1] quit
[SwitchA] interface vlanif 100
[SwitchA-Vlanif100] ip address 10.1.1.1 24
[SwitchA-Vlanif100] quit
# Create an NQA FTP test instance on SwitchA.
[SwitchA] nqa test-instance admin ftp
[SwitchA-nqa-admin-ftp] test-type ftp
[SwitchA-nqa-admin-ftp] destination-address ipv4 10.1.1.2
[SwitchA-nqa-admin-ftp] source-address ipv4 10.1.1.1
[SwitchA-nqa-admin-ftp] ftp-operation get
[SwitchA-nqa-admin-ftp] ftp-username user1
[SwitchA-nqa-admin-ftp] ftp-password hello123
[SwitchA-nqa-admin-ftp] ftp-filename test.txt
- Start the test instance.
[SwitchA-nqa-admin-ftp] start now
- Check the configuration.
[SwitchA-nqa-admin-ftp] display nqa results test-instance admin ftp NQA entry(admin, ftp) :testflag is inactive ,testtype is ftp 1 . Test 1 result The test is finished SendProbe:1 ResponseProbe:1 Completion:success RTD OverThresholds number: 0 MessageBodyOctetsSum: 448 Stats errors number: 1 Operation timeout number: 0 System busy operation number:0 Drop operation number:0 Disconnect operation number: 0 CtrlConnTime Min/Max/Average: 438/438/438 DataConnTime Min/Max/Average: 218/218/218 SumTime Min/Max/Average: 656/656/656 Average RTT:656 Lost packet ratio:0 %
Configuration Files
SwitchA configuration file
# sysname SwitchA # vlan batch 100 # interface Vlanif100 ip address 10.1.1.1 255.255.255.0 # interface GigabitEthernet1/0/1 port link-type hybrid port hybrid pvid vlan 100 port hybrid untagged vlan 100 # nqa test-instance admin ftp test-type ftp destination-address ipv4 10.1.1.2 source-address ipv4 10.1.1.1 ftp-username user1 ftp-password cipher %^%#z:zPAcsVG(dT)wOS=@vS-3gw!X4xn"*jP.FcU\zB%^%# ftp-filename test.txt # return
SwitchB configuration file
# sysname SwitchB # FTP server enable # vlan batch 100 # aaa local-user user1 password irreversible-cipher $1a$1:zPAc2VG(dT)wOS=@vS-3gw!X4xn"*j3.FcU\cB$ local-user user1 privilege level 15 local-user user1 ftp-directory flash:/ local-user user1 service-type ftp # interface Vlanif100 ip address 10.1.1.2 255.255.255.0 # interface GigabitEthernet1/0/1 port link-type hybrid port hybrid pvid vlan 100 port hybrid untagged vlan 100 # return