华为VRRP

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/x503809622/article/details/79543871

VRRP:virtual routeredundancy protocol

优先级默认为100,当优先级一样,比较IP地址

优先级高得为master,1-255,

255是不能指定的,当虚拟的网关地址和真实的route的ip地址相同时,会将该路由器的优先级升级为255


配置单个虚拟路由器:

RTA:

Interface Ethernet 0/0

Ip address 10.1.1.254 24

Vrrp vrid 1 virtual-ip 10.1.1.254(虚拟ip地址)

 

RTB:

Interface Ethernet 0/0

Ip address 10.1.1.252 24

Vrrp vrid 1 virtual-ip 10.1.1.254

Vrrp vrid 1 priority 200(设置优先级)

 

Interface Ethernet 0/0

Vrrp vrid 1 track interface Ethernet 1/0reduced 150(追踪Ethernet 1/0状态,当Ethernet 1/0出现问题,优先级会减少150)


试验:


按照图片配置

交换机gigabitEthernet0/0/1和gigabitEthernet 0/0/2为trunk口

Ethernet 0/0/1和 Ethernet 0/0/2为access口

AR1的命令:

Sy

Sy SW1

Interface gigabitEthernet 0/0/2

Ip address 192.168.1.253 24

Vrrp vrid 1 virtual-ip 192.168.1.254

Vrrp vrid 1 priority 200

Vrrp vrid 1 preempt-mode disable

Interface gigabitEthernet 0/0/0

Ip address 13.1.1.1 24

Quit

Ip route-static 3.0.0.0 8 13.1.1.2

Interface gigabitEthernet 0/0/2

vrrp vrid 1 track interface GigabitEthernet0/0/0 reduced 150

AR2命令:

Sy

Sy SW1

Interface gigabitEthernet 0/0/2

Ip address 192.168.1.252 24

Vrrp vrid 1 virtual-ip 192.168.1.254

Vrrp vrid 1 priority 150

Vrrp vrid 1 preempt-mode timer delay 20

Interface gigabitEthernet 0/0/0

Ip address 23.1.1.2 24

Quit

Ip route-static 3.0.0.0 8 23.1.1.3



AR3上的命令:

Sy

Sy AR3

Interface loopback0

Ip address 3.3.3.38

InterfacegigabitEthernet 0/0/0

Ip address13.1.1.3 24

InterfacegigabitEthernet 0/0/1

Ip address 23.1.1.1324

Quit

Ip route-static192.168.1.0 24 13.1.1.1

Ip route-static192.168.1.0 24 23.1.1.2


测试:

PC1去PING AR3的环回口3.3.3.3


ShutdownAR1的gigabitEthernet 0/0/0口,依旧可以PING通










展开阅读全文

没有更多推荐了,返回首页