交换机1:
[HW-SW1]interface Vlanif 8 //配置vlan8
[HW-SW1-Vlanif8]vrrp vrid 8 virtual-ip 10.1.10.14 //配置虚拟路由vrid8,虚拟地址为10.1.10.14
[HW-SW1-Vlanif8]int vlan 9 //配置vlan9
[HW-SW1-Vlanif9]vrrp vrid 9 virtual-ip 10.1.10.30 //配置虚拟路由vrid8,虚拟地址为10.1.10.30
[HW-SW1-Vlanif8]int vlan 10 //配置vlan10
[HW-SW1-Vlanif10]vrrp vrid 10 virtual-ip 10.1.10.46 //配置虚拟路由vrid8,虚拟地址为10.1.10.46
交换机2:
[HW-SW2]interface Vlanif 8 //配置vlan8
[HW-SW2-Vlanif8]vrrp vrid 8 virtual-ip 10.1.10.14 //配置虚拟路由vrid8,虚拟地址为10.1.10.14
[HW-SW2-Vlanif8]int vlan 9 //配置vlan9
[HW-SW2-Vlanif9]vrrp vrid 9 virtual-ip 10.1.10.30 //配置虚拟路由vrid8,虚拟地址为10.1.10.30
[HW-SW2-Vlanif9]vrrp vrid 9 priority 110 //配置虚拟路由vrid9,优先级为110(优先级1-254,数值越大优先级越高,如果配置端口IP优先级为255)
[HW-SW2-Vlanif8]int vlan 10 //配置vlan10
[HW-SW2-Vlanif10]vrrp vrid 10 virtual-ip 10.1.10.46 //配置虚拟路由vrid8,虚拟地址为10.1.10.46
验证: