双链路智能切换、配置静态路由,Track与NQA联动

#
nqa entry liantong 1
 type icmp-echo
  destination ip 210.12.30.*
  frequency 1000
  next-hop ip 210.12.30.*
  reaction 1 checked-element probe-fail threshold-type consecutive 5 action-type trigger-only
#
#启动探测。
 nqa schedule liantong 1 start-time now lifetime forever
#
#配置Track项1,关联NQA测试组(管理员为liantong,操作标签为1)的联动项1。
track 1 nqa entry liantong 1 reaction 1
#

#
nqa entry dianxin 2
 type icmp-echo
  destination ip 119.57.*.*
  frequency 1000
  next-hop ip 119.57.*.*
  reaction 1 checked-element probe-fail threshold-type consecutive 5 action-type trigger-only
#
#启动探测。
 nqa schedule dianxin 2 start-time now lifetime forever
#
#配置Track项2
track 2 nqa entry dianxin 2 reaction 1
#

track关联路由:
[H3C]ip route-static 0.0.0.0 0 GigabitEthernet0/2 210.12.30.* track 1 
Route has been modified.
[H3C]ip route-static 0.0.0.0 0 GigabitEthernet0/3 119.57.*.* track 2 preference 61
Route has been modified.

以上配置在实际过程中是这么操作的:

  1. 线路正常情况下,NQA探测结果一直OK,所以不会触发机关;
  2. 一旦线路故障了,NQA可以在5s内连续检测到5次FAILED,立即触发机关;
  3. 机关被触发,立即联动电信静态路由失效;
  4. 电信静态路由失效,联通线路立刻全权接管,整个过程在5s以内完成;
  5. 如果NQA探测成功,机关触发取消,电信出口默认路由自动恢复。

注意事项:

如果配置了策略路由,因为策略路由优先,所以在策略路由里也要加上NQA检测。否则线路中断后流量还会按照策略路由指定的下一条走,网络就会中断掉。如下:

#
acl advanced 3005
 rule 5 permit ip source 192.168.25.55 0.0.0.255
#
#
policy-based-route dianxin permit node 0
 if-match acl 3005
 apply next-hop 119.57.*.* track 2
#

#
interface GigabitEthernet0/0
 port link-mode route
 combo enable copper
 ip address 192.168.17.1 255.255.255.0
 tcp mss 1280
 ip policy-based-route dianxin
#

 

具体原理及名词结束见官网:
http://www.h3c.com/cn/d_201904/1175399_30005_0.htm#_Toc7358782

发表评论

1,396 次浏览