Cisco SLA/RTR与华为 NQA 浮动路由检测切换机制

注:这里两种协议都是要去购买许可证的,一般用在双出口冗余性的网络,烧钱

华为交换机S5720配置nqa+静态路由切换
96 玩玩啫
2018.01.18 17:18 字数 285 阅读 3120评论 0喜欢 0

一、实验拓扑

在这里插入图片描述

二、SW2配置
nqa test-instance helipay icmp
test-type icmp
destination-address ipv4 2.2.2.10 //探测的目标地址
frequency 10 //检测周期10秒
interval seconds 3 //周期内发的三次包时间间隔,该数值乘于3,不能超过周期设置值
start now

//静态路由关联内容
ip route-static 0.0.0.0 0.0.0.0 Vlanif100 1.1.1.2 track nqa helipay icmp //必须带出接口
ip route-static 0.0.0.0 0.0.0.0 1.1.1.3 preference 100

三、状态查看
dis nqa results //产看探测结果
“Lost packet ratio: 0 %”,这说明链路状态完好。
“Lost packet ratio: 100%”,这说明链路状态发生故障
dis nqa history //产看探测包的记录情况

五、探测回复后
若是探测IP回复了,nqa是不支持抢占的,需要先关闭nqa探测。
nqa test-instance helipay icmp
undo start //结束探测,路由才会基于优先级高低重新更新
start now //然后重新再启用探测

######################################################################################

cisco IP SLA+Track实现静态路由的冗余切换
科技小能手 2017-11-12 23:18:00 浏览1731

测试
IP
static
路由器




IP SLA(Internet Protocol Service-Level Agreement)互联网服务等级协议,本实验里通过发送测试报文,测试下一跳是否可达,结合Track实现冗余静态路由的切换。

实验环境:
模拟器:GNS3
路由器:C3640-JK9O3S-M-12.4(7a).BIN
终端:VPCS
网络拓扑:
wKiom1aYnvTzMTEUAABM4-5GKmU787.png

R4模拟某公司专线接入路由器,R3模拟对端银行网络设备。
R4和R3之间通过两条专线互联,联通专线为主链路,电信专线为备链路。
PC1模拟公司客户端服务器,PC2模拟银行服务端服务器。PC1通过专线访问银行服务端PC2。

实验目的:
当主链路出问题时,自动切换到备份链路。

网络配置:

R4#show ip int b
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 192.168.193.1 YES manual up up
FastEthernet1/0 192.168.194.1 YES manual up up
FastEthernet2/0 192.168.40.254 YES manual up up

R3#show ip int b
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 192.168.193.2 YES manual up up
FastEthernet1/0 192.168.194.2 YES manual up up
FastEthernet2/0 192.168.206.254 YES manual up up

VPCS:
PC1> ip 192.168.40.41/24 192.168.40.254
PC2> ip 192.168.206.1/24 192.168.206.254

IP SLA配置命令:

R4:
R4#conf t
R4(config)#ip sla monitor 11
R4(config-sla-monitor)#type echo protocol ipIcmpEcho 192.168.193.2 source-interface f0/0
R4(config-sla-monitor-echo)#timeout 1000
R4(config-sla-monitor-echo)#frequency 3
R4(config-sla-monitor-echo)#exit
R4(config)#ip sla monitor schedule 11 life forever start-time now
R4(config)#track 1 rtr 11 reachability
R4(config-track)#exit
// 静态路由(主链路):
R4(config)#ip route 192.168.206.1 255.255.255.255 192.168.193.2 track 1
// 浮动静态路由(备份链路):
R4(config)#ip route 192.168.206.1 255.255.255.255 192.168.194.2 10

R3:
R3#conf t
R3(config)#ip sla monitor 11
R3(config-sla-monitor)#type echo protocol ipIcmpEcho 192.168.193.1 source-interface f0/0
R3(config-sla-monitor-echo)#timeout 1000
R3(config-sla-monitor-echo)#frequency 3
R3(config-sla-monitor-echo)#exit
R3(config)#ip sla monitor schedule 11 life forever start-time now
R3(config)#track 1 rtr 11 reachability
R3(config-track)#exit
// 静态路由(主链路):
R3(config)#ip route 192.168.40.41 255.255.255.255 192.168.193.1 track 1
// 浮动静态路由(备份链路):
R3(config)#ip route 192.168.40.41 255.255.255.255 192.168.194.1 10

测试:

// 当前主链路静态路由
R4#show ip route static
192.168.206.0/32 is subnetted, 1 subnets
S 192.168.206.1 [1/0] via 192.168.193.2

R3# show ip route static
192.168.40.0/32 is subnetted, 1 subnets
S 192.168.40.41 [1/0] via 192.168.193.1

// 把主链路一边端口down掉
R4#conf t
R4(config)#int f0/0
R4(config-if)#shutdown
R4(config-if)#end
在这里插入图片描述
// 3秒后已切换为备用静态路由
R4#show ip route static
192.168.206.0/32 is subnetted, 1 subnets
S 192.168.206.1 [10/0] via 192.168.194.2

R3#show ip route static
192.168.40.0/32 is subnetted, 1 subnets
S 192.168.40.41 [10/0] via 192.168.194.1

wKioL1aYqSTSMp2iAADg0pTj4nI794.png

通过长ping发现路由切换后连通正常。

后记:

在双方设备条件允许情况下,可以使用BFD检测机制,提供毫秒级检测。大多数情况下,由于银行网络设备厂商不同、设备新旧程度不同,可能不支持BFD协议,所以IP SLA作为备选方案提供秒级的检测。华为的NQA技术和cisco IP SLA类似。

本文转自 张斌_青岛 51CTO博客,原文链接:http://blog.51cto.com/qicheng0211/1735381
  • 2
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值