SBFD for SR
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.
SBFD Principles
The initiator that performs detection runs the SBFD state machine and mechanism. The state machine has only the Up and Down states. The initiator sends packets only in the Up or Down state and receives packets only in the Up or Admin Down state.
The initiator first sends an SBFD packet with the initial state of Down and destination port number 7784 to the reflector.
The reflector runs no SBFD state machine or mechanism. It does not proactively send SBFD Echo packets. The reflector only loops SBFD packets to the initiator.
The reflector receives SBFD packets sent by the initiator and checks whether the received SBFD discriminator is the same as the locally configured global SBFD discriminator. If they do not match, the packets are discarded. If they match and the reflector is in the working state, the reflector constructs looped SBFD packets. If they match and the reflector is not in the working state, the reflector sets the status to Admin Down in packets.
SBFD State Machine on the Initiator
- Initial state: The initiator sets the initial state to Down in an SBFD packet to be sent to the reflector.
- Status migration: After receiving a looped packet carrying the Up state, the initiator sets the local status to Up. After the initiator receives a looped packet carrying the Admin Down state, the initiator sets the local status to Down. If the initiator does not receive a packet looped by the reflector before the timer expires, the initiator also sets the local status to Down.
- Status holding: When the initiator is in the Up state and receives a looped packet carrying the Up state, the initiator remains the local state of Up. When the initiator is in the Down state and receives a looped packet carrying the Admin Down state or receives no packet after the timer expires, the initiator remains the local state of Down.
Typical SBFD Applications
When SBFD applies to SR scenarios, SBFD for SR LSP and SBFD for SR-TE LSP can be used. When SBFD monitors SR tunnels, the initiator-to-reflector path uses MPLS label forwarding, and the reflector-to-initiator path uses multi-hop IP forwarding.
SBFD for SR LSP
In the following example, VPN traffic is iterated to an SR LSP. SBFD for SR LSP is configured, as shown in Figure 2-51.
Assume that the SRGB scope [16000-16100] is set on each PE and P on the network shown in Figure 2-51. A, CE1, CE2, and E are deployed on the same VPN, and CE2 advertises a route to E. PE2 assigns the VPN label to E. PE1 installs the route to E and the VPN label. When A sends packets destined for E and the packets arrive at PE1, PE1 adds a VPN label into the packets based on the VPN to which the packets belong, iterates the packets to an SR LSP based on the destination IP address carried in the packets, adds an SR label of 16100, and forwards the packets hop by hop along the path PE1->P4->P3->PE2.
After SBFD is configured, PE1 rapidly detects a fault and switch traffic to a backup SR LSP once a link or P on the primary LSP fails.
SBFD for SR-TE LSP
In the following example, VPN traffic is iterated to an SR-TE LSP, in the scenario of which SBFD for SR-TE LSP is used.
A, CE1, CE2, and E are deployed on the same VPN, and CE2 advertises a route to E. PE2 assigns the VPN label to E. PE1 installs the route to E and the VPN label.
The path of the SR-TE tunnel from PE1 to PE2 is PE1 -> P4 -> P3 -> PE2, and the label stack is {9004, 9003, 9005}. When A sends a packet destined for E, PE1 finds the packet's outbound interface based on label 9004 and adds label 9003, label 9005, and the inner VPN label assigned by PE2. After SBFD is configured, PE1 rapidly detects a fault and switches traffic to a backup SR-TE LSP once a link or P on the primary LSP fails.