Bidirectional Forwarding Detection (BFD) for MPLS Label Switched Paths (LSPs)
updated by
- rfc-7726 — Clarifying Procedures for Establishing BFD Sessions for MPLS Label Switched Paths (LSPs)
updates
- rfc-1122 — Requirements for Internet Hosts - Communication Layers
Extracted elements (26)
BFD is used for MPLS LSP fault detection instead of LSP Ping alone because BFD has lower computational cost, a fixed packet format suitable for hardware/firmware implementation, and supports sub-second fault detection intervals. LSP Ping is retained for bootstrapping and periodic control-plane verification because BFD cannot associate a fault detection message with a FEC in PHP or next-hop label allocation scenarios.
LSP Ping is used to bootstrap BFD sessions because in PHP, explicit-null, and next-hop label allocation scenarios, BFD Control packets alone do not carry enough information to identify the FEC, making demultiplexing impossible without first exchanging discriminators via LSP Ping.
The destination IP address range 127/8 (IPv4) / 0:0:0:0:0:FFFF:7F00/104 (IPv6) is used for BFD Control packets sent by the ingress LSR, following the same motivation as RFC 4379 Section 2.1, to ensure the packet is processed by the egress LSR's control plane. This is an explicit exception to the behavior defined in RFC 1122.
For MPLS PW fault detection, this document assumes that the PW control channel type [RFC5085] is configured and LSP Ping support is also configured. The presence of a fault detection message may alternatively be indicated by setting a bit in the control word.
When MPLS fast-reroute is active, the BFD fault detection interval MUST be set greater than the fast-reroute switchover time; otherwise BFD will declare a fault during a legitimate local repair, causing a false positive.
A BFD session MUST be established for a particular MPLS LSP to use BFD for fault detection on that LSP. BFD Control packets MUST be sent along the same data path as the LSP being verified.
An implementation SHOULD provide configuration options to control the BFD fault detection interval, so it can be set greater than the MPLS fast-reroute switchover time to avoid false fault detections.
BFD Control packets sent by the egress LSR to the ingress LSR MUST use destination port 4784 if routed (BFD-MHOP), or destination port 3784 if encapsulated in an MPLS label stack.
BFD Control packets sent by the ingress LSR MUST be encapsulated in the MPLS label stack corresponding to the FEC under test. The packet MUST be a UDP packet with destination port 3784 and the IP TTL or hop limit MUST be set to 1.
For multiple alternate paths to an egress LSR for an LDP IP FEC, a BFD session SHOULD be established for each alternate path discovered via LSP Ping traceroute.
If an LSP is associated with multiple FECs (e.g., due to next-hop label allocation), a BFD session SHOULD be established for each FEC.
If the BFD session is not in UP state, the periodic LSP Ping Echo request messages MUST include the BFD Discriminator TLV.
In PHP or explicit-null or next-hop-label-allocation scenarios, demultiplexing of BFD Control packets MUST be done using the remote discriminator field in the received BFD Control packet, since the packet does not contain sufficient information otherwise.
On receipt of an LSP Ping Echo request, the egress LSR MUST send a BFD Control packet to the ingress LSR if FEC validation succeeds; this packet MUST set the Your Discriminator field to the discriminator received from the ingress LSR.
Once the BFD session for an MPLS LSP is UP, either end MUST NOT change the source IP address or local discriminator values of its BFD Control packets unless it first brings the session down. An LSR MUST ignore BFD packets for a session in UP state if the My Discriminator or Source IP address do not match the established session values.
Periodic LSP Ping Echo request messages SHOULD be sent by the ingress LSR to the egress LSR along the same data path as the LSP, to periodically verify the control plane against the data plane. The rate of these messages SHOULD be significantly less than the rate of BFD Control packets.
The destination IP address of BFD Control packets sent by the ingress LSR MUST be randomly chosen from the 127/8 range for IPv4 or 0:0:0:0:0:FFFF:7F00/104 for IPv6, except when exercising a specific alternate path discovered by LSP Ping traceroute.
The local discriminator assigned by the egress LSR MUST be used as the My Discriminator field in BFD session packets sent by the egress LSR. The egress LSR MUST also send Control packets to the ingress LSR with the Your Discriminator field set to the ingress LSR's local discriminator.
To establish a BFD session, an LSP Ping Echo request message MUST carry the local discriminator assigned by the ingress LSR; this MUST subsequently be used as the My Discriminator field in BFD session packets sent by the ingress LSR.
BFD session bootstrapping uses LSP Ping asynchronous mode only; BFD demand mode and the Echo function are outside the scope of this specification. The <MPLS LSP, FEC> combination drives initiation of fault detection.
IANA has assigned type value 15 to the BFD Discriminator TLV in the LSP Ping TLVs and sub-TLVs registry.
Security considerations from [BFD], [BFD-MHOP], and [RFC4379] all apply. For MPLS-encapsulated BFD Control packets, MPLS security considerations apply. When BFD Control packets sent by the egress LSR are routed, the authentication considerations in [BFD-MHOP] should be followed.
BFD session state transitions follow [BFD] procedures. A key trigger: when the session is not yet UP, LSP Ping Echo requests carry the BFD Discriminator TLV; once UP, source IP and discriminator values are frozen until the session is explicitly brought down.
BFD Control packets from the ingress LSR are UDP-over-MPLS: encapsulated in the LSP's label stack, destination port 3784, source port per BFD-IP procedures, source IP a routable address of the sender, destination IP from 127/8 (IPv4) or 0:0:0:0:0:FFFF:7F00/104 (IPv6), TTL/hop-limit set to 1.
For bidirectional LSPs or MPLS PWs, BFD Control packets from the egress LSR may be encapsulated in an MPLS label stack with destination IP randomly chosen from 127/8 (IPv4) or 0:0:0:0:0:FFFF:7F00/104 (IPv6) and destination port 3784.
The BFD Discriminator TLV in LSP Ping has type value 15, length 4, and a 4-byte value containing the local discriminator that the sending LSR associates with the BFD session.