华为vrrp配置

华为vrrp配置VRRP 是公共的一个冗余协议 HSRP 是思科私有的协议 拓补图如下 VRRP 配置

VRRP基本概念

vrrp原理

同一组的vrrp中只有一个master。通过优先级进行选举谁是master,优先级相同则通过IP地址进行选举。真正具有转发功能的是master,当master出现故障时,其他的backup会根据优先级重新选举新的master,继续进行转发。中间可能会断开几秒。

拓补图如下:

华为vrrp配置

VRRP配置

R1:
#
interface GigabitEthernet0/0/0
 ip address 3.1.1.2 255.255.255.0
#
interface GigabitEthernet0/0/1
 ip address 4.1.1.2 255.255.255.0
#
interface GigabitEthernet0/0/2
 ip address 5.1.1.254 255.255.255.0
#
rip 1
 version 2
 network 3.0.0.0
 network 4.0.0.0
 network 5.0.0.0
#
LSW1:
#
interface Vlanif10
 ip address 1.1.1.252 255.255.255.0
 vrrp vrid 1 virtual-ip 1.1.1.254
 vrrp vrid 1 priority 150
 vrrp vrid 1 track interface GigabitEthernet0/0/4 reduced 100
 vrrp vrid 1 authentication-mode md5  admin
#
interface Vlanif20
 ip address 2.1.1.252 255.255.255.0
 vrrp vrid 2 virtual-ip 2.1.1.254
#
interface Vlanif30
 ip address 3.1.1.1 255.255.255.0
#
interface GigabitEthernet0/0/1
 port link-type trunk
 port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/2
 port link-type trunk
 port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/3
 port link-type trunk
 port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/4
 port link-type trunk
 port trunk pvid vlan 30
 port trunk allow-pass vlan 2 to 4094
#
rip 1
 version 2
 network 1.0.0.0
 network 2.0.0.0
 network 3.0.0.0
#






















































LSW2
#
interface Vlanif10
 ip address 1.1.1.253 255.255.255.0
 vrrp vrid 1 virtual-ip 1.1.1.254
 vrrp vrid 1 authentication-mode md5  admin
#
interface Vlanif20
 ip address 2.1.1.253 255.255.255.0
 vrrp vrid 2 virtual-ip 2.1.1.254
 vrrp vrid 2 priority 150
 vrrp vrid 2 track interface GigabitEthernet0/0/4 reduced 100
#
interface Vlanif40
 ip address 4.1.1.1 255.255.255.0
#
interface MEth0/0/1
#
interface GigabitEthernet0/0/1
 port link-type trunk
 port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/2
 port link-type trunk
 port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/3
 port link-type trunk
 port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/4
 port link-type trunk
 port trunk pvid vlan 40
 port trunk allow-pass vlan 2 to 4094
#
#
rip 1
 version 2
 network 1.0.0.0
 network 2.0.0.0
 network 4.0.0.0
#
LSW3和LSW4一样
#
interface GigabitEthernet0/0/1
 port link-type access
 port default vlan 10
#
interface GigabitEthernet0/0/2
 port link-type access
 port default vlan 20
#
interface GigabitEthernet0/0/3
 port link-type trunk
 port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/4
 port link-type trunk
 port trunk allow-pass vlan 2 to 4094
#


























































版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/232626.html原文链接:https://javaforall.net

(0)
上一篇 2025年9月26日 下午6:01
下一篇 2025年9月26日 下午6:22


相关推荐

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号