Skip to content
LinkState
Go back

BGP PIC contains faster and fails faster

Introduction to BGP PIC

BGP Prefix Independent Convergence (PIC) pre‑computes and installs an alternate forwarding path for each BGP prefix before the primary path fails. The alternate is stored in the FIB as a prefix‑independent entry keyed by the next‑hop or outgoing interface. When the primary next‑hop becomes unreachable, the router switches traffic to the backup without waiting for BGP withdrawals, best‑path recomputation, or per‑prefix FIB updates.

This decouples forwarding‑plane convergence from control‑plane convergence, affecting two operator‑relevant metrics:

  1. Failover speed – time from primary‑path failure to traffic restoration via a valid alternate.
  2. Bad‑path installation speed – window during which traffic may follow an incorrect or looping path after a route leak before the network suppresses the bad route.

Faster failover improves availability; slower bad‑path installation reduces exposure to black‑holing, sub‑optimal routing, or security impact. PIC directly influences failover speed and can also affect bad‑path installation when a leak is learned as a valid alternate.


BGP PIC Core Functionality

Architecture

ComponentFunctionLocation
Primary Path InstallationStandard BGP best‑path installs prefix → next‑hop in RIB and FIB.RIB → FIB (per‑prefix)
Backup Path ComputationFor each primary path, compute one or more loop‑free alternates (LFAs) using BGP tie‑breaking (local‑pref, AS‑path length, MED, …) but ignoring the prefix. Backup identified by the next‑hop/interface used if the primary next‑hop fails.RIB (secondary attribute) or separate PIC table
Backup Path InstallationInsert backup next‑hop into FIB as a prefix‑independent entry (keyed by backup next‑hop or interface). On primary next‑hop loss, forwarding plane performs a fast lookup and switches to backup.FIB (prefix‑independent)

Because the same backup next‑hop can protect many prefixes sharing the primary next‑hop, state scales with unique next‑hops, not prefix count.

Convergence Comparison

Conventional BGP after a primary next‑hop failure:

  1. Physical/link failure detection (sub‑second).
  2. BGP peer notification (session may stay up; hold time expires or fast‑external‑fallover triggers).
  3. Withdrawal propagation.
  4. Local processing – RIB removal, per‑prefix best‑path selection, FIB reinstall.
  5. FIB update for each affected prefix.

Steps 3‑5 repeat per prefix, yielding convergence time that grows with prefix count and best‑path complexity.

With BGP PIC:

  1. Physical/link failure detection (same).
  2. Next‑hop reachability check – forwarding plane detects primary next‑hop loss via ARP/ND failure or carrier loss (~10 ms).
  3. Immediate failover to pre‑installed backup via prefix‑independent FIB lookup (sub‑microsecond).

No BGP UPDATE processing or per‑prefix recomputation is required, making convergence largely independent of prefix count.

Configuration & Deployment

VendorCLI KnobDefaultRemarks
Juniper (JunOS)set routing-options bgp picDisabledGlobal or per‑instance; IPv4/IPv6; backup computed with same BGP decision process as primary.
Cisco IOS‑XRbgp pic core / bgp pic edgeDisabledcore protects core‑node failures; edge protects edge‑link failures; may require PIC license.
Nokia SR OSbgp picDisabledIPv4/IPv6; configurable max backup paths per prefix.
Arista EOSbgp picDisabledImplemented via bgp bestpath pic; ECMP‑aware LFA computation.

Deployment considerations


Benchmarking BGP PIC for Failover and Leak Scenarios

Testbed Setup

To isolate PIC’s effect, keep all variables constant except the PIC feature toggle. A minimal topology:

[PE1]---(L1)---[P1]---(L2)---[PE2]
   |                       |
   | (BGP session)         | (BGP session)
   +-----------------------+

Measuring Correct Failover Speed

Baseline (PIC disabled)

  1. Disable PIC, shut down L2 on P1.
  2. Record T_fail.
  3. BGP session P1‑PE2 stays up until hold timer expires (9 s) or a withdrawal is sent after the peer detects link loss (implementation‑dependent).
  4. Router processes withdrawal, runs best‑path selection for each of the 100 k prefixes, and installs the new path (via PE1) into the FIB.
  5. Traffic resumes after the last prefix FIB update.

Measured failover interval:
T_recover - T_fail ≈ (hold time or BGP withdrawal propagation) + (per‑prefix RIB/FIB update time).
On a typical Xeon‑based router, per‑prefix update for 100 k prefixes ≈ 120 ms (≈1 µs per prefix for RIB delete + best‑path + FIB insert). Adding a 9 s hold yields ≈ 9.12 s failover.

With PIC enabled

  1. Enable bgp pic (vendor‑specific equivalent) on P1.
  2. Repeat L2 shutdown.
  3. Forwarding plane detects loss of liveness on the primary next‑hop (PE2) via ARP/ND failure or carrier loss (~10 ms).
  4. FIB immediately switches to the backup next‑hop (PE1) using the pre‑installed prefix‑independent entry.
  5. Traffic resumes essentially at the moment of next‑hop loss detection.

Measured failover interval:
T_recover - T_fail ≈ next‑hop loss detection latency (≈10‑20 ms) + FIB lookup latency (< 5 µs).
Thus, PIC reduces failover from seconds to tens of milliseconds, independent of prefix count—provided the backup path is valid and policy‑compliant.

Evaluating Bad‑Path Installation Speed During a Leak

A route leak occurs when an AS incorrectly advertises prefixes it does not originate, diverting traffic toward the leaking AS. To measure bad‑path installation speed, inject a leak and observe how quickly traffic follows the incorrect path.

Common test procedure (PIC enabled or disabled)

  1. Stabilize the network with PIC set as required for the test case.
  2. From a rogue router or test host with BGP speaker inside AS 65001, originate a more‑specific prefix (e.g., 10.0.0.0/24) actually owned by AS 65002.
  3. Advertise the leak to core router P1 via an eBGP session.
  4. Start traffic from a sender behind PE1 toward a destination inside the leaked prefix (the true destination resides in AS 65002).
  5. Capture:
    • T_leak_start – time the leak UPDATE is received by P1.
    • T_badpath_start – time the first packet arrives at the leaking AS (mirror port or sFlow on the link toward the leak).
    • T_badpath_end – time the leak is withdrawn or filtered (e.g., outbound prefix‑list on P1) and traffic returns to the correct path.
    • T_blackhole_leak – if the leak causes a blackhole (AS‑path looping), measure when traffic stops arriving at the true destination.

Effect of PIC on bad‑path installation

Conclusion for benchmarking


All CLI examples assume the vendor’s configuration mode; adjust syntax for specific releases as needed.


Share this post on:

Previous Post
One virtual MAC typo and a week of weirdness
Next Post
RAG alone does not ground network decisions