27
# Configure VRRP to operate in load balancing mode.
<RouterB> system-view
[RouterB] vrrp mode load-balance
# Create VRRP group 1, and set its virtual IP address to 10.1.1.1.
[RouterB] interface gigabitethernet 1/0
[RouterB-GigabitEthernet1/0] ip address 10.1.1.3 24
[RouterB-GigabitEthernet1/0] vrrp vrid 1 virtual-ip 10.1.1.1
# Assign Router B a higher priority than Router C in VRRP group 1, so Router B can become the
master when Router A fails.
[RouterB-GigabitEthernet1/0] vrrp vrid 1 priority 110
# Configure Router B to operate in preemptive mode, and set the preemption delay to 5 seconds.
[RouterB-GigabitEthernet1/0] vrrp vrid 1 preempt-mode delay 5
[RouterB-GigabitEthernet1/0] quit
# Create track entry 1 to monitor the upstream link status of GigabitEthernet 2/0. When the
upstream link fails, the track entry transits to Negative.
[RouterB] track 1 interface ethernet 1/2
# Configure the VFs in VRRP group 1 to monitor track entry 1, and decrease their weights by 250
when the track entry transits to Negative.
[RouterB] interface gigabitethernet 1/0
[RouterB-GigabitEthernet1/0] vrrp vrid 1 weight track 1 reduced 250
3. Configure Router C:
# Configure VRRP to operate in load balancing mode.
<RouterC> system-view
[RouterC] vrrp mode load-balance
# Create VRRP group 1, and set its virtual IP address as 10.1.1.1.
[RouterC] interface gigabitethernet 1/0
[RouterC-GigabitEthernet1/0] ip address 10.1.1.4 24
[RouterC-GigabitEthernet1/0] vrrp vrid 1 virtual-ip 10.1.1.1
# Configure Router C to operate in preemptive mode, and set the preemption delay to 5 seconds.
[RouterC-GigabitEthernet1/0] vrrp vrid 1 preempt-mode delay 5
[RouterC-GigabitEthernet1/0] quit
# Create track entry 1 to monitor the upstream link status of GigabitEthernet 2/0. When the
upstream link fails, the track entry transits to Negative.
[RouterC] track 1 interface ethernet 1/2
# Configure the VFs in VRRP group 1 to monitor track entry 1, and decrease their weights by 250
when the track entry transits to Negative.
[RouterC] interface gigabitethernet 1/0
[RouterC-GigabitEthernet1/0] vrrp vrid 1 weight track 1 reduced 250
4. Verify the configuration:
# Verify that Host A can ping the external network. (Details not shown.)
# Display detailed information about VRRP group 1 on Router A.
[RouterA-GigabitEthernet1/0] display vrrp verbose
IPv4 Virtual Router Information:
Running Mode : Load Balance
Total number of virtual routers : 1
Interface GigabitEthernet1/0