Unaffiliated Bidirectional Forwarding Detection (BFD) Echo
updates
- rfc-5880 — Bidirectional Forwarding Detection (BFD)
Extracted elements (23)
The mechanism leverages existing BFD periodic pacing machinery based on configuration, so there is no real possibility of creating congestion. Creating congestion would also be counterproductive to the goal of checking bidirectional connectivity.
The Unaffiliated BFD Echo packet reuses the BFD Control packet format rather than defining a new format. RFC 5880 states Echo packet contents are a local matter; this document defines that 'local matter' by specifying BFD Control packet fields and their required values.
Unaffiliated BFD Echo is restricted to single-hop paths because the Echo packets would be looped back by the first hop, making multihop monitoring impossible with this mechanism.
Unaffiliated BFD Echo was introduced to allow rapid forwarding-path failure detection in scenarios where the remote device (e.g., IoT devices, servers running VMs) cannot support the full BFD protocol. Only the local device needs BFD; the remote device need only perform basic IP forwarding to loop packets back.
Standard procedures for BFD Asynchronous sessions, including packet validation and authentication per RFC 5880, are applied to the looped BFD Control packets in Unaffiliated BFD Echo. However, AdminDown state is not utilized because there is no remote BFD peer to coordinate with.
The Unaffiliated BFD Echo session can coexist with other BFD session types on the same local device. The remote system for the Unaffiliated BFD Echo session must differ from the remote system for any other BFD session, and local discriminators for different sessions must be distinct.
Unaffiliated BFD Echo can only be used for single IP hops over IPv4 or IPv6. It cannot be used for multihop paths because the Echo packets would be looped back by the first hop, preventing end-to-end path monitoring.
All Unaffiliated BFD Echo packets for the session MUST be sent with a TTL or Hop Limit value of 255.
My Discriminator MUST be set to the provisioned local discriminator. Your Discriminator MUST initially be set to 0 and then MUST be set to the value of 'My Discriminator' looped back from the remote system.
Received Unaffiliated BFD Echo packets MUST have a TTL or Hop Limit value of 254 (similar to GTSM per RFC 5082 Appendix A); otherwise the received packets MUST be dropped. This verifies a configured single-hop count.
The 'Desired Min TX Interval' and 'Required Min RX Interval' fields MUST be populated with a specific value to prevent potential exposure of uninitialized memory; a value of 1 second (1,000,000 microseconds) is RECOMMENDED. Upon receipt these values MUST be ignored and MUST NOT be used in the calculation of the Detection Time.
The 'Required Min Echo RX Interval' field MUST be populated with a specific value (suggested 0) to prevent uninitialized memory exposure, but MUST be ignored upon receipt.
The transmission interval for Unaffiliated BFD Echo packets when in the Up state MUST be provisioned on the local device. The 'Detect Mult' field MUST be set to a value provisioned on device A for the maximum allowable number of consecutively lost packets.
When bfd.SessionState is Up and a 'Detect Mult' number of Unaffiliated BFD Echo packets have not arrived, the local device MUST set bfd.SessionState to Down and bfd.LocalDiag to 2 (Echo Function Failed), per RFC 5880 Section 6.8.5.
An Unaffiliated BFD Echo session is not a true BFD session because there is no BFD protocol state coordination with the remote end. From the local initiator's standpoint it behaves like a BFD session, with received state derived from locally generated packets looped back by the remote IP forwarder rather than from remote BFD Control packets.
Initial demultiplexing of Unaffiliated BFD Echo packets with a zeroed 'Your Discriminator' field is performed based on source IP address or UDP source port. After the remote system loops back the local discriminator, all further received packets are demultiplexed based solely on the 'Your Discriminator' field, per RFC 5880 Section 6.3.
The session begins with a slow transmission rate of no greater than one packet per second until the session on device A reaches Up state. After the session goes Down, the slow transmission rate is resumed. When Up, the provisioned transmission interval is used.
Unaffiliated BFD Echo packets are transmitted and received using UDP destination port 3785, as defined in RFC 5881 for BFD Echo. The packets follow the same encapsulation rules as BFD Echo packets per RFC 5881 Section 4.
A DoS attacker may send spoofed Unaffiliated BFD Echo packets to the loopback device, triggering false session state changes. Some form of authentication SHOULD be included; specifically, the 'Authentication Section' as defined in RFC 5880 for a BFD Control packet is RECOMMENDED to be included within the Unaffiliated BFD Echo packet.
All fields of the Unaffiliated BFD Echo packet MUST be populated with a certain value, even if some fields are ignored on receipt, to avoid unset fields being a potential vector for disclosure of uninitialized memory.
Unaffiliated BFD Echo requires the remote device to loop packets back, which means the remote device cannot apply Unicast Strict Reverse Path Forwarding (RPF) per RFC 3704; otherwise, the Echo packets might fail the RPF check at the remote device.
The Unaffiliated BFD Echo session adheres to the BFD state machine from RFC 5880 Section 6.2, with two exceptions: received state is derived from looped-back locally generated packets (not remote BFD Control packets), and the AdminDown state is not utilized.
The Unaffiliated BFD Echo packet reuses the BFD Control packet format from RFC 5880. Key field values: My Discriminator set to provisioned local discriminator; Your Discriminator initially 0 then mirrored from loopback; Desired Min TX Interval and Required Min RX Interval set to a specific value (suggested 1,000,000 microseconds); Required Min Echo RX Interval set to a specific value (suggested 0); Detect Mult set to provisioned detection multiplier.