Configuring a Static BFD Session with Automatically Negotiated Discriminators
You can configure a static BFD session with automatically negotiated discriminators on a local device to enable the local device to interwork with the device on which a BFD session is dynamically set up. The static BFD session with automatically negotiated discriminators is used to monitor static routes.
Usage Scenario
If a dynamic BFD session is set up on the remote device, you must configure a static BFD session with automatically negotiated discriminators on the local device to interwork with the remote device and to allow static routes to track BFD.
Pre-configuration Tasks
Before configuring a static BFD session with automatically negotiated discriminators, complete the following tasks:
Connect interfaces.
Assign an IP address to each Layer 3 interface.
- Enabling BFD Globally
- Establishing a BFD Session
- (Optional) Configuring BFD Packets to Be Transparently Transmitted on an Interface
- (Optional) Changing the BFD Detection Time
- (Optional) Setting the BFD WTR Time
- (Optional) Configuring a Description for a BFD Session
- (Optional) Configuring a Priority for a BFD Session
- Verifying the Configuration of a Static BFD Session with Automatically Negotiated Discriminators
Establishing a BFD Session
You can establish a static BFD session with automatically negotiated discriminators on both ends of a link to allow a device to rapidly detect faults in a link.
Procedure
- Run system-view
The system view is displayed.
- According to whether BFD detects an IPv4 or IPv6 link, perform either of the following operations:
Run bfd sessname-value bind peer-ip ip-address [ vpn-instance vpn-name ] [ interface interface-type interface-number | select-board slot-id1 [ slot-id2 ] ] source-ip ip-address auto
A static BFD session for IPv4 with automatically negotiated discriminators is set up.
- A source address must be configured.
- The IP address must be an explicit IPv4 address but not a multicast one.
- If both slot-id1 and slot-id2 are configured in select-board slot-id1 [ slot-id2 ], only one board is selected, and slot-id1 is preferred. If slot-id1 fails to be selected, slot-id2 is selected. If both boards fail to be selected, board selection stops.
- Run either of the following commands to create a static BFD for IPv6 session with an automatically negotiated discriminator:
bfd session-name bind peer-ipv6 peer-ipv6 [ vpn-instance vpn-name ] [ interface interface-type interface-number ] [ source-ipv6 source-ipv6 ] auto
bfd session-name bind peer-ipv6 peer-ipv6 [ vpn-instance vpn-name ] [ source-ipv6 source-ipv6 ] [ select-board slot-id1 [ slot-id2 ] ] auto
- A source address must be configured.
- The IP address must be an explicit IPv6 address but not a multicast one.
- If both slot-id1 and slot-id2 are configured in select-board slot-id1 [ slot-id2 ], only one board is selected, and slot-id1 is preferred. If slot-id1 fails to be selected, slot-id2 is selected. If both boards fail to be selected, board selection stops.
- Run commit
The configuration is committed.
(Optional) Configuring BFD Packets to Be Transparently Transmitted on an Interface
On a network, if a customer-side router that functions as a CE has the default BFD function enabled, the default BFD packets received by a PE are sent to the CPU instead of being transparently transmitted to the peer CE. In this case, you can adjust the forwarding mode of multicast IPv4 BFD packets on the interface and its sub-interfaces to enable the BFD packets to be transparently transmitted.
Procedure
- Run system-view
The system view is displayed.
- Run interface interface-type interface-number
The interface view is displayed.
- Run default-ip-bfd transparent-transmission enable
Transparent transmission is configured for multicast IPv4 BFD packets on the interface and its sub-interfaces.
- Run commit
The configuration is committed.
(Optional) Changing the BFD Detection Time
You can change the BFD detection time to more efficiently use a BFD session to monitor links on a network.
Procedure
- Run system-view
The system view is displayed.
- Run bfd session-name
The BFD session view is displayed.
- Run min-tx-interval tx-interval
The minimum interval at which BFD control packets are sent is set.
- Run min-rx-interval rx-interval
The minimum interval at which BFD control packets are received is set.
If a BFD session goes Down, a device automatically changes the intervals at which BFD control packets are sent and received to random values greater than 1000 milliseconds. After the BFD session goes Up, the device restores the configured intervals.
- Run detect-multiplier multiplier
The local detection multiplier is set.
In BFD for route scenarios, a route's outbound interface is an inter-board trunk interface. If the board on which the trunk interface's any member interface resides fails and the BFD detection time is less than 200 ms, the BFD session goes Down because the inter-board trunk switching time is 200 ms. Therefore, you are advised to set the BFD detection time to a value greater than 3 x 100 ms.
- Run commit
The configuration is committed.
(Optional) Setting the BFD WTR Time
You can set the BFD wait to restore (WTR) time to prevent an application from switching between the master and slave devices due to BFD session flapping.
Context
If a BFD session flaps, master/slave switchovers are frequently performed on the application associated with BFD. To resolve this issue, set the WTR time for a BFD session. When the BFD session changes from Down to Up, BFD reports the change to the upper-layer application after the WTR time expires.
Procedure
- Run system-view
The system view is displayed.
- Run bfd session-name
The BFD session view is displayed.
- Run wtr wtr-value
The WTR time of the BFD session is set.
A BFD session is unidirectional. Therefore, if the WTR time is used, you must set the same WTR time on both ends of the BFD session. If the WTR times on both ends are different and the session status changes on one end, applications on both ends of the BFD session detect different BFD session statuses.
- Run commit
The configuration is committed.
(Optional) Configuring a Description for a BFD Session
You can configure a description for a BFD session to identify this session.
Procedure
- Run system-view
The system view is displayed.
- Run bfd session-name
The BFD session view is displayed.
- Run description description
A description is configured for the BFD session.
description is a string of 1 to 51 case-sensitive characters, spaces not supported.
You can run the undo description command to delete the description of the BFD session.
- Run commit
The configuration is committed.
Verifying the Configuration of a Static BFD Session with Automatically Negotiated Discriminators
After a static BFD session with automatically negotiated discriminators is successfully set up, you can view information about the BFD session, such as the static session type and automatically negotiated discriminators.
- Enabling BFD Globally
- Establishing a BFD Session
- (Optional) Configuring BFD Packets to Be Transparently Transmitted on an Interface
- (Optional) Changing the BFD Detection Time
- (Optional) Setting the BFD WTR Time
- (Optional) Configuring a Description for a BFD Session
- (Optional) Configuring a Priority for a BFD Session
- Verifying the Configuration of a Static BFD Session with Automatically Negotiated Discriminators