Bidirectional forwarding detection (BFD) techniques are mature. When a large number of BFD sessions are configured to monitor links, the negotiation time of the existing BFD state machine is lengthened. In this situation, seamless bidirectional forwarding detection (SBFD) can be configured to monitor SR tunnels. It is a simplified BFD state machine that shortens the negotiation time and improves network-wide flexibility.
The initiator is responsible for detection and runs both an SBFD state machine and a detection mechanism. Because the state machine has only up and down states, the initiator can send packets carrying only the up or down state and receive packets carrying only the up or AdminDown state.
The initiator starts by sending an SBFD packet carrying the down state to the reflector. The destination and source port numbers of the packet are 7784 and 4784, respectively; the destination IP address is a user-configured address on the 127 network segment; the source IP address is the locally configured LSR ID.
The reflector does not have any SBFD state machine or detection mechanism. For this reason, it does not proactively send SBFD Echo packets, but rather, it only reflects SBFD packets.
After receiving an SBFD packet from the initiator, the reflector checks whether the SBFD discriminator carried in the packet matches the locally configured global SBFD discriminator. If they do not match, the packet is discarded. If they match and the reflector is in the working state, the reflector reflects back the packet. If they match but the reflector is not in the working state, the reflector sets the state to AdminDown in the packet.
The destination and source port numbers in the looped-back SBFD packet are 4784 and 7784, respectively; the source IP address is the locally configured LSR ID; the destination IP address is the source IP address of the initiator.
SBFD Return Packet Forwarding over a Tunnel
In an SBFD for SR-MPLS scenario, the packet from an SBFD initiator is forwarded to an SBFD reflector along an SR-MPLS LSP, and the return packet from the SBFD reflector is forwarded to the SBFD initiator along a multi-hop IP path or an SR-MPLS tunnel. If the return packet is forwarded along the shortest multi-hop IP path, multiple SR-MPLS LSPs may share the same SBFD return path. In this case, if the SBFD return path fails, all SBFD sessions go down, causing service interruptions. Services can recover only after the SBFD return path converges and SBFD goes up again.
If SBFD return packet forwarding over a tunnel is supported:
In an inter-AS SR-MPLS TE tunnel scenario, if SBFD return packets are forwarded over the IP route by default, the inter-AS IP route may be unreachable, causing SBFD to go down. In this case, you can configure the SBFD return packets to be forwarded over the SR-MPLS TE tunnel.
SBFD for SR-MPLS BE (SR LSP) and SBFD for SR-MPLS TE are typically used in SBFD for SR-MPLS scenarios.
SBFD for SR-MPLS BE
Figure 3 shows a scenario where SBFD for SR-MPLS BE is deployed. Assume that the SRGB range for all the PEs and Ps in Figure 3 is [16000–16100]. The SR-MPLS BE path is PE1->P4->P3->PE2.
With SBFD enabled, if a link or a P device on the primary path fails, PE1 rapidly detects the failure and switches traffic to another path, such as the VPN FRR protection path.
SBFD for SR-MPLS TE LSP
Figure 4 shows a scenario where SBFD for SR-MPLS TE LSP is deployed. The primary LSP of the SR-MPLS TE tunnel from PE1 to PE2 is PE1->P4->P3->PE2, which corresponds to the label stack {9004, 9003, 9005}. The backup LSP is PE1->P1->P2->PE2.
After SBFD is configured, PE1 rapidly detects a failure and switches traffic to a backup SR-MPLS TE LSP once a link or P on the primary LSP fails.
SBFD for SR-MPLS TE Tunnel
If SBFD for SR-MPLS TE tunnel is not configured, the default tunnel status keeps Up, and the effective status cannot be determined.
If SBFD for SR-MPLS TE tunnel is configured but SBFD is administratively down, the tunnel interface status is unknown because SBFD is not working in this case.
If SBFD for SR-MPLS TE tunnel is configured and SBFD is not administratively down, the tunnel interface status is the same as the SBFD status.