对于MSR网关,可以使用策略路由和自动侦测实现负载分担和链路备份功能。同样以其中一条WAN连接地址为142.1.1.2/24,网关为142.1.1.1,另外一条WAN连接地址为162.1.1.2/24,网关为162.1.1.1,使用MSR2010做为网关设备为例,配置方法如下:
1、配置自动侦测组,对WAN连接状态进行侦测:
[H3C]nqa agent enable
[H3C]nqa entry wan1 1
[H3C-nqa-wan1-1]type icmp-echo
[H3C-nqa-wan1-1-icmp-echo]destination ip 142.1.1.1
[H3C-nqa-wan1-1-icmp-echo]next-hop 142.1.1.1
[H3C-nqa-wan1-1-icmp-echo]probe count 3
[H3C-nqa-wan1-1-icmp-echo]probe timeout 1000
[H3C-nqa-wan1-1-icmp-echo]frequency 10000
[H3C-nqa-wan1-1-icmp-echo]reaction 1 checked-element probe-fail threshold-type consecutive 6 action-type trigger-only
[H3C]nqa entry wan2 1
[H3C-nqa-wan2-1]type icmp-echo
[H3C-nqa-wan2-1-icmp-echo]destination ip 162.1.1.1
[H3C-nqa-wan2-1-icmp-echo]next-hop 162.1.1.1
[H3C-nqa-wan2-1-icmp-echo]frequency 10000
[H3C-nqa-wan2-1-icmp-echo]probe count 3
[H3C-nqa-wan2-1-icmp-echo]probe timeout 1000
[H3C-nqa-wan2-1-icmp-echo]reaction 1 checked-element probe-fail threshold-type consecutive 6 action-type trigger-only
[H3C]nqa schedule wan1 1 start-time now lifetime forever
[H3C]nqa schedule wan2 1 start-time now lifetime forever
[H3C]track 1 nqa entry wan1 1 reaction 1
[H3C]track 2 nqa entry wan2 1 reaction 1
2、配置默认路由,当任意WAN链路出现故障时,流量可以在另外一条链路上进行转发
[H3C]ip route-static 0.0.0.0 0.0.0.0 142.1.1.1 track 1 preference 60
[H3C]ip route-static 0.0.0.0 0.0.0.0 162.1.1.1 track 2 preference 100