Configuring Static BFD for Static LSPs
Context
When configuring static BFD for static LSPs, pay attention to the following points:
A static BFD session can be created for non-host routes. When the static LSP becomes Down, the associated BFD session also becomes Down. When the static LSP goes Up, a BFD session is reestablished.
The forwarding modes on the forwarding path and reverse path can be different (for example, an IP packet is sent from the source to the destination through an LSP, and is sent from the destination to the source in IP forwarding mode), but the forwarding path and reverse path must be established over the same link. If they use different links, BFD cannot identify the faulty path when a fault is detected.
By configuring static BFD for static LSPs, you can check connectivity of static LSPs.
Pre-configuration Tasks
Before configuring static BFD for static LSP, create static LSPs. For details, see Creating Static LSPs.
Configuring BFD with Specific Parameters on the Ingress Node
Context
BFD parameters on the ingress node include the local and remote discriminators, minimum intervals for sending and receiving BFD packets, and local BFD detection multiplier. The BFD parameters affect BFD session setup.
You can adjust the local detection time according to the network situation. On an unstable link, if a small detection time is used, a BFD session may flap. You can increase the detection time of the BFD session.
Actual interval for the local device to send BFD packets = MAX {locally configured interval for sending BFD packets, remotely configured interval for receiving BFD packets}
Actual interval for the local device to receive BFD packets = MAX {remotely configured interval for sending BFD packets, locally configured interval for receiving BFD packets}
Local detection time = Actual interval for receiving BFD packets x Remotely configured BFD detection multiplier
Perform the following steps on the ingress node of the static LSP.
Procedure
- Run system-view
The system view is displayed.
- Run bfd
This node is enabled with the global BFD function. The global BFD view is displayed.
By default, global BFD is disabled.
- Run quit
Return to the system view.
- Run bfd cfg-name bind static-lsp lsp-name
The BFD session is bound to the static LSP.
- Set local and remote discriminators of a BFD session.
Run discriminator local discr-value
The local discriminator is configured.
Run discriminator remote discr-value
The remote discriminator is configured.
The local and remote discriminators of the two ends on a BFD session must be correctly associated. That is, the local discriminator of the local device and the remote discriminator of the remote device are the same, and the remote discriminator of the local device and the local discriminator of the remote device are the same. Otherwise, the BFD session cannot be correctly set up. In addition, the local and remote discriminators cannot be modified after being successfully configured.
- (Optional) Run min-tx-interval interval
The interval for sending BFD packets is set on the local device.
By default, the interval for sending BFD packets is 1000 ms.
- (Optional) Run min-rx-interval interval
The interval for receiving BFD packets is set on the local device.
By default, the interval for receiving BFD packets is 1000 ms.
- (Optional) Run detect-multiplier multiplier
The local BFD detection multiplier is set.
By default, the value is 3.
- Run process-pst
The changes of the BFD session status can be advertised to the upper-layer application.
By default, a static BFD session cannot report faults of the monitored service module to the system.
- Run commit
The configuration is committed.
Configuring BFD with Specific Parameters on the Egress Node
Context
BFD parameters on the egress node includes the local and remote discriminators, minimum intervals for sending and receiving BFD packets, and local BFD detection multiplier. The BFD parameters affect BFD session setup.
You can adjust the local detection time according to the network situation. On an unstable link, if a small detection time is used, a BFD session may flap. You can increase the detection time of the BFD session.
Actual interval for the local device to send BFD packets = MAX {locally configured interval for sending BFD packets, remotely configured interval for receiving BFD packets}
Actual interval for the local device to receive BFD packets = MAX {remotely configured interval for sending BFD packets, locally configured interval for receiving BFD packets}
Local detection time = Actual interval for receiving BFD packets x Remotely configured BFD detection multiplier
Perform the following steps on the egress node of the LSP.
Procedure
- Run system-view
The system view is displayed.
- Run bfd
This node is enabled with the global BFD function. The global BFD view is displayed.
By default, global BFD is disabled.
- Run quit
Return to the system view.
- The IP link, LSP, or TE tunnel can be used as the reverse tunnel to inform the egress node of a fault. To ensure that BFD packets are received and sent along the same path, an LSP or TE tunnel is preferentially used to inform the egress
node of an LSP fault. If the configured reverse tunnel requires BFD detection, configure a pair of BFD sessions for it. Run the following commands as required.
For the IP link, run:
bfd cfg-name bind peer-ip peer-ip [ vpn-instance vpn-instance-name ] [ interface interface-type interface-number ] [ source-ip source-ip ]
For the dynamic LSP, run:
bfd cfg-name bind ldp-lsp peer-ip ip-address nexthop ip-address [ interface interface-type interface-number ]
For the static LSP, run:
bfd cfg-name bind static-lsp lsp-name
For MPLS TE, run:
bfd cfg-name bind mpls-te interface tunnel interface-number [ te-lsp [ backup ] ]
- Set local and remote discriminators of a BFD session.
Run discriminator local discr-value
The local discriminator is configured.
Run discriminator remote discr-value
The remote discriminator is configured.
The local and remote discriminators of the two ends on a BFD session must be correctly associated. That is, the local discriminator of the local device and the remote discriminator of the remote device are the same, and the remote discriminator of the local device and the local discriminator of the remote device are the same. Otherwise, the BFD session cannot be correctly set up. In addition, the local and remote discriminators cannot be modified after being successfully configured.
- (Optional) Run min-tx-interval interval
The interval for sending BFD packets is set on the local device.
By default, the interval for sending BFD packets is 1000 ms.
- (Optional) Run min-rx-interval interval
The interval for receiving BFD packets is set on the local device.
By default, the interval for receiving BFD packets is 1000 ms.
- (Optional) Run detect-multiplier multiplier
The local BFD detection multiplier is set.
By default, the value is 3.
- (Optional) Run process-pst
The changes of the BFD session status can be advertised to the upper-layer application.
By default, a static BFD session cannot report faults of the monitored service module to the system.
If an LSP is used as a reverse tunnel to notify the ingress of a fault, you can run this command to allow the reverse tunnel to switch traffic if the BFD session goes Down. If a single-hop IP link is used as a reverse tunnel, this command can be configured. Because the process-pst command can be only configured for BFD single-link detection.
- Run commit
The configuration is committed.
Verifying the Configuration of Static BFD for Static LSPs
Procedure
- Run the display bfd configuration { all | static } [ for-lsp ] command to check the BFD configuration.
- Run the display bfd session { all | static } [ for-lsp ] command to check information about the BFD session.
- Run the display bfd statistics session { all | static } [ for-ip | for-lsp ] command to check statistics about BFD sessions.
- Run the display mpls static-lsp [ lsp-name ] [ { include | exclude } ip-address mask-length ] [ verbose ] command to check the status of the static LSP.