Configuring Static BFD for SR-MPLS TE Tunnels
BFD can be used to monitor SR-MPLS TE tunnels. If the primary tunnel fails, BFD instructs applications such as VPN FRR to quickly switch traffic to a backup tunnel, minimizing the impact on services.
Pre-configuration Tasks
Before configuring static BFD for SR-MPLS TE tunnels, complete the following task:
Configure an SR-MPLS TE tunnel. For details, see Configuring an SR-MPLS TE Tunnel.
Enabling BFD Globally
Configuring BFD Parameters on the Ingress Node of the Tunnel
Context
The BFD parameters configured on the ingress node determine whether a BFD session is established. These parameters include the local and remote discriminators, local intervals at which BFD packets are sent and received, and BFD detection multiplier.
Perform the following steps on the ingress node of an SR-MPLS TE tunnel.
Procedure
- Run system-view
The system view is displayed.
- Run bfd session-name bind mpls-te interface tunnel interface-number [ one-arm-echo ]
A BFD session is configured to monitor an SR-MPLS TE tunnel.
By default, no BFD is configured to monitor an SR-MPLS TE tunnel.
If one-arm-echo is specified, a one-arm BFD echo session is established to monitor an SR-MPLS TE tunnel. This is required if a Huawei device is deployed at the ingress and a non-Huawei device is deployed at the egress, because they cannot communicate using BFD for SR-MPLS TE tunnels and therefore a BFD session cannot be established.
- Run discriminator local discr-value
The local discriminator is set.
By default, the local discriminator is not set.
- Run discriminator remote discr-value
The remote discriminator is set.
By default, the remote discriminator is not set.
You do not need to configure a remote discriminator for a one-arm BFD echo session.
- (Optional) Run min-tx-interval interval
The local interval at which BFD packets are sent is set.
By default, the value is 1000 milliseconds.
One-arm BFD echo sessions do not support this parameter.
- (Optional) Run min-rx-interval interval
The local interval at which BFD packets are received is set.
By default, the value is 1000 milliseconds.
For a one-arm BFD echo session, run the min-echo-rx-interval command to set the local interval at which BFD packets are received.
- (Optional) Run detect-multiplier multiplier
The local detection multiplier is adjusted.
By default, the local detection multiplier is 3.
Actual local sending interval = MAX { Configured local sending interval, Configured remote receiving interval }
Actual local receiving interval = MAX { Configured remote sending interval, Configured local receiving interval }
Actual local detection interval = Actual local receiving interval x Configured remote detection multiplier
For example:
The local sending and receiving intervals are set to 200 ms and 300 ms respectively and the detection multiplier is set to 4.
The remote sending and receiving intervals are set to 100 ms and 600 ms respectively and the detection multiplier is set to 5.
Then,
Actual local sending interval = MAX {200 ms, 600 ms} = 600 ms; Actual local receiving interval = MAX {100 ms, 300 ms} = 300 ms; Actual local detection interval is 300 ms x 5 = 1500 ms.
Actual remote sending interval = MAX {100 ms, 300 ms} = 300 ms; Actual remote receiving interval = MAX {200 ms, 600 ms} = 600 ms; Actual remote detection interval is 600 ms x 4 = 2400 ms.
- Run commit
The configuration is committed.
Configuring BFD Parameters on the Egress Node of the Tunnel
Context
The BFD parameters configured on the egress node determine whether a BFD session is established. These parameters include the local and remote discriminators, local intervals at which BFD packets are sent and received, and BFD detection multiplier.
Perform the following steps on the egress node of an SR-MPLS TE tunnel.
If a one-arm BFD echo session is established on the ingress node, this configuration is not required.
Procedure
- Run system-view
The system view is displayed.
- Configure a reverse tunnel to inform the ingress node of a fault if one occurs. The reverse tunnel can be an IP link or SR-MPLS TE tunnel. To ensure that the forward and reverse paths are over the same link, an SR-MPLS TE tunnel is preferentially selected to notify the ingress node of an LSP fault. Run the following commands as required.
For an IP link, run bfd session-name bind peer-ip ip-address [ vpn-instance vpn-name ] [ source-ip ip-address ]
For an SR-MPLS TE tunnel, run bfd session-name bind mpls-te interface tunnel interface-number
By default, BFD detection is disabled on the reverse tunnel.
- Run discriminator local discr-value
The local discriminator is set.
By default, the local discriminator is not set.
- Run discriminator remote discr-value
The remote discriminator is set.
By default, the remote discriminator is not set.
- (Optional) Run min-tx-interval interval
The local interval at which BFD packets are sent is set.
By default, the value is 1000 milliseconds.
- (Optional) Run min-rx-interval interval
The local interval at which BFD packets are received is set.
By default, the value is 1000 milliseconds.
- (Optional) Run detect-multiplier multiplier
The local detection multiplier is adjusted.
By default, the local detection multiplier is 3.
Actual local sending interval = MAX { Configured local sending interval, Configured remote receiving interval }
Actual local receiving interval = MAX { Configured remote sending interval, Configured local receiving interval }
Actual local detection interval = Actual local receiving interval x Configured remote detection multiplier
For example:
The local sending and receiving intervals are set to 200 ms and 300 ms respectively and the detection multiplier is set to 4.
The remote sending and receiving intervals are set to 100 ms and 600 ms respectively and the detection multiplier is set to 5.
Then,
Actual local sending interval = MAX {200 ms, 600 ms} = 600 ms; Actual local receiving interval = MAX {100 ms, 300 ms} = 300 ms; Actual local detection interval is 300 ms x 5 = 1500 ms.
Actual remote sending interval = MAX {100 ms, 300 ms} = 300 ms; Actual remote receiving interval = MAX {200 ms, 600 ms} = 600 ms; Actual remote detection interval is 600 ms x 4 = 2400 ms.
- Run commit
The configuration is committed.
Verifying the Configuration of Static BFD for SR-MPLS TE
Procedure
- Run the display bfd session mpls-te interface tunnel tunnel-name [ verbose ] command to check BFD session information on the tunnel ingress.
- Check BFD session information on the tunnel egress.
- To check information about all BFD sessions, run the display bfd session all [ for-lsp | for-te ] [ verbose ] command.
- To check information about static BFD sessions, run the display bfd session static [ for-lsp | for-te ] [ verbose ] command.
- Check BFD statistics.
- To check statistics about all BFD sessions, run the display bfd statistics session all [ for-lsp | for-te ] command.
- To check statistics about static BFD sessions, run the display bfd statistics session static [ for-lsp | for-te ] command.
- To check statistics about BFD for MPLS-TE sessions, run the display bfd statistics session mpls-te interface tunnel tunnel-number [ te-lsp ] command.