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.
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 ]
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.
NOTE:
A VRRP backup group can track Layer 2 and Layer 3 interfaces.
|
- |
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. |
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.
PrerequisitesThe vrrp vrid virtual-ip command has been executed on an interface to create a VRRP group.
PrecautionsAfter 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.
<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
<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