配置HTTP测试示例
配置思路
采用如下思路进行配置:
SwitchA作为NQA客户端。
在SwitchA上配置并启动HTTP测试例,使用NQA HTTP功能测试是否可以和指定的HTTP服务器建立连接,以及它们之间传输一个文件的时间。
操作步骤
- 配置SwitchA的接口地址,且和HTTP Server路由可达
<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] ospf [SwitchA-ospf-1] area 0 [SwitchA-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255 [SwitchA-ospf-1-area-0.0.0.0] quit [SwitchA-ospf-1] quit
- 使能NQA客户端,配置HTTP类型的NQA测试例
[SwitchA] nqa test-instance admin http [SwitchA-nqa-admin-http] test-type http [SwitchA-nqa-admin-http] destination-address ipv4 10.2.1.1 [SwitchA-nqa-admin-http] http-operation get [SwitchA-nqa-admin-http] http-url http://www.***.com
配置HTTP测试例的URL必须是浏览器显示的URL地址,需要是实际合法的URL地址。这里以“http://www.***.com”举例。
- 启动测试
[SwitchA-nqa-admin-http] start now
- 查看测试结果
[SwitchA-nqa-admin-http] display nqa results test-instance admin http 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: 411 TargetAddress: 10.2.1.1 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: 4/1/2 TransactionRTT Sum/Min/Max: 3/1/1 RTT Sum/Min/Max/Avg: 7/2/3/2 DNSServerTimeout:0 TCPConnectTimeout:0 TransactionTimeout: 0 Lost packet ratio:0%
配置文件
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 # ospf 1 area 0.0.0.0 network 10.1.1.0 0.0.0.255 # nqa test-instance admin http test-type http destination-address ipv4 10.2.1.1 http-url http://www.***.com # return