AR1配置:
interface GigabitEthernet0/0/0
ip address 192.168.1.251 255.255.255.0
vrrp vrid 1 virtual-ip 192.168.1.254
vrrp vrid 1 priority 120
#
interface GigabitEthernet0/0/1
ip address 192.168.13.1 255.255.255.0
#
ospf 1
area 0.0.0.0
network 0.0.0.0 255.255.255.255
AR2配置
interface GigabitEthernet0/0/0
ip address 192.168.1.252 255.255.255.0
vrrp vrid 1 virtual-ip 192.168.1.254
#
interface GigabitEthernet0/0/1
ip address 192.168.23.2 255.255.255.0
#
interface NULL0
#
ospf 1
area 0.0.0.0
network 0.0.0.0 255.255.255.255
AR3配置
interface GigabitEthernet0/0/0
ip address 192.168.13.3 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 192.168.23.3 255.255.255.0
#
interface NULL0
#
interface LoopBack0
ip address 192.168.3.3 255.255.255.255
#
ospf 1
area 0.0.0.0
network 0.0.0.0 255.255.255.255
配置完成,验证:
shutdown AR1的g0/0/0口,会出现两个丢包,然后恢复通信,说明AR2抢占Master,网关通过AR2实现。