
149
[SwitchA-vlan2] port gigabitethernet 1/0/5
[SwitchA-vlan2] quit
# Configure VRRP to work in load balancing mode.
[SwitchA] vrrp mode load-balance
# Create VRRP group 1 and configure its virtual IP address as 10.1.1.1.
[SwitchA] interface vlan-interface 2
[SwitchA-Vlan-interface2] ip address 10.1.1.2 24
[SwitchA-Vlan-interface2] vrrp vrid 1 virtual-ip 10.1.1.1
# Set the priority of Switch A in VRRP group 1 to 120, which is higher than that of Switch B and that of
Switch C, so that Switch A can become the master.
[SwitchA-Vlan-interface2] vrrp vrid 1 priority 120
# Configure Switch A to work in preemptive mode, so that it can become the master whenever it works
normally; configure the preemption delay as five seconds to avoid frequent status switchover.
[SwitchA-Vlan-interface2] vrrp vrid 1 preempt-mode timer delay 5
[SwitchA-Vlan-interface2] quit
# Create track entry 1 to associate with the physical status of VLAN-interface 3 on Switch A. When the
track entry becomes negative, it means that the interface fails.
[SwitchA] track 1 interface vlan-interface 3
# Configure the VFs to monitor track entry 1, making the weight of Switch A decrease by more than
245—250 in this example—when track entry 1 turns to negative. In such a case, another router with a
higher weight can take over.
[SwitchA] interface vlan-interface 2
[SwitchA-Vlan-interface2] vrrp vrid 1 weight track 1 reduced 250
2.
Configure Switch B
# Configure VLAN 2.
<SwitchB> system-view
[SwitchB] vlan 2
[SwitchB-vlan2] port gigabitethernet 1/0/5
[SwitchB-vlan2] quit
# Configure VRRP to work in load balancing mode.
[SwitchB] vrrp mode load-balance
# Create VRRP group 1 and configure its virtual IP address as 10.1.1.1.
[SwitchB] interface vlan-interface 2
[SwitchB-Vlan-interface2] ip address 10.1.1.3 24
[SwitchB-Vlan-interface2] vrrp vrid 1 virtual-ip 10.1.1.1
# Set the priority of Switch B in VRRP group 1 to 110, which is higher than that of Switch C, so that Switch
B can become the master when Switch A fails.
[SwitchB-Vlan-interface2] vrrp vrid 1 priority 110
# Set Switch B to work in preemptive mode. The preemption delay is five seconds.
[SwitchB-Vlan-interface2] vrrp vrid 1 preempt-mode timer delay 5
[SwitchB-Vlan-interface2] quit
# Create track entry 1 to associate with the physical status of VLAN-interface 3 on Switch B. When the
track entry becomes negative, it means that the interface fails.
[SwitchB] track 1 interface vlan-interface 3