VRRP+tunnel+IP SLA+Track实现冗余切换

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

实验环境:

模拟器:GNS3-1.5.2

路由器IOS 版本:C2691-ADVENTERPRISEK9-M)

交换机IOS版本:(C3640-IK9S-M), Version 12.4(10)

终端:VPCS

 

 

------------------------------网络接口配置---------------------------------------------

 

R1:

R1#sho ip interface brief

Interface IP-Address OK? Method Status Protocol

FastEthernet0/1 172.16.20.1 YES NVRAM up up

FastEthernet1/0 192.168.1.2 YES NVRAM up up

Tunnel0 172.18.1.2 YES NVRAM up up

R1(config)#interface Tunnel0

ip address 172.18.1.2 255.255.255.0

keepalive 10 3

tunnel source FastEthernet0/1

tunnel destination 10.1.1.4

 

R2:

R2#sho ip inter bri

Interface IP-Address OK? Method Status Protocol

FastEthernet0/1 192.168.1.3 YES NVRAM up up

FastEthernet1/0 172.16.50.1 YES NVRAM up up

Tunnel0 172.18.2.2 YES NVRAM up up

 

R2(config)#interface Tunnel0

ip address 172.18.2.2 255.255.255.0

tunnel source FastEthernet1/0

tunnel destination 10.1.1.4

 

R3:

R3#sh ip int bri

Interface IP-Address OK? Method Status Protocol

FastEthernet0/1 172.16.20.2 YES NVRAM up up

FastEthernet1/0 10.1.1.2 YES NVRAM up up

 

R4:

R4#show ip int br

Interface IP-Address OK? Method Status Protocol

FastEthernet1/0 172.16.50.2 YES NVRAM up up

FastEthernet1/1 10.1.1.3 YES NVRAM up up

 

R5:

 

R5#sh ip int br

Interface IP-Address OK? Method Status Protocol

FastEthernet0/0 unassigned YES unset up up

FastEthernet0/1 unassigned YES unset up up

FastEthernet0/10 10.248.0.1 YES NVRAM up up

Vlan10 10.1.1.4 YES NVRAM up up

Tunnel0 172.18.1.1 YES NVRAM up up

Tunnel1 172.18.2.1 YES NVRAM up up

R5(config)#interface Tunnel0

ip address 172.18.1.1 255.255.255.0

tunnel source Vlan10

tunnel destination 172.16.20.1

exit

interface Tunnel1

ip address 172.18.2.1 255.255.255.0

tunnel source Vlan10

tunnel destination 172.16.50.1

 

Sw1:

 

sw1#sh ip int br

Interface IP-Address OK? Method Status Protocol

FastEthernet0/0 unassigned YES unset up up

FastEthernet0/1 unassigned YES unset up up

FastEthernet0/10 20.1.1.1 YES NVRAM up up

Vlan10 192.168.1.4 YES NVRAM up up

 

VPCS:

PC1> ip 20.1.1.2/24 20.1.1.1
PC2> ip 10.248.0.2/24 10.248.0.1

 

--------------------------------------------------IP SLA与静态路由配置命令---------------------------------------------------------------

R1:

R1#conf t
R1(config)#ip sla monitor 10
R1(config-sla-monitor)#type echo protocol ipIcmpEcho 10.1.1.4 source-interface f0/1
R1(config-sla-monitor-echo)#timeout 500
R1(config-sla-monitor-echo)#frequency 2
R1(config-sla-monitor-echo)#exit
R1(config)#ip sla monitor schedule 10 life forever start-time now
R1(config)#track 10 rtr 10 reachability
R1(config-track)#exit

R1(config)#ip route 10.1.1.0 255.255.255.0 172.16.20.2

R1(config)#ip route 10.248.0.0 255.255.255.0 Tunnel0

R1(config)#ip route 20.1.1.0 255.255.255.0 192.168.1.4

 

R2:

R2#conf t
R2(config)#ip sla monitor 10
R2(config-sla-monitor)#type echo protocol ipIcmpEcho 10.1.1.4 source-interface f1/0
R2(config-sla-monitor-echo)#timeout 500
R2(config-sla-monitor-echo)#frequency 2
R2(config-sla-monitor-echo)#exit
R2(config)#ip sla monitor schedule 10 life forever start-time now
R2(config)#track 10 rtr 10 reachability

R2(config-track)#exit

R2(config)#ip route 10.1.1.0 255.255.255.0 172.16.50.2

