1)MSR配置方法
对于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 NQA使能
[H3C]nqa entry wan1 1(测试组) 创建测试组1
[H3C-nqa-wan1-1]type icmp-echo 侦测类型为echo
[H3C-nqa-wan1-1-icmp-echo]destination ip 142.1.1.1 跟踪的目的IP
[H3C-nqa-wan1-1-icmp-echo]next-hop 142.1.1.1 下一跳
[H3C-nqa-wan1-1-icmp-echo]probe count 3 探头数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-wan2-1-icmp-echo]quit
[H3C]nqa schedule wan1 1 start-time now lifetime forever 除了名字之外,照敲
[H3C]nqa schedule wan2 1 start-time now lifetime forever NQA状态永远开启跟踪
[H3C]track 1 nqa entry wan1 1 reaction 1
[H3C]track 2 nqa entry wan2 1 reaction 1
2、配置ACL,对业务流量进行划分,以根据内网主机单双号进行划分为例:
[H3C]acl number 3200
[H3C-acl-adv-3200] rule 0 permit ip source 192.168.1.0 0.0.0.254
[H3C-acl-adv-3200]rule 1000 deny ip
[H3C-acl-adv-3200]quit
[H3C]acl number 3201
[H3C-acl-adv-3201]rule 0 permit ip source 192.168.1.1 0.0.0.254
[H3C-acl-adv-3201]rule 1000 deny ip
3、配置策略路由,定义流量转发规则,以双号主机走WAN1,单号主机走WAN2为例:
[H3C]policy-based-route wan(流量规则名字) permit node 1
[H3C-pbr-wan-1]if-match acl 3200
[H3C-pbr-wan-1]apply ip-address next-hop 142.1.1.1 track 1
[H3C-pbr-wan-1]quit
[H3C]policy-based-route wan permit node 2
[H3C-pbr-wan-2]if-match acl 3201
[H3C-pbr-wan-2]apply ip-address next-hop 162.1.1.1 track 2
4、 在LAN口启用策略路由转发:
[H3C]interface Vlan-interface 1
[H3C-Vlan-interface1]ip policy-based-route wan 将WAN这条规则应用到LAN口
5、配置默认路由,当任意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 或者直接默认优先级
说明:第一步中先创建测试组1,其中分别包含WAN1和WAN2两条测试规则;
第二步是创建ACL划分数据流量
第三步对数据流 定义转发规则
第四步应用策略到LAN口
第五步配置两条默认路由分别指向两个WAN口
暂无评论