Micro-Loop Avoidance¶
After a link or node failure, IGP routers recompute their forwarding tables at different times. During this convergence window (200ms-2s), routers may temporarily disagree on the best path — creating transient forwarding loops called micro-loops.
What Are Micro-Loops?¶
The Problem¶
When a topology change occurs, each router independently runs SPF and updates its FIB. Routers closer to the failure detect and converge faster than distant routers. This temporal mismatch creates loops:
graph LR
A[R1 - Converged] -->|Sends to R2| B[R2 - Not yet converged]
B -->|Sends back to R1| A
C[R3] -->|X FAIL| D[R4] Timeline of a micro-loop:
- T=0ms: Link R3-R4 fails
- T=10ms: R3 detects failure, reconverges, now forwards via R1
- T=10-500ms: R1 has not yet reconverged — still points to R2 for the destination
- R1 → R2 → R1 → R2... — packets loop until R1 and R2 both converge
- T=500ms-2s: All routers converge, loop stops
Impact¶
| Effect | Description |
|---|---|
| Packet loss | TTL expiry after 64-255 hops in the loop |
| Bandwidth waste | Looping packets consume link capacity |
| Jitter | Surviving traffic experiences delay spikes |
| CPU load | High packet rate from loops stresses forwarding engines |
TI-LFA vs Micro-Loop Avoidance¶
TI-LFA and micro-loop avoidance solve different phases of convergence:
graph LR
FAIL[Failure] --> TILFA[TI-LFA Backup<br/>0 - 50ms]
TILFA --> MLA[Micro-Loop Window<br/>50ms - 2s]
MLA --> CONV[Fully Converged] | Aspect | TI-LFA | Micro-Loop Avoidance |
|---|---|---|
| Purpose | Instant backup path at failure-adjacent node | Prevent loops during network-wide convergence |
| Coverage window | 0-50ms (detection + switchover) | 50ms-2s (IGP convergence) |
| Scope | Local to the detecting router | Network-wide coordination |
| Prerequisite | SRv6 SIDs | TI-LFA (to carry traffic during delay) |
Without TI-LFA, micro-loop avoidance causes blackholes
Micro-loop avoidance works by delaying FIB updates. Without TI-LFA providing a backup path during that delay, traffic would be blackholed. Always enable TI-LFA first.
Solution 1: Local Delay (Recommended)¶
The simplest and most widely deployed approach. Each router delays its FIB update by a configurable timer after receiving a topology change notification. TI-LFA carries traffic during the delay.
How It Works¶
- Router receives LSP/LSA indicating topology change
- Router runs SPF and computes new paths, but does not update FIB yet
- TI-LFA backup path carries traffic (installed at failure detection time)
- After the delay timer expires (e.g., 5000ms), FIB is updated
- By this time, all routers have converged — no loop
Why SRv6 Makes This Work¶
In traditional IP/LDP networks, delaying the FIB update means traffic is blackholed because there's no backup path. With SRv6 + TI-LFA:
- TI-LFA pre-computes a loop-free backup path using SRv6 SIDs
- Traffic switches to the backup in <50ms
- The backup carries traffic for the entire delay window
- When FIB updates, traffic moves to the new primary path seamlessly
Configuration¶
Solution 2: Explicit Post-Convergence Path¶
Instead of delaying the FIB update, the router immediately installs the new path but encodes it as an explicit SRv6 segment list that is loop-free by construction (source-routed paths cannot loop).
How It Works¶
- Router computes the post-convergence shortest path
- Encodes the path as an SRv6 segment list (node SIDs of intermediate hops)
- Installs this explicit path immediately — no delay needed
- After all routers converge, switches to the native shortest path (removes explicit segments)
Advantage¶
No delay timer needed — convergence is immediate and loop-free. The trade-off is slightly more SRH overhead during the convergence window.
Solution 3: Ordered FIB (oFIB)¶
Routers update their FIBs in a coordinated order based on their distance from the failure. Routers farther from the failure update first, then progressively closer routers update.
| Pros | Cons |
|---|---|
| No SRv6 dependency | Slower convergence (ordered updates) |
| Works with any forwarding plane | Complex to implement correctly |
| No additional header overhead | Not widely deployed |
oFIB is rarely used in practice
Most SRv6 deployments use local delay (Solution 1) because it is simpler and TI-LFA is already required for fast reroute.
Comparison¶
| Approach | Convergence Speed | Complexity | SRv6 Required | Header Overhead |
|---|---|---|---|---|
| Local Delay | Delayed (configurable) | Low | Yes (TI-LFA) | None |
| Explicit Path | Immediate | Medium | Yes (SIDs) | Temporary SRH |
| Ordered FIB | Slow (ordered) | High | No | None |
Verification¶
Deployment Recommendations¶
- Enable TI-LFA first — micro-loop avoidance depends on TI-LFA for traffic protection during the delay window
- Start with local delay — simplest approach, 5000-10000ms is a safe default
- Tune the delay timer — measure your network's worst-case convergence time; set the delay to 2x that value
- Test with controlled failures — shut a link and verify no packet loss during the micro-loop window
- Monitor with telemetry — track convergence events and micro-loop avoidance activations
Further Reading¶
- TI-LFA — Sub-50ms fast reroute (prerequisite for micro-loop avoidance)
- Performance & Scaling — Convergence benchmarks
- Telemetry — Monitoring convergence events
- RFC 9855 — TI-LFA Using Segment Routing
References¶
- RFC 9855 - Topology Independent Fast Reroute Using Segment Routing - TI-LFA standard that enables micro-loop avoidance in SRv6 networks
- RFC 8333 - Micro-loop Prevention by Introducing a Local Convergence Delay - Defines the local delay mechanism for micro-loop prevention
- Cisco IOS-XR: Configure Microloop Avoidance - IOS-XR configuration guide for micro-loop avoidance with segment routing