With the help of synchronization between LDP and static routes, you can switch traffic from the faulty active link to the standby link by suppressing the activation of static routes and delay traffic switchback to the active link, ensuring that LDP is synchronized with static routes.
Synchronization between LDP and static routes is used to minimize packet loss during traffic switchover and switchback on the network with primary and standby links. As shown in Figure 1, on a network with primary and standby links, a static route is configured between LSRA and LSRD, and an LSP is established between the two devices based on the static route. Normally, Link A is preferred.
Switchover scenario
If the link between LSRA and LSRB is working properly but the LDP session between LSRA and LSRB goes Down, the static route on the active link LinkA remains reachable but the LSP on Link A is deleted. Meanwhile, the static route on the standby link LinkB is not available, so no LSP can be established on LinkB, which causes traffic loss on the deleted LSP.
After synchronization between LDP and static routes is enabled on LSRA, the LDP session between LSRA and LSRB goes Down, causing the static route on LinkA to become unreachable. The LDP session between LSRA and LSRC goes Up, causing the static route on LinkB to become reachable. As a result, the LSP switches from LinkA to LinkB so that traffic on the LSP is not interrupted.
Switchback scenario
If the link between LSRA and LSRB fails, both the static route and the LSP on LinkA switch to LinkB. After the link between LSRA and LSRB recovers, the static route precedes the LSP and switches back to LinkA. This is because a static route converges faster than LDP. In this case, the backup LSP on LinkB cannot be used. Meanwhile, the LSP is not established on LinkA, causing the LSP traffic interruption.
After synchronization between LDP and static routes is enabled on LSRA, the static route on LinkA does not become reachable until the LDP session between LSRA and LSRB goes Up. This configuration enables the static route and the LSP to switch back to LinkA at the same time, which prevents traffic loss.