配置FTP上载速度测试示例
配置思路
采用如下思路进行配置:
SwitchA作为NQA客户端和FTP Client。在SwitchA上配置并启动FTP测试例,使用NQA FTP功能测试是否可以和指定的FTP服务器建立连接,以及向FTP服务器上载一个文件的时间。
登录FTP服务器的用户名为user1,密码为hello123,构造大小为10k的文件上载。
操作步骤
- 配置SwitchB
# 配置SwitchB的IP地址。
<Quidway> system-view [Quidway] sysname SwitchB [SwitchB] vlan 100 [SwitchB-vlan100] quit [SwitchB] interface gigabitethernet 1/0/1 [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
# 配置SwitchB作为FTP服务器。
[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 [SwitchB] quit
- 配置SwitchA
# 配置SwitchA的IP地址。
<Quidway> system-view [Quidway] sysname SwitchA [SwitchA] vlan 100 [SwitchA-vlan100] quit [SwitchA] interface gigabitethernet 1/0/1 [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
# 在SwitchA上配置FTP类型的NQA测试例,构造一个大小为10k字节的文件上载
[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 put [SwitchA-nqa-admin-ftp] ftp-username user1 [SwitchA-nqa-admin-ftp] ftp-password hello123 [SwitchA-nqa-admin-ftp] ftp-filesize 10
- 启动测试
[SwitchA-nqa-admin-ftp] start now
- 查看测试结果
# 在SwitchA上查看NQA测试结果。
[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: 10240 Stats errors number: 0 Operation timeout number: 0 System busy operation number:0 Drop operation number:0 Disconnect operation number: 0 CtrlConnTime Min/Max/Average: 657/657/657 DataConnTime Min/Max/Average: 500/500/500 SumTime Min/Max/Average: 1157/1157/1157 Average RTT:656 Lost packet ratio:0 %
# 在SwitchB上可以看到增加了一个名为“nqa-ftp-test.txt”的文件。(以下只显示部分文件)
<SwitchB> dir flash: Directory of flash:/ 0 -rw- 331 Jul 06 2007 18:34:34 private-data.txt 1 -rw- 10,240 Jul 06 2007 18:37:06 nqa-ftp-test.txt 2,540 KB total (1,536 KB free)
配置文件
SwitchA的配置文件
# sysname SwitchA # vlan batch 100 # interface Vlanif100 ip address 10.1.1.1 255.255.255.0 # interface GigabitEthernet1/0/1 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-filesize 10 ftp-username user1 ftp-password cipher %^%#z:zPAcsVG(dT)wOS=@vS-3gw!X4xn"*jP.FcU\zB%^%# ftp-operation put # return
SwitchB的配置文件
# sysname SwitchB # FTP server enable # vlan batch 100 # aaa local-user user1 password irreversible-cipher $1a$a:zPAcsVG(dT)wOS=@vS-1gw!X3xn"*jP.FcU\zB$ 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 hybrid pvid vlan 100 port hybrid untagged vlan 100 # return