150
# Configure the VFs to monitor track entry 1, making the weight of Switch B 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.
[SwitchB] interface vlan-interface 2
[SwitchB-Vlan-interface2] vrrp vrid 1 weight track 1 reduced 250
3.
Configure Switch C
# Configure VLAN 2.
<SwitchC> system-view
[SwitchC] vlan 2
[SwitchC-vlan2] port gigabitethernet 1/0/5
[SwitchC-vlan2] quit
# Configure VRRP to work in load balancing mode.
[SwitchC] vrrp mode load-balance
# Create VRRP group 1 and configure its virtual IP address as 10.1.1.1.
[SwitchC] interface vlan-interface 2
[SwitchC-Vlan-interface2] ip address 10.1.1.4 24
[SwitchC-Vlan-interface2] vrrp vrid 1 virtual-ip 10.1.1.1
# Set Switch C to work in preemptive mode. The preemption delay is five seconds.
[SwitchC-Vlan-interface2] vrrp vrid 1 preempt-mode timer delay 5
[SwitchC-Vlan-interface2] quit
# Create track entry 1 to associate with the physical status of VLAN-interface 3 on Switch C. When the
track entry becomes negative, it means that the interface fails.
[SwitchC] track 1 interface vlan-interface 3
# Configure the VFs to monitor track entry 1, making the weight of Switch C 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.
[SwitchC] interface vlan-interface 2
[SwitchC-Vlan-interface2] vrrp vrid 1 weight track 1 reduced 250
4.
Verify the configuration
After the configuration, Host A can ping the external network. To verify your configuration, use the
display vrrp verbose
command.
# Display the detailed information of VRRP group 1 on Switch A.
[SwitchA-Vlan-interface2] display vrrp verbose
IPv4 Standby Information:
Run Mode : Load Balance
Run Method : Virtual MAC
Total number of virtual routers : 1
Interface Vlan-interface2
VRID : 1 Adver Timer : 1
Admin Status : Up State : Master
Config Pri : 120 Running Pri : 120
Preempt Mode : Yes Delay Time : 5
Auth Type : None
Virtual IP : 10.1.1.1
Member IP List : 10.1.1.2 (Local, Master)