< Home

vrrp vrid track interface

Function

The vrrp vrid track interface command associates a VRRP group with an interface.

The undo vrrp vrid track interface command disassociates a VRRP group from an interface.

By default, a VRRP group is not associated with an interface.

Format

vrrp vrid virtual-router-id track interface interface-type interface-number [ increased value-increased | reduced value-reduced ]

undo vrrp vrid virtual-router-id track interface [ interface-type interface-number ]

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.

interface interface-type interface-number Specifies the type and number of an interface monitored by a VRRP group.
  • interface-type specifies the interface type.
  • interface-number specifies the interface number.
NOTE:
A VRRP backup group can track Layer 2 and Layer 3 interfaces.
  • If the tracked interface is a Layer 2 interface, the VRRP backup group tracks the physical status of the Layer 2 interface and changes its own priority based on the tracked physical status.
  • If the tracked interface is a Layer 3 interface, the VRRP backup group tracks the protocol status of the Layer 3 interface and changes its own priority based on the tracked protocol status.

-

increased value-increased Specifies the value by which the priority increases when the monitored interface becomes Down.

The value is an integer that ranges from 1 to 255. The maximum priority value is 254.

reduced value-reduced Specifies the value by which the priority decreases when the monitored interface becomes Down.

The value is an integer that ranges from 1 to 255. The priority can decrease to 1. By default, when the monitored interface goes Down, the VRRP priority of the device decreases by 10.

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

VRRP can only detect the status change of the interface on which a VRRP group is configured. VRRP cannot detect faults on the uplink interface, causing service interruption. You can run the vrrp vrid track interface command to associate a VRRP group with a device interface not in the VRRP group. When the monitored interface becomes Down, the priority of the device is adjusted and an active/standby switchover is triggered. Therefore, services can be forwarded correctly. When the status of the monitored interface recovers, the original priority of the device in the VRRP group is restored.

Prerequisites

The vrrp vrid virtual-ip command has been executed on an interface to create a VRRP group.

Precautions

After a VRRP group is associated with an interface, set increased value-increased or reduced value-reduced to an appropriate value. This setting ensures that an active/standby switchover is performed immediately when the monitored interface becomes Down.

  • The master and backup in the VRRP group must work in preemption mode. It is recommended that the preemption delay be 0 on the backup and larger than 0 on the master.

  • If the device is the IP address owner (the virtual router IP address is used as the actual interface address), you cannot associate a VRRP group with an interface.

  • Multiple VRRP groups can monitor an interface, and a VRRP group can monitor a maximum of 8 interfaces simultaneously.

Example

# Associate VRRP group 1 with VLANIF 10 and set reduced value-reduced to 50 when VLANIF 10 becomes Down.
<HUAWEI> system-view
[HUAWEI] interface vlanif 20
[HUAWEI-Vlanif20] vrrp vrid 1 virtual-ip 10.1.1.1
[HUAWEI-Vlanif20] vrrp vrid 1 track interface vlanif 10 reduced 50
# Associate VRRP group 1 with GE0/0/2 and set reduced value-reduced to 50 when GE0/0/2 becomes Down.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] undo portswitch
[HUAWEI-GigabitEthernet0/0/1] vrrp vrid 1 virtual-ip 10.1.1.1
[HUAWEI-GigabitEthernet0/0/1] vrrp vrid 1 track interface gigabitethernet0/0/2 reduced 50
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >