配置核心交换机SVI
[HX_SW1]int vlanif 2
[HX_SW1-Vlanif2]ip add 192.168.2.253 24
[HX_SW1-Vlanif2]int vlanif 3
[HX_SW1-Vlanif3]ip add 192.168.3.253 24
[HX_SW1-Vlanif3]int vlanif 4
[HX_SW1-Vlanif4]ip add 192.168.4.253 24
[HX_SW1-Vlanif4]int vlanif 5
[HX_SW1-Vlanif5]ip add 192.168.5.253 24
[HX_SW1-Vlanif5]int vlanif 6
[HX_SW1-Vlanif6]ip add 192.168.6.253 24
[HX_SW1-Vlanif6]int vlanif 200
[HX_SW1-Vlanif200]ip add 192.168.200.253 24
[HX_SW1-Vlanif200]int vlanif 800
[HX_SW1-Vlanif800]ip add 192.168.8.2 24
-------------------
[HX_SW2]int vlanif 2
[HX_SW2-Vlanif2]ip add 192.168.2.254 24
[HX_SW2-Vlanif2]int vlanif 3
[HX_SW2-Vlanif3]ip add 192.168.3.254 24
[HX_SW2-Vlanif3]int vlanif 4
[HX_SW2-Vlanif4]ip add 192.168.4.254 24
[HX_SW2-Vlanif4]int vlanif 5
[HX_SW2-Vlanif5]ip add 192.168.5.254 24
[HX_SW2-Vlanif5]int vlanif 6
[HX_SW2-Vlanif6]ip add 192.168.6.254 24
[HX_SW2-Vlanif6]int vlanif 200
[HX_SW2-Vlanif200]ip add 192.168.200.254 24
[HX_SW2-Vlanif200]int vlanif 801
[HX_SW2-Vlanif801]ip add 192.168.8.254 24
配置 virtual-ip 地址
[HX_SW1]int vlanif 2
[HX_SW1-Vlanif2]vrrp vrid 2 virtual-ip 192.168.2.1
[HX_SW1-Vlanif2]vrrp vrid 2 priority 105
[HX_SW1-Vlanif2]int vlanif 3
[HX_SW1-Vlanif3]vrrp vrid 3 virtual-ip 192.168.3.1
[HX_SW1-Vlanif3]vrrp vrid 3 priority 105
[HX_SW1-Vlanif3]int vlanif 200
[HX_SW1-Vlanif200]vrrp vrid 200 virtual-ip 192.168.200.1
[HX_SW1-Vlanif200]vrrp vrid 200 priority 105
------------------
[HX_SW1-Vlanif200]int vlanif 4
[HX_SW1-Vlanif4]vrrp vrid 4 virtual-ip 192.168.4.1
[HX_SW1-Vlanif4]int vlanif 5
[HX_SW1-Vlanif5]vrrp vrid 5 virtual-ip 192.168.5.1
[HX_SW1-Vlanif5]int vlanif 6
[HX_SW1-Vlanif6]vrrp vrid 6 virtual-ip 192.168.6.1
-----------------
[HX_SW2]int vlanif 2
[HX_SW2-Vlanif2]vrrp vrid 2 virtual-ip 192.168.2.1
[HX_SW2-Vlanif2]int vlanif 3
[HX_SW2-Vlanif3]vrrp vrid 3 virtual-ip 192.168.3.1
[HX_SW2-Vlanif3]int vlanif 200
[HX_SW2-Vlanif200]vrrp vrid 200 virtual-ip 192.168.200.1
[HX_SW2-Vlanif200]int vlanif 4
[HX_SW2-Vlanif4]vrrp vrid 4 virtual-ip 192.168.4.1
[HX_SW2-Vlanif4]vrrp vrid 4 priority 105
[HX_SW2-Vlanif4]int vlanif 5
[HX_SW2-Vlanif5]vrrp vrid 5 virtual-ip 192.168.5.1
[HX_SW2-Vlanif5]vrrp vrid 5 priority 105
[HX_SW2-Vlanif5]int vlanif 6
[HX_SW2-Vlanif6]vrrp vrid 6 virtual-ip 192.168.6.1
[HX_SW2-Vlanif6]vrrp vrid 6 priority 105
配置结果核对
[HX_SW1]display vrrp brief
VRID State Interface Type Virtual IP
----------------------------------------------------------------
2 Master Vlanif2 Normal 192.168.2.1
3 Master Vlanif3 Normal 192.168.3.1
4 Backup Vlanif4 Normal 192.168.4.1
5 Backup Vlanif5 Normal 192.168.5.1
6 Backup Vlanif6 Normal 192.168.6.1
200 Master Vlanif200 Normal 192.168.200.1
----------------------------------------------------------------
Total:6 Master:3 Backup:3 Non-active:0
[HX_SW1]
-------------
[HX_SW2]display vrrp brief
VRID State Interface Type Virtual IP
----------------------------------------------------------------
2 Backup Vlanif2 Normal 192.168.2.1
3 Backup Vlanif3 Normal 192.168.3.1
4 Master Vlanif4 Normal 192.168.4.1
5 Master Vlanif5 Normal 192.168.5.1
6 Master Vlanif6 Normal 192.168.6.1
200 Backup Vlanif200 Normal 192.168.200.1
----------------------------------------------------------------
Total:6 Master:3 Backup:3 Non-active:0