The vrrp vrid track nqa command associates a VRRP group with an NQA test instance to implement a rapid active/standby switchover.
The undo vrrp vrid track nqa command disassociates a VRRP group from an NQA test instance.
By default, a VRRP group is not associated with an NQA test instance.
vrrp vrid virtual-router-id track nqa admin-name test-name [ reduced value-reduced ]
undo vrrp vrid virtual-router-id track nqa [ admin-name test-name ]
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. |
admin-name | Specifies the administrator name of an NQA test instance. | The value is a string of 1 to 32 case-sensitive characters without spaces. When double quotation marks are used around the string, spaces are allowed in the string. |
test-name | Specifies the name of an NQA test instance. | The value is a string of 1 to 32 case-sensitive characters without spaces. When double quotation marks are used around the string, spaces are allowed in the string. |
reduced value-reduced | Specifies the value by which the master's priority reduces if the NQA test instance detects that the uplink is unavailable. | The value is an integer that ranges from 1 to 255. The priority can decrease to 1. By default, the master's priority value decreases by 10 if the associated NQA test instance detects that the uplink is unavailable. |
Usage Scenario
To improve device reliability, two user gateways are configured to work in master/backup mode, and VRRP is enabled on these gateways to determine their Master and Backup states. Although a VRRP group has been configured, the uplink may be unreachable and access devices may not detect the faulty uplink. Consequently, data traffic is lost.
You can associate a VRRP group with an NQA test instance to solve this problem. The NQA test instance periodically sends ICMP packets to detect whether the destination IP address of the uplink is reachable. When the destination IP address is unreachable, the NQA test instance reports the fault to the associated VRRP group and instructs the VRRP group to adjust the priority, implementing an active/standby switchover. When the status of the monitored NQA test instance recovers, the original priority of the master in the VRRP group is restored.
Prerequisites
An NQA test instance of ICMP has been configured.
Precautions
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 non-0 on the master.
The VRRP group to be associated with a route cannot contain an IP address owner.
The VRRP group can only be associated with an NQA test instance of ICMP.
A VRRP group can monitor a maximum of eight NQA test instances.
# Associate a VRRP group with NQA test instance user user1 on VLANIF100 and set reduced value-reduced to 20 when the destination IP address is unreachable.
<HUAWEI> system-view [HUAWEI] nqa test-instance user user1 [HUAWEI-nqa-user-user1] test-type icmp [HUAWEI-nqa-user-user1] destination-address ipv4 10.1.1.1 [HUAWEI-nqa-user-user1] frequency 10 [HUAWEI-nqa-user-user1] probe-count 2 [HUAWEI-nqa-user-user1] start now [HUAWEI-nqa-user-user1] quit [HUAWEI] interface vlanif 100 [HUAWEI-Vlanif100] vrrp vrid 1 virtual-ip 10.2.1.12 [HUAWEI-Vlanif100] vrrp vrid 1 track nqa user user1 reduced 20