vrrp vrid preempt-mode

Use vrrp vrid preempt-mode to enable the preemptive mode for the device in an IPv4 VRRP group and configure the preemption delay.

Use undo vrrp vrid preempt-mode to disable the preemptive mode for the device in an IPv4 VRRP group.

Use undo vrrp vrid preempt-mode delay to restore the default preemption delay.

Syntax

vrrp vrid virtual-router-id preempt-mode [ delay delay-value ]

undo vrrp vrid virtual-router-id preempt-mode [ delay ]

Default

The device operates in preemptive mode and the preemption delay is 0 centiseconds.

Views

Interface view

Predefined user roles

network-admin

Parameters

virtual-router-id: Specifies an IPv4 VRRP group by its virtual router ID in the range of 1 to 255.

delay delay-value: Specifies a preemption delay time in the range of 0 to 180000 in centiseconds. The default setting is 0 centiseconds.

Usage guidelines

In non-preemptive mode, when a device in the IPv4 VRRP group becomes the master, it acts as the master as long as it operates correctly, even if a backup is assigned a higher priority later. The non-preemptive mode helps avoid frequent switchover between the master and backups.

In preemptive mode, a backup takes over as the master and sends VRRP advertisements when it detects that it has a higher priority than the master. The previous master then becomes a backup. This mechanism makes sure the master is always the device with the highest priority.

To avoid frequent state changes among members in a VRRP group and to provide the backups enough time to collect information (such as routing information), a backup does not immediately become the master after it receives an advertisement with lower priority than the local priority. Instead, it waits for a period of time before taking over as the master.

Examples

# Enable the preemptive mode for VLAN-interface 2, and set the preemption delay time to 500 centiseconds.

<Sysname> system-view
[Sysname] interface vlan-interface 2
[Sysname-Vlan-interface2] vrrp vrid 1 preempt-mode delay 500

Related commands

display vrrp