关于华为NQA track 联动配置
用于多条线路,当主线路down的情况下,自动切换到辅助线路,主线路回复正常时,自动切换回主线路
RA:
interface GigabitEthernet0/0/0
ip address 20.1.1.1 255.255.255.0#
interface GigabitEthernet0/0/1
ip address 10.1.1.1 255.255.255.0
#
interface GigabitEthernet0/0/2
ip address 10.3.1.1 255.255.255.0
#
ip route-static 10.2.1.0 255.255.255.0 10.1.1.2
ip route-static 30.1.1.0 255.255.255.0 10.1.1.2 track nqa aa bb
ip route-static 30.1.1.0 255.255.255.0 10.3.1.3 preference 80
ip route-st 10.4.1.0 24 10.3.1.3
#
nqa test-instance aa bb
test-type icmp
destination-address ipv4 10.2.1.4
frequency 3
probe-count 1
start now
RB:
interface GigabitEthernet0/0/0
ip address 10.1.1.2 255.255.255.0
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
ip address 10.2.1.2 255.255.255.0
ip route-static 20.1.1.0 255.255.255.0 10.1.1.1
ip route-static 30.1.1.0 255.255.255.0 10.2.1.4
RC:
interface GigabitEthernet0/0/0
ip address 10.3.1.3 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 10.4.1.3 255.255.255.0
#
ip route-static 20.1.1.0 255.255.255.0 10.3.1.1
ip route-static 30.1.1.0 255.255.255.0 10.4.1.4
RD:
interface GigabitEthernet0/0/0
ip address 10.2.1.4 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 10.4.1.4 255.255.255.0
#
interface GigabitEthernet0/0/2
ip address 30.1.1.1 255.255.255.0
#
ip route-static 10.1.1.0 255.255.255.0 10.2.1.2
ip route-static 20.1.1.0 255.255.255.0 10.2.1.2 track nqa aa bb
ip route-static 20.1.1.0 255.255.255.0 10.4.1.3 preference 80
ip route-static 10.3.1.0 24 10.4.1.3
#
nqa test-instance aa bb
test-type icmp
destination-address ipv4 10.1.1.1
frequency 3
probe-count 1
start now
#
正常情况下:
<RA>tracert 30.1.1.1
traceroute to 30.1.1.1(30.1.1.1), max hops: 30 ,packet length: 40,press CTRL_C
to break
1 10.1.1.2 60 ms 30 ms 30 ms
2 10.2.1.4 30 ms 50 ms 40 ms
[RD]tracert 20.1.1.1
traceroute to 20.1.1.1(20.1.1.1), max hops: 30 ,packet length: 40,press CTRL_C
to break
1 10.2.1.2 30 ms 20 ms 20 ms
2 10.1.1.1 50 ms 30 ms 30 ms
现在把RB 停用,发现走的是备用线路。
<RA>ping 30.1.1.1
PING 30.1.1.1: 56 data bytes, press CTRL_C to break
Reply from 30.1.1.1: bytes=56 Sequence=1 ttl=254 time=40 ms
Reply from 30.1.1.1: bytes=56 Sequence=2 ttl=254 time=50 ms
Reply from 30.1.1.1: bytes=56 Sequence=3 ttl=254 time=30 ms
Reply from 30.1.1.1: bytes=56 Sequence=4 ttl=254 time=30 ms
Reply from 30.1.1.1: bytes=56 Sequence=5 ttl=254 time=30 ms
--- 30.1.1.1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 30/36/50 ms
<RA>tracert 30.1.1.1
traceroute to 30.1.1.1(30.1.1.1), max hops: 30 ,packet length: 40,press CTRL_C
to break
1 10.3.1.3 90 ms 20 ms 30 ms
2 10.4.1.4 40 ms 20 ms 30 ms
<RA>dis nqa results test-instance aa bb
NQA entry(aa, bb) :testflag is active ,testtype is icmp
1 . Test 640 result The test is finished
Send operation times: 1 Receive response times: 0
Completion:failed RTD OverThresholds number: 0
Attempts number:1 Drop operation 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
Destination ip address:10.2.1.4
Min/Max/Average Completion Time: 0/0/0
Sum/Square-Sum Completion Time: 0/0
Last Good Probe Time: 0000-00-00 00:00:00.0
Lost packet ratio: 100 % 这里显示NQA不通
OK!我们再把RB启动起来
重启RB后,测试。又自动跳回了主的线路。
<RA>tracert 30.1.1.1
traceroute to 30.1.1.1(30.1.1.1), max hops: 30 ,packet length: 40,press CTRL_C
to break
1 10.1.1.2 60 ms 10 ms 20 ms
2 10.2.1.4 30 ms 40 ms 20 ms
<RA>ping 30.1.1.1
PING 30.1.1.1: 56 data bytes, press CTRL_C to break
Reply from 30.1.1.1: bytes=56 Sequence=1 ttl=254 time=40 ms
Reply from 30.1.1.1: bytes=56 Sequence=2 ttl=254 time=40 ms
Reply from 30.1.1.1: bytes=56 Sequence=3 ttl=254 time=40 ms
Reply from 30.1.1.1: bytes=56 Sequence=4 ttl=254 time=40 ms
Reply from 30.1.1.1: bytes=56 Sequence=5 ttl=254 time=40 ms
--- 30.1.1.1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 40/40/40 ms
[RA]dis nqa results test-instance aa bb
NQA entry(aa, bb) :testflag is active ,testtype is icmp
1 . Test 1147 result The test is finished
Send operation times: 1 Receive response times: 1
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.2.1.4
Min/Max/Average Completion Time: 30/30/30
Sum/Square-Sum Completion Time: 30/900
Last Good Probe Time: 2018-04-20 17:08:05.0
Lost packet ratio: 0 % 正常