So I finally got some time after a while to write something. In this post we will be looking at Topology Independent LFA aka TI-LFA. We will also compare TI-LFA with LFA, rLFA and TE-FRR. If you don’t already have familiarity with LFA’s or TE-FRR then take a look at my previous posts on TE design and IP FRR and Microloops.
The premise here is Fast-Reroute and we already know that we could use RSVP-TE or LFA to achieve that. So does TI-LFA in the world of Segment Routing has anything new to offer ? . Let’s take a look.
Problem: LFA’s doesn’t guarantee 100% Coverage
We already know that coverage in LFA’s is “Game of Thrones Metrics”. The most commonly cited topology is the ring topology when it comes to illustrating LFA coverage. So lets take a look at the below ring topology.
In the below fig. 1, R2 (Source) will send R6 (Destination) via R1. If a failure happens at the link between R1-R2 then it cannot send it to R3 as a FRR backup for R1-R2 as R3 will send the traffic back to R2 (S). Basically R3 doesn’t meet inequality#1 (3 < 1 + 2) i.e. R3’s best path is through failed link. So plain LFA’s won’t work and that’s where remote LFA (rLFA) comes into the picture to solve this kind of situation.
In the case of rLFA’s, we try to find PQ Nodes i.e. nodes with overlap between Extended P-Space and Q-Space.
Extended P-Space: The extended P-space of the protecting router with respect to the protected link is the union of the P-spaces of the neighbors in that set of neighbors with respect to the protected link. In below fig. 2, “Extended P-Space “contains the routers that are R2 (S)’s direct neighbor, i.e. R3 can reach without using the R2 (S) -R1 link which is R4 and R5 node.
Q-SPACE: Q-space of a router with respect to a protected link is the set of routers from which that specific router that can be reached without any path (including ECMP Splits) transiting that protected link. In below fig. 2, “Q-Space “contains the routers that normally reach R6 (D) without using the R2 (S) -R1 link which is R1, R5 and R4 nodes.
PQ-Node: A router that is in both Extended P-Space and Q-Space is a PQ-node. Any router which is a PQ-node can be a remote LFA candidate, i.e. the candidate router to whom, if R2 (S) can send the packet, it will forward the packet to the destination without traversing through R2 (S) -R1 link. In our case R4 and R5 are the PQ nodes and are considered remote LFA candidates for R2 (S).
In below fig. 2, our PQ nodes are R4 and R5.
So in the case of rLFA, R2 (S) will use the nearest PQ node as its backup path in the event of R1-R2 link failure. The way this will be achieved by R2 (S), is by stacking two LDP labels. Outer LDP label X, is the label to reach R4 and inner LDP label Y to reach R6 (D) from R4. With the help of the targeted LDP session, R2 (S) can know what LDP label (Y) is used by R4 for sending traffic towards R6 (D).
Which brings up the point that in order for the PLR to know what label is being used by PQ node for destination (D), it has to establish a Targeted LDP session with PQ node to get the FEC to label mappings.
Now what if we increase the cost between R6 (D) and R5 then we don’t have any nodes in PQ space which means rLFA cannot provide coverage in this situation.
So we have established two things so far:
1) rLFA requires targeted LDP sessions
2) We still don’t have 100% coverage.
In case of TI-LFA’s:
1) No Need of Targeted LDP sessions
So the first improvement SR brings here is that there isn’t a need for Targeted LDP sessions anymore. If we revisit our previous fig. 3, In the case of SR, R2 (S) will stack two labels, first is the Node-SID label of R6 (D) and top label as Node-SID label of R4 i.e. 16004. Pretty simple right? As you can see SR brings simplicity by getting rid of Targeted LDP sessions.
2) Double Segment Protection
As we saw earlier that in the case where there is no overlap between P and Q space then rLFA doesn’t provide coverage. TI-LFA can provide coverage in these kind of situations by steering the packets from P-Space to Q-Space nodes.
In the below Fig.6, Assume that the adjacency SID is 24065 for R5-R6 link. Then R2 (S) can form a three label stack with first two top labels are used to steer the packets from P to Q space nodes and third label is the destination prefix-sid label.
3) Path Optimality
Another thing which TI-LFA brings is the path optimality from PLR perspective. TI-LFA’s always prefers the post-convergence path from a PLR point of view. So let’s take a look
In fig. 7, when the link between P4-P5 fails, we can see the backup paths taken in the case of LFA and RSVP-TE.
In the case of RSVP-TE FRR (link protection, facility backup), traffic will circle all the way back to the next-hop (P5). Obviously it’s sub-optimal, but is a temporary condition till the headend PE1 realizes about the failure.
In the case of LFA, you can see that the path goes via P4–P2 link which has a higher metric. Considering that metrics represents bandwidth of a link in a network, in the event of a failure, traffic will be going through low bandwidth links which could cause congestion and packet drops on the low capacity link. In this case it would be a better if PLR i.e. P4 can use the post-convergence path from its perspective, i.e. via P1-P2-P3 as the backup path, but in the case of LFA, P4 can’t use P1 as a backup path as P1’s best path is via P4 (loop will occur).
In the case of TI-LFA, it’s possible for the PLR i.e. P4 to use the post-convergence path which is via P1-P2-P3-PE2. In the below fig.8, PLR P4 will send packets with two stack labels with the top label to get to P2 and the inner prefix-sid for the destination. Path for P2 from P4 perspective is via P1. When P1 sees the top label for P2, it pops the label and send it towards P2 and from there you already know it will follow all the way to the destination.So you can see in the case of TI-LFA, the optimal path is used from a perspective of PLR.
We saw in this post that TI-LFA’s brings 100% topology coverage, simplicity and path optimality. I hope this post has given some deeper level insights to TI-LFA.