LDP auto fast reroute (FRR) backs up local interfaces to provide
the fast reroute function for MPLS networks.
Background
On an MPLS network with both active and standby links, if an active
link fails, IGP routes re-converge, and the IGP route of the standby
link becomes reachable. An LDP LSP over the standby link is then established.
During this process, some traffic is lost. To minimize traffic loss,
LDP Auto FRR is used.
On the network enabled with LDP Auto FRR,
if an interface failure (detected by the interface itself or by an
associated BFD session) or a primary LSP failure (detected by an associated
BFD session) occurs, LDP FRR is notified of the failure and rapidly
forwards traffic to a backup LSP, protecting traffic on the primary
LSP. The traffic switchover minimizes the traffic interruption time.
Implementation
LDP LFA FRR
LDP LFA FRR is implemented based
on IGP LFA FRR's LDP Auto FRR. LDP LFA FRR uses the liberal
label retention mode to obtain a liberal label, applies for a forwarding
entry associated with the label, and forwards the forwarding entry
to the forwarding plane as a backup forwarding entry to be used by
the primary LSP. If an interface detects a failure of its own, bidirectional
forwarding detection (BFD) detects an interface failure, or BFD detects
a primary LSP failure, LDP LFA FRR rapidly switches traffic to a backup
LSP to protect traffic on the primary LSP.
Figure 1 Typical usage scenario for LDP Auto FRR (triangle topology)

Figure 1 shows a typical usage scenario for
LDP Auto FRR. The preferred LSRA-to-LSRB route is LSRA-LSRB and the
second optimal route is LSRA-LSRC-LSRB. A primary LSP between LSRA
and LSRB is established on LSRA, and a backup LSP of LSRA-LSRC-LSRB
is established to protect the primary LSP. After receiving a label
from LSRC, LSRA compares the label with the LSRA-to-LSRB route. Because
the next hop of the LSRA-to-LSRB route is not LSRC, LSRA preserves
the label as a liberal label.
If the backup route corresponding
to the source of the liberal label for LDP auto FRR exists, and its
destination meets the policy for LDP to create a backup LSP. LSRA
can apply a forwarding entry for the liberal label, establish a backup
LSP as the backup forwarding entry of the primary LSP, and send the
entries mapped to both the primary and backup LSPs to the forwarding
plane. In this way, the primary LSP is associated with the backup
LSP.
LDP Auto FRR is triggered when the interface detects faults
by itself, BFD detects faults in the interface, or BFD detects a primary
LSP failure. After LSP FRR is complete, traffic is switched to the
backup LSP based on the backup forwarding entry. Then, the route is
converged to LSRA-LSRC-LSRB. An LSP is established on the new LSP
(the original backup LSP), and the original primary LSP is torn down,
and then the traffic is forwarded along the new LSP over the path
LSRA-LSRC-LSRB.
LDP Remote LFA FRR
LDP LFA FRR cannot calculate backup paths
on large networks, especially ring networks, which fails to meet reliability
requirements. On a common ring network shown in
Figure 2, PE1-to-PE2 traffic
is transmitted along the shortest path PE1->PE2 based on the path
cost. If the link between PE1 and PE2 fails, PE1 first detects the
fault. PE1 then forwards the traffic to P1 and expects P1 to forward
the traffic to P2 and finally to PE2. At the moment when the fault
occurs, P1 does not detect the fault. After the traffic forwarded
by PE1 arrives at P1, P1 returns the traffic to PE1 based on the path
cost. In this case, a routing loop occurs between PE1 and P1. A large
number of loop packets are transmitted on the link between PE1 and
P1. As a result, packets from PE1 to P1 are discarded due to congestion.
Figure 2 Typical LDP Auto FRR usage scenario – square-shaped topology
(1)

To address this issue, LDP Remote LFA
FRR is used. Remote LFA FRR is implemented based on IGP Remote LFA
FRR's (
IS-IS Auto FRR) LDP Auto FRR.
Figure 3 illustrates the typical LDP Auto FRR usage scenario. The primary
LDP LSP is established over the path PE1 -> PE2. Remote LFA FRR establishes
a Remote LFA FRR LSP over the path PE1 -> P2 -> PE2 to protect the
primary LDP LSP.
Figure 3 Typical LDP Auto FRR usage scenario - ring topology

The implementation is as follows:
- An IGP uses the Remote LFA algorithm to calculate a Remote LFA
route with the PQ node (P2) IP address and the recursive outbound
interface's next hop and then notifies the route management module
of the information. For the PQ node definition, see IS-IS Auto FRR.
- LDP obtains the Remote LFA route from the route management module.
PE1 automatically establishes a remote LDP peer relationship with
the PQ node and a remote LDP session for the relationship. PE1 then
establishes an LDP LSP to the PQ node and a Remote LFA FRR LSP over
the path PE1 -> P2 -> PE2. For information about how to automatically
establish a remote LDP session, see LDP Session.
- LDP-enabled PE1 establishes an LDP LSP over the path PE1 -> P1
-> P2 with the recursive outbound interface's next hop. This
LSP is called a Remote LFA FRR Recursion LSP.
If PE1 detects a fault, PE1 rapidly switches traffic to the Remote
LFA FRR LSP.