H3C Technologies H3C S3600 Series Switches User Manual
Page 586
1-12
[LSW-A-Vlan-interface2] vrrp vrid 1 priority 110
# Configure the preemptive mode for the VRRP group.
[LSW-A-Vlan-interface2] vrrp vrid 1 preempt-mode
By default, a VRRP group adopts the preemptive mode.
z
Configure Switch B.
# Configure VLAN 3.
[LSW-B] vlan 3
[LSW-B-vlan3] port Ethernet1/0/10
[LSW-B-vlan3] quit
[LSW-B] interface Vlan-interface 3
[LSW-B-Vlan-interface3] ip address 10.100.10.3 255.255.255.0
[LSW-B-Vlan-interface3] quit
# Configure VLAN 2.
[LSW-B] vlan 2
[LSW-B-Vlan2] port Ethernet 1/0/5
[LSW-B-vlan2] quit
[LSW-B] interface Vlan-interface 2
[LSW-B-Vlan-interface2] ip address 202.38.160.2 255.255.255.0
[LSW-B-Vlan-interface2] quit
# Enable a VRRP group to respond to ping operations destined for its virtual router IP address.
[LSW-B] vrrp ping-enable
# Create a VRRP group.
[LSW-B] interface vlan 2
[LSW-B-Vlan-interface2] vrrp vrid 1 virtual-ip 202.38.160.111
# Configure the preemptive mode for the VRRP group.
[LSW-B-Vlan-interface2] vrrp vrid 1 preempt-mode
The IP address of the default gateway of Host A is configured as 202.38.160.111.
Normally, Switch A functions as the gateway, but when Switch A is turned off or fails, Switch B will
function as the gateway instead.
Configure Switch A to operate in preemptive mode, so that it can resume its gateway function as the
master after recovery.