在SW3和SW4上使用VRRP做冗余备份,SW3为主SW4为备,配合BFD检测上联链路,当上联链路DOWN的时候快速降低优先级,让sw成为master。
VRRP配置:
SW3:
interface Vlanif10
ip address 10.1.10.252 255.255.255.0
vrrp vrid 1 virtual-ip 10.1.10.254
vrrp vrid 1 priority 120
vrrp vrid 1 track bfd-session session-name 1 reduced 30 //绑定BFD
vrrp vrid 1 authentication-mode md5 A@Pc;6w5b@'eKRQqbl+Oe<{# //开启VRRP的认证
dhcp select global
SW4:
interface Vlanif10
ip address 10.1.10.253 255.255.255.0
vrrp vrid 1 virtual-ip 10.1.10.254
vrrp vrid 1 authentication-mode md5 A@Pc;6w5b@EBi%T]n/.IR<b#
BFD配置:
bfd //全局开启bfd
bfd 1 bind peer-ip 10.1.6.1 source-ip 10.1.6.2 auto
commit