Configuring Bidirectional Forwarding Detection for MPLS (CLI Procedure)
You can configure the Bidirectional Forwarding Detection (BFD) protocol on EX8200 standalone switches and EX8200 Virtual Chassis to detect failures in the MPLS label-switch path (LSP). The BFD protocol is a simple hello mechanism that detects failures in a network. Hello packets are sent at a specified, regular interval. A neighbor failure is detected when the routing device stops receiving a reply from the neighbor after a specified interval. BFD works with a wide variety of network environments and topologies. The failure detection timers for BFD have shorter time limits than those of the failure detection mechanisms for static routes, and thus provide faster detection. These timers are also adaptive. For example, a timer can adapt to a higher value if an adjacency fails, or a neighbor can negotiate a higher value than the one configured.
This topic describes configuring the provider edge (PE) switches and the provider switches to support for LDP-based LSPs and RSVP-based LSPs.
This topic includes:
Configuring BFD on Provider Edge and Provider Switches for an LDP-Based LSP
You can enable BFD for the LDP-based LSPs or RSVP-based LSPs associated with a specific forwarding equivalence class (FEC). Alternatively, you can configure an Operation Administration and Maintenance (OAM) ingress policy to enable BFD on a range of FEC addresses.
Before you configure BFD for an LDP-based based LSP, you must configure the basic components for an MPLS network:
- Configure two PE switches. See Configuring MPLS on Provider Edge Switches Using IP Over MPLS (CLI Procedure).
- Configure one or more provider switches. See Configuring MPLS on Provider Switches (CLI Procedure).
To configure BFD on PE and provider switches:
- Define an OAM policy:
- Specify the FEC on which you want to enable OAM:
[edit]
user@switch# set protocols ldp oam fec address - Specify the minimum transmit and receive interval for
the BFD configuration:

Note: If you configure the minimum-interval statement, you do not need to configure the minimum-receive-interval statement or the minimum-transmit-interval statement.
[edit]
user@switch# set protocols ldp oam bfd-liveness-detection minimum-interval timeor
[edit]
user@switch# set protocols ldp oam bfd-liveness-detection minimum-receive-interval time
user@switch# set protocols ldp oam bfd-liveness-detection minimum-transmit-interval time - Specify the detection time multiplier. The negotiated
transmit interval multiplied by this value gives the detection time
for the receiving system in Asynchronous mode:
[edit]
user@switch# set protocols ldp oam bfd-liveness-detection multiplier multiplier - Specify the minimum transmit interval (or the minimum
receive interval).
[edit]
user@switch# set protocols ldp oam bfd-liveness-detection transmit-interval minimum-interval time - Specify a threshold for detecting the adaptation of the
detection time:
[edit]
user@switch# set protocols ldp oam bfd-liveness-detection detection-time threshold time - Configure route and next-hop action in the event of a
BFD session failure event on the LDP-based LSP:
[edit]
user@switch# set protocols ldp oam bfd-liveness-detection failure-action action
Note: When a BFD session goes down, you can configure the Junos OS to resignal the LSP path or to simply disable the LSP path. You can configure a standby LSP path to handle traffic while the primary LSP path is unavailable. The switch can automatically recover from LSP failures that can be detected by BFD. By default, if a BFD session fails, the event is simply logged.
- Specify how long the BFD session must be up before adding
the route or next hop. Specifying a time of 0 seconds causes the route
or next hop to be added as soon as the BFD session comes back up.
[edit]
user@switch# set protocols ldp oam bfd-liveness-detection holddown-interval time - Enable tracing of FECs for LDP-based LSPs and specify
a source address for sending probes. Then, specify a wait interval,
after which to send the probe packet.
[edit]
user@switch# set protocols ldp oam periodic-traceroute source address
user@switch# set protocols ldp oam periodic-traceroute wait time - Specify the duration of the LSP ping interval in seconds:
[edit]
user@switch# set protocols ldp oam lsp-ping-interval time - Specify the action to be taken for the OAM policy:
[edit]
user@switch# set policy-options policy-statement policy-name then accept - Apply the BFD configurations at the MPLS hierarchy level
for the configuration to inherit the statements in the configuration
group:
[edit]
user@switch# set apply-groups MPLS
Configuring BFD on Provider Edge and Provider Switches for an RSVP-Based LSP
When BFD is configured for an RSVP-based LSP on the ingress switch, it is enabled on the primary path and on all standby secondary paths for that LSP. You can enable BFD for all LSPs on a switch or for specific LSPs. If you configure BFD for a specific LSP, whatever values configured globally for BFD are overridden on that LSP. The BFD sessions originate only at the ingress switch and terminate at the egress switch.
Before you configure BFD for an RSVP-based LSP, you must configure the basic components for an MPLS network:
- Configure two PE switches. See Configuring MPLS on Provider Edge Switches Using IP Over MPLS (CLI Procedure).
- Configure one or more provider switches. See Configuring MPLS on Provider Switches (CLI Procedure).
To configure BFD on PE and provider switches:
- Specify the minimum transmit and receive interval for
the BFD configuration:

Note: If you configure the minimum-interval statement, you do not need to configure the minimum-receive-interval statement or the minimum-transmit-interval statement.
[edit]
user@switch# set protocols mpls label-switched-path lsp-name oam bfd-liveness-detection minimum-interval timeor
[edit]
user@switch# set protocols mpls label-switched-path lsp-name oam bfd-liveness-detection minimum-receive-interval time
user@switch# set protocols mpls label-switched-path lsp-name oam bfd-liveness-detection minimum-transmit-interval time - Specify the detection time multiplier. The negotiated
transmit interval multiplied by this value gives the detection time
for the receiving system in Asynchronous mode:
[edit]
user@switch# set protocols mpls label-switched-path lsp-name oam bfd-liveness-detection multiplier multiplier - Specify the minimum transmit interval (or the minimum
receive interval):
[edit]
user@switch# set protocols mpls label-switched-path lsp-name oam bfd-liveness-detection transmit-interval minimum-interval time - Configure route and next-hop actions in the event of a
BFD session failure event on the RSVP-based LSP:
[edit]
user@switch# set protocols mpls label-switched-path lsp-name oam bfd-liveness-detection failure-action action
Note: When a BFD session goes down, you can configure the Junos OS to resignal the LSP path or to simply disable the LSP path. You can configure a standby LSP path to handle traffic while the primary LSP path is unavailable. The switch can automatically recover from LSP failures that can be detected by BFD. By default, if a BFD session fails, the event is simply logged if you do not specifically configure a failure action.