What is OSPF Loop-Free Alternate (LFA) Fast Reroute (FRR) ?
What is OSPF Loop-Free Alternate (LFA) Fast Reroute (FRR) ?
OSPF (Open Shortest Path First) is a routing protocol that establishes routing paths within a network. In an OSPF network, regions are used to organize logically related routers. Ideally, all areas should be physically connected to the backbone (Area 0), which serves as a centralized point for routing information.⭐Related : Top OSPF Protocol Interview Questions and Answers
⭐Related : OSPF protocol : OSPF Packet Types
What is OSPF Loop-Free Alternate (LFA) Fast Reroute (FRR) ?
OSPF Loop-Free Alternate (LFA) Fast Reroute (FRR) enables OSPF to quickly move (within 50 ms) to an alternate link when the main path fails.
Without LFA FRR, OSPF have to re-run SPF to find a new path when the primary path fails. But with the use of OSPF Loop-Free Alternate (LFA) Fast Reroute (FRR), OSPF pre-computes a backup path and this backup path is installed in the routing table and forwarding table of the router.
So, When a failure is detected, the router immediately starts using the LFA path instead of having to recalculate a new route from scratch (which can take longer). OSPF achieves LFA by leveraging the fact that all routers in the same OSPF area share the same Link-State Database (LSDB). This allows a router to virtually become any other router in the area and calculate a backup path from that perspective.
There are two fundamental ways to calculate LFAs: per-link and per-prefix. Per-link LFA assigns the same backup next hop to all prefixes that share the same broken link. Per-prefix LFA allows for more specific choice of LFAs. LFA FRR is not always possible. In some network topologies, a loop-free alternate path might not exist.
Configuration Example OSPF LFA FRR
Let's take an network topology showing R1 router is connected to R2, R3 and R4 router and the further R2, R3 and R4 routers are connected to R5 router. So there are three different paths to reach from R1 to R5.
Verify the routing table of R1 for the prefix 1.1.1.0/24. According to the configured cost, R1 is using R2 20.20.20.2 as the next hop.
At this level without LFA, if R2 fails, R1 will re-perform SPF to construct a new path; however, because the prefix 1.1.1.0/24 was learned from another area, R1 will only run a partial search.
Verify that R1 selects R2 as the primary path and R3 as a backup path.
Now check the CEF forwarding table
R1>enable
R1# configure terminal
R1(config)# router ospf 1
R1(config-router)#fast-reroute keep-all-paths
R1(config-router)# exit
R1#
Now check the CEF forwarding table
Important points to consider
- OSPF achieves LFA by leveraging the fact that all routers in the same OSPF area share the same Link-State Database (LSDB). This allows a router to virtually become any other router in the area and calculate a backup path from that perspective.
- There are two main methods for calculating LFAs: per-link and per-prefix. Per-link LFA assigns the same backup next hop to all prefixes that use the same failing link. Per-prefix LFA can be more specific in choosing LFAs.
- LFA FRR is not always possible. In some network topologies, a loop-free alternate path might not exist.
Continue Reading...
- OSPF Show Commands on Cisco, Juniper, Huawei, HP and Arista Networks devices
- How to Optimize Your MPLS VPN with OSPF Sham-Link
- OSPF protocol : OSPF Packet Types
- OSPF NSSA Area introduction and Configuration
- Facts about DR and BDR selection in OSPF
- OSPF and BGP configuration setup on a vEdge Router
- OSPF Configuration Guide : OSPF Distance External Command Behavior
- A quick difference: OSPF Vs IS-IS Dynamic Routing Protocol
- Routing: Configuration OSPF To Filter Type-5 LSAs
- Introduction to OSPFv3 AS External LSA Route Calculation
- Differences between OSPFv3 and OSPFv2
- OSPF Over non-Broadcast Networks ( NBMA) basics and Configuration
- OSPF Configurations in Huawei Routers
- Quick tips to OSPF Routing Protocol for Network Engineers
- OSPF Basic configuration Step by step on Cisco Routers
- OSPF Basics : Simple points to study
- OSPF prefix-suppression- Configurations and Verification
- OSPF LSA-ID Conflict : %OSPF-4-CONFLICTING_LSAID
- Cisco IOS-XE: OSPF stuck in INIT - LLS TLV
- Configure Redistribution of iBGP Routes Into OSPF
- Cisco and Juniper Routers : OSPF point to multipoint configurations