多 VLAN 网关负载均衡vrrp配置
5.1 问题
Vlan 10 的主网关在 SW1,优先级为 200
Vlan 10 的备份网关在 SW2 ,优先级为 100
Vlan 20 的主网关在 SW2 ,优先级为 200
Vlan 20 的备份网关在 SW1 ,优先级为 100
Vlan 10 的虚拟IP地址为:192.168.10.254
Vlan 20 的虚拟IP 地址为:192.168.20.254
5.2 方案
搭建实验环境,如图-5所示。
图-5
5.3 步骤
实现此案例需要按照如下步骤进行。
配置终端设备 PC1
PC-1 IP 地址:
192.168.10.1
255.255.255.0
192.168.10.254 // 后期通过 VRRP 形成的 虚拟网关IP
PC-2 IP 地址:
192.168.20.1
255.255.255.0
192.168.20.254 // 后期通过 VRRP 形成的 虚拟网关IP
PC-3 IP 地址:
192.168.2.2
255.255.255.0
192.168.2.1
配置 SW3
[s3]vlan batch 10 20
Info: This operation may take a few seconds. Please wait for a moment...done.
[s3]int e0/0/1
[s3-Ethernet0/0/1]port link-type access
[s3-Ethernet0/0/1]port default vlan 10
[s3-Ethernet0/0/1]int e0/0/2
[s3-Ethernet0/0/2]port link-type access
[s3-Ethernet0/0/2]port default vlan 20
[s3-Ethernet0/0/2]int e0/0/3
[s3-Ethernet0/0/3]port link-type trunk
[s3-Ethernet0/0/3]port trunk allow-pass vlan all
[s3-Ethernet0/0/3]int e0/0/4
[s3-Ethernet0/0/4]port link-type trunk
[s3-Ethernet0/0/4]port trunk allow-pass vlan all
配置SW1
[s1]vlan batch 10 20
Info: This operation may take a few seconds. Please wait for a moment...done.
[s1]int vlan 10
[s1-Vlanif10