R2(config)#ip route 10.248.0.0 255.255.255.0 Tunnel0

R2(config)#ip route 20.1.1.0 255.255.255.0 192.168.1.4

 

R3:

R3(config)#ip route 10.248.0.0 255.255.255.0 10.1.1.4

R3(config)#ip route 20.1.1.0 255.255.255.0 172.16.20.1

R3(config)#ip route 172.17.1.0 255.255.255.0 172.16.20.1

R3(config)#ip route 192.168.1.0 255.255.255.0 172.16.20.1

 

R4:

R4(config)#ip route 10.248.0.0 255.255.255.0 10.1.1.4

R4(config)#ip route 20.1.1.0 255.255.255.0 172.16.50.1

R4(config)#ip route 172.17.2.0 255.255.255.0 172.16.50.1

R4(config)#ip route 192.168.1.0 255.255.255.0 172.16.50.1

 

R5:

R5#conf t
R5(config)#ip sla monitor 10

R5(config(config-sla-monitor)#type echo protocol ipIcmpEcho 172.16.20.1 source-interface Vlan10 //从vlan10 去ping 172.16.20.1

R5 (config-sla-monitor-echo)#timeout 5000 //5秒没有响应,认为掉线

R5 (config-sla-monitor-echo)#frequency 3 //每3秒PING 一次

R5(config)#ip sla monitor schedule 10 life forever start-time now

R5(config)#track 10 rtr 10 reachability

R5(config-track)#exit

R5(config)#ip route 20.1.1.0 255.255.255.0 Tunnel0 track 10

R5(config)#ip route 20.1.1.0 255.255.255.0 Tunnel1 10

R5(config)#ip route 172.16.20.0 255.255.255.0 Vlan10

R5(config)#ip route 172.16.50.0 255.255.255.0 Vlan10

 

-----------------------------------------------------VRRP配置---------------------------------------------------------------------

R1:

R1(config)#interface FastEthernet1/0

ip address 192.168.1.2 255.255.255.0

vrrp 10 ip 192.168.1.1

vrrp 10 priority 250

standby 1 preempt

vrrp 10 track 10 decrement 100 //当出现SLA出现中断时,把自己的优先级降低100.

 

R1:

R2(config)#interface FastEthernet0/1

ip address 192.168.1.3 255.255.255.0

vrrp 10 ip 192.168.1.1

vrrp 10 priority 200

 

-----------------------------------------------------测试---------------------------------------------------------------------

 

中断master任意节点,切线路自动切换.

 

 

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

转载于:https://www.cnblogs.com/vcdx/p/9490473.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
大型企业网络中,MSTP是一种多层次交换协议,可以在网络中实现快速的链路传输和冗余备份。VRRP是虚拟路由冗余协议,用于提高网络的可用性和冗余备份。BFD是一种快速检测数据包丢失和链路故障的协议,可以实时监测网络的状态并迅速做出响应。Track命令允许管理员监测和跟踪网络中的特定条件,例如链路故障或网络拥塞,以便进行适当的调整和处理。OSPF是一种动态路由协议,可以根据网络的变化自动更新路由表,提高网络的效率和可靠性。 大型企业网络通常需要处理大量的数据流量和复杂的拓扑结构。为了确保网络的高可用性和冗余备份,可以使用MSTP和VRRP协议。MSTP可以将网络划分为多个区域,每个区域都有独立的冗余备份机制,以确保链路传输的可靠性。VRRP协议允许多个路由器共享同一个虚拟路由器IP地址,当主路由器故障时,备份路由器会接管主路由器的工作,确保网络的连通性。 BFD协议可以实时监测网络的状态,当网络链路发生故障时,可以迅速地发现并通知相关设备做出相应调整。同时,BFD协议可以帮助确保网络的稳定性,避免丢包和延迟。 Track功能可以帮助管理员根据网络的实时状态做出决策。例如,当某个链路发生故障时,Track可以监测到并通知管理员,管理员可以迅速采取措施,如调整路由器的邻居关系或重新配置路由表,以确保流量的顺畅传输。 最后,OSPF协议可以根据网络的动态变化自动更新路由表。当网络拓扑结构发生变化时,OSPF协议可以根据最新的信息重新计算最佳路径,提高网络的效率和可靠性。在大型企业网络中使用OSPF协议,可以减少管理员的工作量,同时实现快速而可靠的数据传输。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值