When using MPLS VPN, there are a couple of things we have to consider:
- We have PE routers that run MP-BGP to exchange IP prefixes from customers. We use a loopback interface as the next hop in MP-BGP.
- We have P and PE routers running an IGP to find the shortest path to the MP-BGP next hop.
- We have PE and P routers running LDP to exchange labels for IP prefixes in the core (that includes the labels for the MP-BGP next hops).
So when it comes to end-to-end convergence, it depends on the convergence times of:
Let’s look at an example:
The LSP we are about is between the two PE1 routers. The shortest path for our IGP is from PE1 > P1 > P2 > PE2.
When the link between P1 and P2 fails, the IGP has to find the new best path (P1 > P3 > P4 > P2). How long this takes depends on the IGP, and this can be tuned.
What about LDP? When a link fails, there is no problem because, by default, LDP routers use something called Liberal Retention Mode which means that they store labels from all neighbors. When the IGP has figured out a new best path, the RIB gets updated and the LIB gets updated.
When the link between P1 and P2 is re-established, we might have a convergence problem though. Both the IGP and LDP have to form a new neighbor adjacency on this link and it is possible that the IGP converges faster than LDP. When that happens, regular IP packets that are unlabeled get sent and if those IP packets are from the CE routers, they get dropped since P2 doesn’t have a route.
There are some solutions to prevent this. There is LDP IGP synchronization which basically means the IGP metric is set to the highest metric until LDP tells the IGP that is has converged. There is also LDP session protection where LDP uses unicast to attempt to keep the neighbor adjacency with its neighbor. In this case, P1 would go through P3 > P4 to keep its neighbor adjacency with P2.
The exact convergence times depend on the IGP and some tuning. For example, you can implement things like BFD or OSPF LFA. For BGP, there’s BGP PIC and BGP Additional Paths.
There is also MPLS TE FRR.
If you want some of this in action, you can configure the topology above and then flap the link in between P1 and P2 while having the following two debugs enabled:
P4#debug ip routing
IP routing debugging is on
P4#debug mpls ldp bindings
LDP Label Information Base (LIB) changes debugging is on
This will show you changes to the RIB and LIB in action.
I hope this helps to understand the things that are going on behind the scenes instead of just telling "It takes X (milli)seconds to complete