BFD与VRRP联动小练习

1.配置IP和改名以及vlan和trunk链路(太简单不演示)

2.配置VRRP

SW2的配置:
[SW2]int vlan 10
[SW2-Vlanif10]vrrp vrid 1 vir 192.168.10.254
[SW2-Vlanif10]vrrp vrid 1 priority 130
 SW3的配置:
[SW3]int v 10
[SW3-Vlanif10]vrrp vrid 1 vir 192.168.10.254 

 我们嫌弃VRRP交替主备设备的时间周期太慢(默认来算要3s加一个偏移时间)所以我们配置BFD:

3.配置BFD

SW2配置:
[SW2]bfd 
[SW2-bfd]q
[SW2]bfd hhh bind peer-ip 192.168.10.252
[SW2-bfd-session-hhh]discriminator local 1
[SW2-bfd-session-hhh]discriminator remote 2
[SW2-bfd-session-hhh]min-tx-interval 100	
[SW2-bfd-session-hhh]min-rx-interval 100
[SW2-bfd-session-hhh]commit
SW3配置:
[SW3]bfd
[SW3-bfd]q
[SW3]bfd hhh bind peer-ip 192.168.10.251
[SW3-bfd-session-hhh]discriminator local 2
[SW3-bfd-session-hhh]discriminator remote 1
[SW3-bfd-session-hhh]min-tx-in 100
[SW3-bfd-session-hhh]min-rx 100
[SW3-bfd-session-hhh]commit

4.BFD与VRRP联动

只用在备份设备上配置即可:
[SW3-bfd-session-hhh]q
[SW3]int v 10
[SW3-Vlanif10]vrrp vrid 1 track bfd-session 2 ?
  increased  Increase priority
  reduced    Reduce priority
  <cr>       

[SW3-Vlanif10]vrrp vrid 1 track bfd-session 2 increased 60
如此一来,当master设备故障,backup设备在三个BFD发送周期(我设置的发送周期为100ms)没有收到BFD报文将会把自己优先级上升60,如此就可以快速取代master设备继续为用户转发数据。

5.验证

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值