The vrrp vrid track bfd-session command enables a VRRP group to track a BFD session.
The undo vrrp vrid track bfd-session command disables a VRRP group from tracking a BFD session.
By default, a VRRP group does not track a BFD session.
vrrp vrid virtual-router-id track bfd-session bfd-session-id [ increased value-increased | reduced value-reduced ]
vrrp vrid virtual-router-id track bfd-session session-name bfd-configure-name [ increased value-increased | reduced value-reduced ]
vrrp vrid virtual-router-id track bfd-session bfd-session-id { peer | link }
vrrp vrid virtual-router-id track bfd-session session-name bfd-configure-name { peer | link }
undo vrrp vrid virtual-router-id track bfd-session [ bfd-session-id | session-name bfd-configure-name ]
Parameter | Description | Value |
---|---|---|
virtual-router-id |
Specifies the ID of a VRRP group. |
The value is an integer ranging from 1 to 255. |
bfd-session-id |
Specifies the local discriminator of a BFD session tracked by a VRRP group. |
The value is an integer ranging from 1 to 16384. |
increased value-increased |
Specifies the value by which the VRRP priority increases if the tracked BFD session goes Down. This parameter takes effect on both the master and backup devices in a VRRP group. |
The value is an integer ranging from 1 to 255. As 255 is the priority of an IP address owner, the largest priority can be set to 254. |
reduced value-reduced |
Specifies the value by which the VRRP priority decreases if the tracked BFD session goes Down. This parameter takes effect on both the master and backup devices in a VRRP group. |
The value is an integer ranging from 1 to 255. The smallest priority is 1. By default, the VRRP priority reduces by 10 if the tracked BFD session goes Down. |
session-name bfd-configure-name |
Specifies the name of the BFD session tracked by the VRRP group. |
The value is a string of 1 to 15 characters, spaces not supported. When quotation marks are used around the string, spaces are allowed in the string. |
peer |
Indicates that a tracked BFD session is a peer BFD session. |
- |
link |
Indicates that a tracked BFD session is a link BFD session. |
- |
100ge sub-interface view, 100GE interface view, 10GE sub-interface view, 10GE interface view, 200GE sub-interface view, 25GE sub-interface view, 25GE interface view, 400GE sub-interface view, 400GE interface view, 40GE sub-interface view, 40GE interface view, 50GE sub-interface view, 50GE interface view, Eth-Trunk sub-interface view, Eth-Trunk interface view, FlexE interface view, GE optical interface view, GE sub-interface view, GE interface view, GE electrical interface view, Global VE sub-interface view, Loopback interface view, VBDIF interface view, VE sub-interface view, VLANIF interface view
Usage Scenario
If a link between devices in a VRRP group fails, the VRRP group performs a master/backup switchover after a period of 3.5 times the interval at which VRRP packets are sent. Packet loss may occur during this period. BFD can rapidly monitor links and detect link faults, which helps prevent the preceding problem. The vrrp vrid track bfd-session command is used to configure a VRRP group to track BFD sessions. If the tracked BFD session status changes, the BFD module notifies the VRRP module of the change. After receiving the notification, the VRRP module adjusts the priorities of VRRP devices or directly changes VRRP status to rapidly implement a master/backup VRRP switchover.
Prerequisites
Before using this command, perform the following operations:
Configuration Impact
When configuring a VRRP group to track a link BFD session, use either of the following parameters as needed:
Precautions
If a VRRP device is an IP address owner, the association between the VRRP group and BFD does not take effect.
The increased value-increased or reduced value-reduced parameter in the vrrp vrid track bfd-session command affects the change in device status in a VRRP group. The increased or reduced value must ensure that changes in VRRP priorities can trigger a master/backup switchover. For example, the priorities of the master and backup devices in a VRRP group are 120 and 110 (displayed using the display vrrp command), respectively. If the increased 20 parameter is configured on the backup device, the priority of the backup device becomes 130, a value greater than the priority of the master device. As a result, a master/backup switchover is triggered. The VRRP considers that the BFD session detects a Down event in the following situations:<HUAWEI> system-view [~HUAWEI] bfd [*HUAWEI-bfd] quit [*HUAWEI] interface GigabitEthernet 0/1/5 [*HUAWEI-GigabitEthernet0/1/5] ip address 10.1.20.1 24 [*HUAWEI-GigabitEthernet0/1/5] quit [*HUAWEI] bfd peer1 bind peer-ip 10.1.20.2 interface GigabitEthernet0/1/5 source-ip 10.1.20.1 auto [*HUAWEI-session-peer1] quit [*HUAWEI] interface GigabitEthernet 0/1/6 [*HUAWEI-GigabitEthernet0/1/6] vrrp vrid 3 virtual-ip 10.1.20.11 [*HUAWEI-GigabitEthernet0/1/6] vrrp vrid 3 track bfd-session session-name peer1 peer
<HUAWEI> system-view [~HUAWEI] bfd [*HUAWEI-bfd] quit [*HUAWEI] interface GigabitEthernet 0/1/3 [*HUAWEI-GigabitEthernet0/1/3] ip address 10.1.10.1 24 [*HUAWEI-GigabitEthernet0/1/3] quit [*HUAWEI] bfd atob bind peer-ip 10.1.10.2 interface GigabitEthernet0/1/3 source-ip 10.1.10.1 auto [*HUAWEI-session-atob] quit [*HUAWEI] interface GigabitEthernet 0/1/4 [*HUAWEI-GigabitEthernet0/1/4] vrrp vrid 2 virtual-ip 10.1.10.11 [*HUAWEI-GigabitEthernet0/1/4] vrrp vrid 2 track bfd-session session-name atob reduced 20
<HUAWEI> system-view [~HUAWEI] bfd [*HUAWEI-bfd] quit [*HUAWEI] interface GigabitEthernet 0/1/2 [*HUAWEI-GigabitEthernet0/1/2] ip address 10.1.10.1 24 [*HUAWEI-GigabitEthernet0/1/2] quit [*HUAWEI] bfd test bind peer-ip 10.1.1.1 interface GigabitEthernet 0/1/2 [*HUAWEI-session-test] discriminator local 1 [*HUAWEI-session-test] quit [*HUAWEI] interface GigabitEthernet 0/1/1 [*HUAWEI-GigabitEthernet0/1/1] vrrp vrid 1 virtual-ip 10.1.1.11 [*HUAWEI-GigabitEthernet0/1/1] vrrp vrid 1 track bfd-session 1 reduced 20