Skip to content

BGP PIC local - backup path hld#2292

Open
venkit-nexthop wants to merge 2 commits intosonic-net:masterfrom
nexthop-ai:bgp-pic-local-backup-path-hld
Open

BGP PIC local - backup path hld#2292
venkit-nexthop wants to merge 2 commits intosonic-net:masterfrom
nexthop-ai:bgp-pic-local-backup-path-hld

Conversation

@venkit-nexthop
Copy link
Copy Markdown

@venkit-nexthop venkit-nexthop commented Apr 14, 2026

BGP PIC Local (Fast Reroute) HLD

Adds a High-Level Design document for BGP PIC Local (Fast Reroute) in SONiC. This feature enables sub-second failover on local link failures by pre-computing a backup BGP path alongside
the primary path and installing both in the FIB. When the local link fails, the data plane switches to the backup immediately without waiting for BGP reconvergence.

The HLD covers the end-to-end design across:

  • bgpd (FRR): backup path/ECMP selection after bestpath computation, ZAPI encoding
  • Zebra: backup nexthop encoding in FPM netlink messages via RTNH_F_BACKUP
  • fpmsyncd: storing primary + backup nexthops in APP_DB using primary_nh_count
  • Config/YANG: per-AFI/SAFI and per-VRF configuration models

Orchagent and nexthop group hardware programming are TBD and out of scope for this revision.

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

No pipelines are associated with this pull request.

@venkit-nexthop venkit-nexthop changed the title Bgp pic local backup path hld BGP PIC local - backup path hld Apr 14, 2026
@jefftant
Copy link
Copy Markdown

Hi,

Could you please describe why are you doing this and exact use case?

This is meaningless in equidistant topologies (e.g leaf-spine), each destination is available over ECMP, every ECMP member is as good as any other and is per definition loop free.
There’s no need for an explicit backup, every ECMP path is active and a backup.
On local link down, there’s no need for BGP convergence , failed next-hop need to be removed from the FW, BGP convergence is only meaningful for remote leafs, not local.

Moreover, you are stating:
The backup path MUST NOT include any nexthop that is already in the primary ECMP set - this makes it of no use in DC, however all examples show ECMP topologies, with MED as tiebreaker - quite "unusual"?
Reference:
10.0.1.101 from 10.0.1.101
Origin IGP, metric 1, valid, external, multipath, best (MED) <========

10.0.2.106 from 10.0.2.106
Origin IGP, metric 6, valid, external, backup

The orchagent/SAI integration is completely TBD. The actual hardware programming — the only part that matters for fast failover — isn't designed yet. Open items literally say: "Determine SAI API requirements for primary/backup nexthop group programming" and "Orchagent backup programming: TBD." So right now this feature just pushes backup info through the control plane all the way to APP_DB... and then does nothing with it in hardware.

Thanks and looking forward to your answers,
Jeff

@venkit-nexthop
Copy link
Copy Markdown
Author

venkit-nexthop commented Apr 14, 2026 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants