浮动静态路由之SLA(静态路由中的浮动路由)

小编:迷魂雪 更新时间:2022-04-28

本篇SLA配置是付费阅读,如您比较介意,请绕行,谢谢!

IP SLA介绍

SLA (Service-Level Agreement)服务级别协议,简单的理解,就是测量一些网络性能参数,在超过一些门限值时,结合track或者EEM它可以触发一些操作。例如:
1. 监控下一跳的可达性,如果不可达了, 则让某一静态路由失效
2. 监控邻居的接口地址,如果连续三次不可达, 则将端口shutdown

企业生产环境当中,网络比较复杂,中间连接的网络设备较多,利用SLA的监控目的是否可达来判断该链路是否可达,以此来更灵活的侦测到主链路是否正常,异常时切换到备用链路。

实验拓扑图

浮动静态路由之SLA(静态路由中的浮动路由)
  • R2-SW1-R1-SW2-R3 为主链路
  • R2-SW3-R3 为备链路
  • SW交换机不配置数据,当二层交换机使用

基础数据配置

R1配置

Router>en Router#conf t Enter configuration commands, one per line. End with CNTL/Z. Router(config)#hostname R1 R1(config)#interface ethernet 1/0 R1(config-if)#ip address 12.1.1.1 255.255.255.0 R1(config-if)#no shu R1(config-if)#exit R1(config)#interface ethernet 1/1 R1(config-if)#ip address 13.1.1.1 255.255.255.0 R1(config-if)#no shu

R2配置

Router>en Router#conf t Enter configuration commands, one per line. End with CNTL/Z. Router(config)#hostname R2 R2(config)#interface ethernet 1/0 R2(config-if)#ip address 12.1.1.2 255.255.255.0 R2(config-if)#no shu R2(config-if)#exit R2(config)#interface ethernet 1/1 R2(config-if)#ip address 23.1.1.2 255.255.255.0 R2(config-if)#no shu R2(config-if)#exit R2(config)#interface ethernet R2(config)#interface ethernet 1/2 R2(config-if)#ip address 1.1.1.2 255.255.255.0 R2(config-if)#

R3配置

Router>en Router#conf t Enter configuration commands, one per line. End with CNTL/Z. Router(config)#ho Router(config)#hostname R3 R3(config)#interface ethernet 1/0 R3(config-if)#ip address 13.1.1.3 255.255.255.0 R3(config-if)#no shu R3(config-if)#exit R3(config)#interface ethernet 1/1 R3(config-if)#ip add 23.1.1.3 255.255.255.0 R3(config-if)#no shu R3(config-if)#exit R3(config)#interface ethernet 1/2 R3(config-if)#ip address 2.2.2.3 255.255.255.0 R3(config-if)#no shu

PC1配置

VPCS> set pcname PC1 PC1> PC1> ip 1.1.1.1/24 1.1.1.2 Checking for duplicate address... PC1 : 1.1.1.1 255.255.255.0 gateway 1.1.1.2 PC1>

PC2配置

VPCS> set pcname PC2 PC2> ip 2.2.2.2/24 2.2.2.3 Checking for duplicate address... PC1 : 2.2.2.2 255.255.255.0 gateway 2.2.2.3 PC2>

配置之后,请互相ping测试是否直连的都互通,确保没有问题之后,开始配置静态路由。

R1静态路由配置

R1路由配置

R1(config)#ip route 1.1.1.0 255.255.255.0 ethernet 1/0 12.1.1.2 R1(config)#ip route 2.2.2.0 255.255.255.0 ethernet 1/1 13.1.1.3

SLA配置

R2和R3都需要配置SLA,不然一边可以侦测到网络不可达,而另一边却还认为网络可达,造成路由丢包。

由于以下内容是付费,有兴趣的可点击这里继续阅读,感谢支持!!!