配置Trace测试示例
操作步骤
- 配置各接口的IP地址并配置交换机之间路由可达
# 配置SwitchA。
<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] ip route-static 10.2.1.0 255.255.255.0 10.1.1.2
# 配置SwitchB。
<Quidway> system-view [Quidway] sysname SwitchB [SwitchB] vlan 100 [SwitchB-vlan100] quit [SwitchB] vlan 110 [SwitchB-vlan110] 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] interface gigabitethernet 1/0/2 [SwitchB-GigabitEthernet1/0/2] port hybrid pvid vlan 110 [SwitchB-GigabitEthernet1/0/2] port hybrid untagged vlan 110 [SwitchB-GigabitEthernet1/0/2] quit [SwitchB] interface vlanif 110 [SwitchB-Vlanif110] ip address 10.2.1.1 24 [SwitchB-Vlanif110] quit
# 配置SwitchC。
<Quidway> system-view [Quidway] sysname SwitchC [SwitchC] vlan 110 [SwitchC-vlan110] quit [SwitchC] interface gigabitethernet 1/0/1 [SwitchC-GigabitEthernet1/0/1] port hybrid pvid vlan 110 [SwitchC-GigabitEthernet1/0/1] port hybrid untagged vlan 110 [SwitchC-GigabitEthernet1/0/1] quit [SwitchC] interface vlanif 110 [SwitchC-Vlanif110] ip address 10.2.1.2 24 [SwitchC-Vlanif110] quit [SwitchC] ip route-static 10.1.1.0 255.255.255.0 10.2.1.1
- 在SwitchA上配置Trace类型的NQA测试例,目的地址为10.2.1.2
[SwitchA] nqa test-instance admin trace [SwitchA-nqa-admin-trace] test-type trace [SwitchA-nqa-admin-trace] destination-address ipv4 10.2.1.2
- 启动测试
[SwitchA-nqa-admin-trace] start now
- 查看测试结果
# 在SwitchA上查看NQA测试结果。
[SwitchA-nqa-admin-trace] display nqa results test-instance admin trace NQA entry(admin, trace) :testflag is inactive ,testtype is trace 1 . Test 1 result The test is finished Completion:success Attempts number:1 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 Drop operation number:0 Last good path Time:2012-07-17 11:21:27.2 1 . Hop 1 Send operation times: 3 Receive response times: 3 Min/Max/Average Completion Time: 1/1/1 Sum/Square-Sum Completion Time: 3/3 RTD OverThresholds number: 0 Last Good Probe Time: 2012-07-17 11:21:27.2 Destination ip address:10.1.1.2 Lost packet ratio: 0 % 2 . Hop 2 Send operation times: 3 Receive response times: 3 Min/Max/Average Completion Time: 15/30/23 Sum/Square-Sum Completion Time: 70/1750 RTD OverThresholds number: 0 Last Good Probe Time: 2012-07-17 11:22:13.2 Destination ip address:10.2.1.2 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 # ip route-static 10.2.1.0 255.255.255.0 10.1.1.2 # nqa test-instance admin trace test-type trace destination-address ipv4 10.2.1.2 # return
SwitchB的配置文件
# sysname SwitchB # vlan batch 100 110 # interface Vlanif100 ip address 10.1.1.2 255.255.255.0 # interface Vlanif110 ip address 10.2.1.1 255.255.255.0 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 100 port hybrid untagged vlan 100 # interface GigabitEthernet1/0/2 port hybrid pvid vlan 110 port hybrid untagged vlan 110 # return
SwitchC的配置文件
# sysname SwitchC # vlan batch 110 # interface Vlanif110 ip address 10.2.1.2 255.255.255.0 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 110 port hybrid untagged vlan 110 # ip route-static 10.1.1.0 255.255.255.0 10.2.1.1 # return