vrrp vrid track

Use vrrp vrid track to associate a VRRP group with a track entry and control master switchover in the VRRP group in response to changes (such as uplink state changes) detected by the track entry.

Use undo vrrp vrid track to remove the association between a VRRP group and a track entry. If no track entry is specified, the association between the VRRP group and any track entry is removed.

Syntax

vrrp vrid virtual-router-id track track-entry-number [ reduced priority-reduced | switchover ]

undo vrrp vrid virtual-router-id track [ track-entry-number ]

Default

A VRRP group is not associated with any track entry.

Views

Interface view

Predefined user roles

network-admin

mdc-admin

Parameters

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

track-entry-number: Specifies a track entry. The track-entry-number argument is in the range of 1 to 1024.

reduced priority-reduced: Reduces the priority of the router in the VRRP group by a specific value when the state of the specified track entry changes to negative. The priority-reduced argument is in the range of 1 to 255.

switchover: Enables the router in backup state to take over as the master immediately after the specified track entry changes to the negative state.

Usage guidelines

When the associated track entry changes to the negative state, the priority of the router in the VRRP group decreases by a specified value, or the router immediately takes over as the master if it is a backup, depending on your configuration.

If neither reduced priority-reduced nor switchover is specified, the priority of the router in the VRRP group decreases by 10 when the track entry changes to negative.

When the track entry changes from Negative to Positive or NotReady, the router automatically restores its priority.


[IMPORTANT: ]

IMPORTANT:

  • The vrrp vrid track command cannot take effect on an IP address owner. If you have configured the command on an IP address owner, the configuration takes effect after the router changes to be a non IP address owner.

  • You can create a track entry with the track command before or after you associate it with a VRRP group. For more information about configuring track entries, see High Availability Configuration Guide.


  • Examples

    # Associate VRRP group 1 on VLAN-interface 2 with track entry 1 and decrease the priority of the router in the VRRP group by 50 when the state of track entry 1 changes to negative.

    <Sysname> system-view
    [Sysname] interface vlan-interface 2
    [Sysname-Vlan-interface2] vrrp vrid 1 track 1 reduced 50
    

    Related commands

    display vrrp