< Home

vrrp vrid preempt-mode timer delay

Function

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.

Format

vrrp vrid virtual-router-id preempt-mode timer delay delay-value

undo vrrp vrid virtual-router-id preempt-mode timer delay

Parameters

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.

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

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.

Precautions

You 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.

  • The preemption delay refers to the delay before the backup switches to the master. Therefore, the IP address owner is irrelevant to the preemption delay. After the IP address owner recovers, it becomes the master immediately, without any delay.
  • On a stable network, a short preemption delay is recommended. When the master is faulty, the backup with the highest priority can rapidly switch to the master. This prevents traffic loss. On an unstable network, a long preemption delay is recommended. This prevents traffic loss caused by frequent switching of the VRRP group status.

Example

# Set the preemption delay of VRRP group 1 to 5 seconds on the VLANIF interface.
<HUAWEI> system-view
[HUAWEI] interface vlanif 100
[HUAWEI-Vlanif100] vrrp vrid 1 preempt-mode timer delay 5
# Set the preemption delay of VRRP group 1 to 5 seconds on the Ethernet interface.
<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
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >