Bidirectional Forwarding Detection (BFD) for MPLS
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
- Configuring BFD on Provider Edge and Provider Switches for an RSVP-Based LSP
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.
Configure one or more provider switches. See Configuring MPLS on EX8200 and EX4500 Provider Switches.
To configure BFD on PE and provider switches:
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.
Configure one or more provider switches. See Configuring MPLS on EX8200 and EX4500 Provider Switches.
To configure BFD on PE and provider switches:
BFD-Triggered Local Repair for Rapid Convergence
Understanding BFD-Triggered Local Protection
The time it takes for a network to converge following a link or node failure can vary dramatically based on a number of factors, including network size, the protocols used, and network design. However, while each particular convergence event is different, the process of convergence is essentially consistent. The failure is detected, the failure is reported (flooded) in the network, an alternate path is found for traffic, and the forwarding plane is updated to pass traffic on a new path.
This overview discusses how Bidirectional Forwarding Detection (BFD)-triggered local repair contributes to a quicker restoration time for rapid convergence in an MPLS network.
- Purpose of BFD-Triggered Local Repair
- Configuring BFD-Triggered Local Repair
- Disabling BFD-Triggered Local Repair
Purpose of BFD-Triggered Local Repair
In Junos OS, general MPLS traffic protection for RSVP-signaled label-switched path (LSP) failures is provided by several complementary mechanisms. These protection mechanisms include local protection (fast reroute, link protection, and node-link protection) and path protection (primary and secondary paths). Local protection in conjunction with path protection can provide minimum packet loss for an LSP, and control the way the LSP is rerouted after a failure. Traditionally, both types of protection rely on fast detection of connectivity failure at the physical level. However, for transmission media without fast physical level detection, Junos OS supports BFD and MPLS ping for fast failure detection.
With links between routers, when a route goes down, the routing protocol process recalculates the next best path. When MPLS fast reroute (FRR) is enabled, ifl messages are flooded to all Flexible PIC Concentrators (FPCs). The edge FPC enables the bypass MPLS LSP tunnel. Lastly, all routes are repaired and sent through the bypass MPLS LSP tunnel. The amount of time it takes to repair all routes is proportional to the number of routes.
This repair scenario becomes more difficult when a switch lies between two links. See Figure 1.
When a link goes down at the remote end, the failure is not detected at the local end until the interior gateway protocol (IGP) goes down. To wait for the routing protocol process to recalculate the next best path takes too much time.
With BFD-triggered local repair enabled, the Packet Forwarding Engine completes the repair first, using the bypass MPLS LSP tunnel (that is preconfigured and installed), then informs the routing protocol process to recalculate a new route. By doing this, when the primary MPLS LSP tunnel goes down, the FPC can intermittently and immediately divert traffic to the FPC with the bypass MPLS LSP tunnel.
Using local repair in this way achieves a faster restoration time of less than 50 ms.
Configuring BFD-Triggered Local Repair
BFD-triggered local repair is not configurable, but is part of the default configuration.
BFD-triggered local repair works within the legacy Junos OS features MPLS-FRR, BFD for IGP, and loop-free alternates (LFAs).
Disabling BFD-Triggered Local Repair
By default, BFD-triggered local repair is enabled for all routing interfaces. If desired, you can disable BFD-triggered local repair at the [edit routing-options] hierarchy level.
To explicitly disable BFD-triggered local repair:
Include the
no-bfd-triggered-local-repair
statement at the [edit routing-options] hierarchy level:user@host# set no-bfd-triggered-local-repair
(Optional) Verify your configuration settings before committing them by using the
show routing-options
command.user@host# run show routing-options
Confirm your configuration by issuing the show routing-options command.
user@host# show routing-options ... no-bfd-triggered-local-repair; }
When you disable this feature, you must also restart routing
by including the graceful-restart statement
for the IGP. For example, for OSPF, this is accomplished by including
the graceful-restart statement at the [edit protocols ospf]
hierarchy level.
Configuring BFD for MPLS IPv4 LSPs
You can configure Bidirectional Forwarding Detection (BFD) protocol on MPLS IPv4 LSPs as outlined in the Internet draft draft-ietf-bfd-mpls-02.txt, BFD for MPLS LSPs. BFD is used as a periodic Operation, Administration, and Maintenance (OAM) feature for LSPs to detect LSP data plane faults. You can configure BFD for LSPs that use either LDP or RSVP as the signaling protocol.
BFD for MPLS IPv4 LSP is based on the Routing Engine and is not distributed. As a result, the minimum supported BFD timer interval is (100 ms * 3) per one LSP session, and for scaled LSP sessions, the minimum supported BFD timer interval is (300 ms * 3). As you increase the number of LSP sessions with BFD, you must also increase (scale) the interval timers to support the network.
For Routing Engine switchover instances with nonstop active routing (NSR) support, the minimum supported BFD timer interval is (2.5 seconds * 3).
You can also use the LSP ping
commands to detect
LSP data plane faults. However, BFD has a couple of benefits: it requires
less computer processing than LSP ping
commands and can
quickly detect faults in large numbers of LSPs (LSP ping
commands must be issued for each LSP individually). On the other
hand, BFD cannot be used to verify the control plane against the data
plane at the egress LSR, which is possible when an LSP ping
echo request is associated with a forwarding equivalence class (FEC).
The BFD failure detection timers are adaptive and can be adjusted
to be more or less aggressive. For example, the timers can adapt to
a higher value if the adjacency fails, or a neighbor can negotiate
a higher value for a timer than the configured value. The timers adapt
to a higher value when a BFD session flap occurs more than three times
in a span of 15 seconds. A back-off algorithm increases the receive
(Rx) interval by two if the local BFD instance is the reason for the
session flap. The transmission (Tx) interval is increased by two if
the remote BFD instance is the reason for the session flap. You can
use the clear bfd adaptation
command to return BFD interval
timers to their configured values. The clear bfd adaptation
command is hitless, meaning that the command does not affect traffic
flow on the routing device.
Starting from Junos
OS Release 13.2R4, 13.3R2, and 14.1, you can set the time interval
between LSP ping messages and the number of LSP ping responses, respectively,
after which the Bidirectional Forwarding Detection (BFD) session is
brought down. To so do, you configure the lsp-ping-interval
statement and the lsp-ping-multiplier
statement at the [edit protocols mpls oam]
hierarchy
level.
For configuration instructions for LDP-signaled LSPs, see Configuring BFD for LDP LSPs. For configuration instructions for RSVP-signaled LSPs, see the following section.
- Configuring BFD for RSVP-Signaled LSPs
- Configuring a Failure Action for the BFD Session on an RSVP LSP
Configuring BFD for RSVP-Signaled LSPs
BFD for RSVP supports unicast IPv4 LSPs. When BFD is configured for an RSVP LSP on the ingress router, it is enabled on the primary path and on all standby secondary paths for that LSP. The source IP address for outgoing BFD packets from the egress side of an MPLS BFD session is based on the outgoing interface IP address. You can enable BFD for all LSPs on a router or for specific LSPs. If you configure BFD for a specific LSP, whatever values configured globally for BFD are overridden. The BFD sessions originate only at the ingress router and terminate at the egress router.
An error is logged whenever a BFD session for a path fails. The following example shows how BFD for RSVP LSP log messages might appear:
RPD_MPLS_PATH_BFD_UP: MPLS BFD session for path path1 up on LSP R0_to_R3 RPD_MPLS_PATH_BFD_DOWN: MPLS BFD session for path path1 down on LSP R0_to_R3
You can configure BFD for all of the RSVP LSPs on the router,
a specific LSP, or the primary path of a specific LSP. To configure
BFD for RSVP LSPs, include the oam
and bfd-liveness-detection
statements.
oam { bfd-liveness-detection { failure-action { make-before-break teardown-timeout seconds; teardown; } failure-action teardown; minimum-interval milliseconds; minimum-receive-interval milliseconds; minimum-transmit-interval milliseconds; multiplier detection-time-multiplier; } lsp-ping-interval time-interval; lsp-ping-multiplier multiplier; }
You can configure this statement at the following hierarchy levels:
[edit protocols mpls]
[edit protocols mpls label-switched-path lsp-name]
[edit protocols mpls label-switched-path lsp-name primary path-name]
The bfd-liveness-detection
statement includes the
following options:
minimum-interval
—Specifies the minimum transmit and receive interval.minimum-receive-interval
—Specifies the minimum receive interval. The range is from 1 through 255,000 milliseconds.minimum-transmit-interval
—Specifies the minimum transmit interval. The range is from 1 through 255,000 milliseconds.lsp-ping-multiplier
—Specifies the detection time multiplier. The range is from 1 through 255.Note:To avoid triggering false negatives, configure a BFD fault detection time that is longer than the fast reroute time.
You can
also configure the lsp-ping-interval
option to adjust the
time interval between LSP pings. The LSP ping command for RSVP-signaled
LSPs is ping mpls rsvp
. For more information on the ping mpls rsvp
command, see the CLI Explorer.
Configuring a Failure Action for the BFD Session on an RSVP LSP
When the BFD session for an RSVP LSP goes down, the LSP is torn down and resignaled. Traffic can be switched to a standby LSP, or you can simply tear down the LSP path. Any actions performed are logged.
When a BFD session for an RSVP LSP path goes down, you can configure the Junos OS to resignal the LSP path or to simply disable the LSP path. A standby LSP path could be configured to handle traffic while the primary LSP path is unavailable. The router can automatically recover from LSP failures that can be detected by BFD. By default, if a BFD session fails, the event is simply logged.
To enable the Junos OS to tear down an RSVP LSP path in the
event of a BFD event, include the failure-action
statement:
failure-action { make-before-break teardown-timeout seconds; teardown; }
For a list of the hierarchy levels at which you can include this statement, see the statement summary section for this statement.
You can configure either the teardown
or make-before-break
options:
teardown
—Causes the LSP path to be taken down and resignaled immediately.make-before-break
—Causes the Junos OS to attempt to signal a new LSP path before tearing down the old LSP path. You can also configure theteardown-timeout
option to automatically tear down the LSP after the time period specified if the attempt to resignal the LSP fails within theteardown-timeout
interval. If you specify a value of 0 for theteardown-timeout
interval, the LSP is taken down and resignaled immediately (the same behavior as when you configure theteardown
option).
To configure a failure action for all of the RSVP LSPs, include
the failure-action
statement at the [edit protocols
mpls oam bfd-liveness-detection]
hierarchy level. To configure
a failure action for a specific RSVP LSP, include the failure-action
statement at the [edit protocols mpls label-switched-path lsp-name oam bfd-liveness-detection]
hierarchy level.
To configure a failure action for a specific primary path, include
the failure-action
statement at the [edit protocols
mpls label-switched path lsp-name primary path-name oam bfd-liveness-detection]
hierarchy
level. To configure a failure action for a specific secondary LSP
path, include the failure-action
statement at the [edit protocols mpls label-switched-path lsp-name secondary path-name oam bfd-liveness-detection]
hierarchy level.
Change History Table
Feature support is determined by the platform and release you are using. Use Feature Explorer to determine if a feature is supported on your platform.