要求:
实现全网互通
使用vrrp实现网关的冗余备份,S2做为vlan10的主(master)设备,S3做为vlan20的主(master)设备,分担流量
PC1为vlan10,PC2为vlan20,使用DHCP中继分配IP地址
配置
S1配置,在vlanif10配置vrrp vrid 10 track interface GigabitEthernet0/0/2 reduced 101 接口追踪,当Master上行链路出现故障的时候,优先值减少101,主(master) 变为备(Backup)
sys
sysname S1
#
vlan batch 10 20
#
stp disable
#
interface Ethernet0/0/1
port link-type trunk
port trunk allow-pass vlan 10 20
#
interface Ethernet0/0/2
port link-type trunk
port trunk allow-pass vlan 10 20
#
interface Ethernet0/0/3
port link-type access
port default vlan 10
S2配置
sys
sysname S2
#
vlan batch 10 20 24
#
stp disable
#
interface Vlanif10
ip address 192.168.10.252 255.255.255.0
vrrp vrid 10 virtual-ip 192.168.10.254
vrrp vrid 10 track interface GigabitEthernet0/0/2 reduced 101
d