The vrrp vrid preempt-mode timer delay command sets the preemption delay for the device in a VRRP group.
The undo vrrp vrid preempt-mode timer delay command restores the default preemption delay for the device in a VRRP group.
By default, the preemption delay is 0 seconds.
vrrp vrid virtual-router-id preempt-mode timer delay delay-value
undo vrrp vrid virtual-router-id preempt-mode timer delay
Parameter | Description | Value |
---|---|---|
vrid virtual-router-id | Specifies the VRID of a VRRP group. | The value is an integer that ranges from 1 to 255. |
delay delay-value | Specifies the preemption delay. | The value is an integer that ranges from 0 to 3600, in seconds. The default value is 0. |
If the backup in a VRRP group does not receive VRRP Advertisement packets from the master within a specified period of time, the backup becomes the master. On an unstable network, even if the master is working properly, the backup may not receive packets from the master because of network congestion. In this case, the VRRP group status will flap and traffic is lost. To prevent frequent switching of the VRRP group status, run the vrrp vrid preempt-mode timer delay command to set the preemption delay so that the backup becomes the master only after the delay expires.
PrecautionsYou are advised to set the preemption delay of the backup in a VRRP group to 0, configure the master in preemption mode, and set the preemption delay to be longer than 15s. These settings allow a period of time for status synchronization between the uplink and downlink on devices in a VRRP group on an unstable network. If the preceding settings are not used, two masters coexist and user devices may learn an incorrect master address. As a result, traffic is interrupted.
<HUAWEI> system-view [HUAWEI] interface vlanif 100 [HUAWEI-Vlanif100] vrrp vrid 1 preempt-mode timer delay 5
<HUAWEI> system-view [HUAWEI] interface gigabitethernet 0/0/1 [HUAWEI-GigabitEthernet0/0/1] undo portswitch [HUAWEI-GigabitEthernet0/0/1] vrrp vrid 1 preempt-mode timer delay 5