No LFA on a Four-Router OSPF Ring
A regional ISP runs a four-router OSPF ring: R1-R2-R3-R4-R1. Every link is point-to-point with cost 10, and each router has a loopback in area 0. R1 advertises a customer prefix 10.60.7.0/24 as a passive interface. The design requires sub-50 ms protection for that prefix at R2 if the R1-R2 link fails. The engineer enabled loopfree-alternate on every OSPF interface and remote-lfa on the ring interfaces, but show router ospf interface "toR3" loopfree-alternate on R2 lists no protection for 10.60.7.0/24. The physical alternate path R2-R3-R4-R1 exists, but R3's shortest path to the prefix is back through R2. All routers run SR OS with segment routing disabled. Traffic is currently forwarded only on the primary path. The operations team does not want to change the primary link costs because they are tied to a business SLA.
1. Using the LFA inequality, explain why R3 is not a loop-free alternate for R2 for prefix 10.60.7.0/24.
Read the worked answer
The LFA condition for a neighbor N, source S, and destination D is:
Distance_opt(N, D) < Distance_opt(N, S) + Distance_opt(S, D)
Here S is R2, N is R3, and D is 10.60.7.0/24 on R1. With all ring links at cost 10:
- Distance_opt(R3, D) = 20, via R3-R2-R1
- Distance_opt(R3, R2) = 10
- Distance_opt(R2, D) = 10
The inequality becomes 20 < 10 + 10, or 20 < 20, which is false. R3's shortest path to the prefix passes through R2, the router being protected. If R2 forwarded traffic to R3 after the R1-R2 failure, R3 would send it back to R2, creating a loop. That is why show router ospf interface "toR3" loopfree-alternate lists no protection. R4 is not a direct neighbor, so it cannot be a basic LFA next hop for R2.
2. Evaluate the available repair options without changing the primary R2-R1 cost. Which option is feasible in this SR OS network as built, and which requires an additional protocol or feature?
Read the worked answer
Basic LFA is not feasible because the only direct alternate neighbor, R3, fails the loop-free test. Two options remain: remote LFA and TI-LFA.
Remote LFA can use a PQ node. R2's P-space after the R2-R1 failure includes R3 and R4. The Q-space of the prefix includes R4 and R1, but not R3 because R3 reaches the prefix through R2. R4 is therefore a PQ node. R2 can tunnel repair traffic to R4, and R4 forwards it to R1 without crossing the failed link. However, R4 is not a direct neighbor, so rLFA needs a tunnel to R4. With segment routing disabled, that means an LDP or RSVP tunnel must already exist. If no such tunnel exists, rLFA cannot be deployed as built.
TI-LFA requires segment routing and a segment-routing label stack. It computes the post-convergence path and encodes a repair path, so it does not depend on the basic LFA inequality. In this network, enabling SR and TI-LFA on the ring interfaces would protect the prefix without changing the primary cost.
A third option is to change metrics on the alternate path, for example lower R3-R4 and R4-R1 so R3's path to the prefix no longer goes through R2. That would satisfy the inequality, but it changes ring traffic patterns and may violate the SLA just as much as changing the primary cost.
3. If the ISP enables segment routing and TI-LFA, what should they verify on R2 to confirm protection is active for the prefix?
Read the worked answer
First verify that the OSPF segment-routing configuration is active and that R2 has learned node SIDs for R1, R3, and R4, using show router ospf interface and show router segment-routing commands. Then check show router ospf interface "toR3" loopfree-alternate and the TI-LFA detail to confirm that a repair path exists for 10.60.7.0/24 and that the repair label stack resolves through R4 rather than through R1.
Next, verify the forwarding entry for the prefix with show router route-table 10.60.7.0/24 and the OSPF alternate route output. The active next hop should still be R1, with an LFA/TI-LFA backup next hop and a label stack. Finally, test with a controlled failure of the R2-R1 link and confirm that traffic reaches R1 through R2-R3-R4-R1 within the sub-50 ms budget. If the repair path uses a node SID for R4, confirm that R4's SID is reachable and that the label stack does not loop back through R2.