skip to content

In BFD asynchronous mode, how do Desired Min TX, Required Min RX and Detect Mult set each side's transmit rate and detection time?

level: middleimportance: must knowfreq 29%

answer

  1. the slower side wins
  2. larger of my TX and your RX
  3. multiplier comes from the remote
  4. 300 ms x 3
  5. one second until Up

basics

~20 s

Each BFD router transmits at the larger of its own Desired Min TX and the peer's Required Min RX; its detection time is the peer's Detect Mult times that peer's agreed interval, so 300 ms x 3 gives 900 ms.

solid answer

~50 s

Every BFD Control packet advertises three numbers: `Desired Min TX Interval` (how fast I want to send), `Required Min RX Interval` (how fast I can receive) and `Detect Mult`. RFC 5880 has a router transmit no faster than the larger of its own Desired Min TX and the peer's Required Min RX, so the slower side sets the pace, separately in each direction. The receiver computes its **detection time** as the *remote* Detect Mult times the remote's agreed interval (the larger of its own Required Min RX and the remote's Desired Min TX). With 300 ms and a multiplier of 3 on both sides, each side declares Down after 900 ms of silence. Packets are jittered 0-25% early, the interval stays at one second or more until the session is Up, and timer changes go through a Poll Sequence.

code

pseudocode · 8 lines
pseudocode
# local = this router, remote = values from the peer's last Control packet
tx_interval = max(local.desired_min_tx, remote.required_min_rx)
agreed_remote_tx = max(local.required_min_rx, remote.desired_min_tx)
detection_time = remote.detect_mult * agreed_remote_tx

# A = 50/50/3, B = 100/300/5 (ms)
# on A: tx = max(50, 300) = 300; detect = 5 * max(50, 100) = 500
# on B: tx = max(100, 50) = 100; detect = 3 * max(300, 50) = 900

go deeper

for a junior

Recall the three values a BFD packet advertises and the headline formula: interval times multiplier, so 300 ms x 3 detects in 900 ms.

for a middle

Work both rules: the slower of my TX and your RX sets my rate, and my detection time uses the remote multiplier. Compute an asymmetric pair without mixing them up.

for a senior

Explain the protective rules (jitter, the one-second rate before Up, the Poll Sequence) and how a peer's large Required Min RX lengthens its own detection.

for a principal

Turn the formula into a policy: choose interval and multiplier per link class from loss tolerance and packet budget, and keep the values both platforms actually support.

## The three advertised values A BFD Control packet (RFC 5880, section 4.1) carries three timing fields. All intervals are in **microseconds** on the wire. | Field | Meaning | |---|---| | `Desired Min TX Interval` | The fastest rate at which this system *wants* to send Control packets | | `Required Min RX Interval` | The fastest rate at which this system *can receive* Control packets; zero means send none | | `Detect Mult` | How many of this system's packets in a row the receiver may miss before declaring the session down | A fourth field, `Required Min Echo RX Interval`, governs the echo function and is not part of the asynchronous calculation. ## Rule 1: the transmit interval RFC 5880 section 6.8.7: a system MUST NOT transmit Control packets at an interval less than the **larger** of its own `bfd.DesiredMinTxInterval` and the peer's advertised `Required Min RX Interval`. In words, **the system reporting the slower rate determines the transmission rate**. A router that wants to send every 50 ms to a peer that can only take one packet every 300 ms sends every 300 ms. The negotiation is **independent in each direction**, so A-to-B and B-to-A can run at different rates. ## Rule 2: the detection time The detection time is never carried in a packet; each receiver computes it (section 6.8.4). In asynchronous mode: - **Detection time = the remote system's `Detect Mult` x the remote's agreed transmit interval**, - where the agreed interval is the larger of the local `Required Min RX` and the remote's last received `Desired Min TX`. The multiplier is the **remote's** because the sender knows how many of its own packets may be lost before it wants the receiver to give up. The two directions can therefore end up with different detection times. ## Worked example: asymmetric settings Router A advertises 50 ms / 50 ms / 3 and router B advertises 100 ms / 300 ms / 5 (TX / RX / multiplier). | Quantity | Computation | Result | |---|---|---| | A transmits every | max(A TX 50, B RX 300) | 300 ms | | B transmits every | max(B TX 100, A RX 50) | 100 ms | | A's detection time | B's Detect Mult 5 x max(A RX 50, B TX 100) | 500 ms | | B's detection time | A's Detect Mult 3 x max(B RX 300, A TX 50) | 900 ms | Two classic errors give different numbers: using the *local* multiplier gives 300 ms for A and 1,500 ms for B, and multiplying by the faster interval gives 150 ms for A. With the symmetric setting often used on an eBGP hand-off (300 ms / 300 ms / 3 on both routers), both directions transmit every 300 ms and both detection times are **900 ms**. ## Rules that bend the arithmetic 1. **Jitter.** Each periodic interval MUST be reduced by a random 0-25%, so intervals average about 12.5% shorter than negotiated; this avoids self-synchronisation. With `Detect Mult` 1 the interval MUST fall between 75% and 90% of the negotiated value, so that one packet always lands before the detection time expires. 2. **Slow start.** While a session is not Up, a system MUST set its Desired Min TX to at least **one second**, which keeps BFD traffic negligible toward a neighbour that may not even run BFD. Fast intervals only take effect once the session is Up. 3. **Poll Sequence.** Changing Desired Min TX or Required Min RX starts a Poll Sequence (P bit answered by F bit). A system that *slows* its transmission keeps the old rate until the Poll completes, and a system that *reduces* its Required Min RX keeps using the old value for the detection time until then, so neither side declares a false failure during the change. 4. **No standard minimum.** RFC 5880 sets no floor; RFC 7419 defines a common set of intervals that implementations should support (3.3 ms, 10 ms, 20 ms, 50 ms, 100 ms and 1 s) so that two systems with different hardware still agree on a fast rate. ## Why it matters in an interview - Sizing BFD means choosing an interval *and* a multiplier: 100 ms x 3 and 50 ms x 6 both give 300 ms, but the second sends twice the packets and survives more consecutive losses. - A neighbour that advertises a large Required Min RX silently slows *your* transmission and therefore *its* detection time. - When the two sides report different detection times, both are correct: each receiver computes its own.

  • Why must a BFD router that raises its Desired Min TX keep sending at the old rate until its Poll Sequence completes?
    The peer's detection time is built on the interval it last agreed. If the sender slowed down at once, the peer could see `Detect Mult` intervals pass at the old rate without a packet and declare a false failure. RFC 5880 makes the sender wait for the Final bit, which proves the peer has updated its detection time first.
  • Why does a BFD session send only one packet per second until it comes Up?
    RFC 5880 requires Desired Min TX of at least one second whenever the session is not Up. A router configured for BFD may be talking to a neighbour that does not run it at all, and fast packets toward it would waste bandwidth and CPU for nothing. The fast negotiated rate applies only once both sides have completed the three-way handshake.

saying these in an interview costs you the question

  • Each router transmits at its own Desired Min TX regardless of the peer.
  • The detection time is multiplied by the local Detect Mult, not the remote one.
  • The detection time is carried in the BFD packet and must match on both sides.
  • BFD sends at the fast configured rate even before the session comes Up.
  • Jitter makes BFD packets arrive later than the negotiated interval.