SONiC & SAI¶
SONiC (Software for Open Networking in the Cloud) is an open-source network operating system built on Linux, originally developed by Microsoft for Azure. Combined with SAI (Switch Abstraction Interface), it enables SRv6 on whitebox switches from any hardware vendor.
Architecture¶
┌─────────────────────────────────────────────┐
│ SONiC NOS │
├─────────────────────────────────────────────┤
│ FRRouting (BGP, static) │ SRv6 Manager │
├──────────────────────────┤ │
│ SWSS (Switch State Service) │
├─────────────────────────────────────────────┤
│ SAI (Switch Abstraction Interface) │
├─────────────────────────────────────────────┤
│ ASIC SDK (vendor-specific driver) │
├─────────────────────────────────────────────┤
│ Switching ASIC │
└─────────────────────────────────────────────┘
Key Components¶
| Component | Role |
|---|---|
| SONiC | Linux-based NOS with containerized services (BGP, LLDP, SNMP, etc.) |
| SAI | Hardware abstraction API — same software runs on any compliant ASIC |
| FRRouting | Routing suite; in SONiC it signals SRv6 through BGP and static SIDs (the FRR container does not run isisd) |
| SWSS | Translates high-level intent into SAI API calls |
| ASIC SDK | Vendor-specific driver implementing SAI for a given chip |
What is SAI?¶
SAI (Switch Abstraction Interface) is an open API that decouples the NOS from the switching hardware. It defines a standard set of functions for programming forwarding tables, ACLs, QoS, and — critically — SRv6 SID operations.
Why SAI Matters for SRv6¶
Without SAI, each ASIC vendor would need a custom SRv6 implementation. With SAI:
- Write once, run anywhere — SRv6 code in SONiC works on any SAI-compliant ASIC
- Hardware acceleration — SRv6 encap/decap runs at line rate on the ASIC, not in software
- Multi-vendor — Same SONiC image on switches from different manufacturers
SAI SRv6 Objects¶
SAI defines specific objects for SRv6 programming:
| SAI Object | Description |
|---|---|
SAI_MY_SID_ENTRY | Local SID table entry (equivalent to "My SID" in SRv6) |
SAI_SRV6_SIDLIST | Ordered list of SIDs for encapsulation |
SAI_TUNNEL | SRv6 tunnel endpoint for encap/decap |
SAI_NEXT_HOP | Next-hop with SRv6 encapsulation action |
SRv6 Features in SONiC¶
| Feature | Status | Description |
|---|---|---|
| SRv6 uSID source routing | Available | Encapsulate with SRv6 uSID segment list |
| SRv6 My SID | Available | Process local SID table (End, End.DT, etc.) |
| SRv6 VPN (L3VPN) | Available | BGP VPN with SRv6 SID signaling |
| SRv6 Policy | In development | SR Policy with candidate paths |
| SRv6 TE | In development | Traffic engineering with SRv6 |
SONiC 202505
The SONiC 202505 release introduced SRv6 uSID support specifically designed for AI backend fabric networks. See the SONiC Foundation announcement for details.
Control Plane: FRRouting¶
SONiC uses FRRouting (FRR) as its routing engine. FRR provides:
- staticd for static SRv6 SIDs, generated from CONFIG_DB since 202505 (SONiC's FRR container does not run isisd, so there is no IGP-signaled SRv6)
- BGP with SRv6 VPN signaling (RFC 9252)
- Zebra for programming SRv6 routes; on a switch they reach the ASIC through fpmsyncd, SWSS and SAI
graph LR
FRR[FRRouting] -->|Routes + SIDs| Zebra[Zebra]
Zebra -->|Netlink| Kernel[Linux Kernel]
Zebra -->|fpmsyncd| SWSS[SWSS]
SWSS -->|SAI API| ASIC[Switching ASIC] Whitebox Hardware¶
SONiC runs on switches built on ASICs from several vendors — Broadcom, Cisco Silicon One, NVIDIA Spectrum and others. Whether a given SRv6 behavior forwards in hardware depends on that vendor's SAI implementation; the SONiC community does not publish a per-ASIC SRv6 behavior matrix, so check with the switch vendor. The SRv6 Support Matrix lists what SAI and orchagent can express.
Further Reading¶
- SONiC Implementation - Getting started with SRv6 on SONiC
- SRv6 AI Fabric Design - SAI uSID behaviors in AI backend fabrics
- FRRouting - FRR SRv6 configuration
- CLOS Fabrics & Load Balancing - Data center topology and path placement
- AI/ML Training Networks - SRv6 + SONiC for GPU fabrics
References¶
- SONiC Architecture - SONiC system architecture documentation on GitHub
- SAI API Specification - Open Compute Project SAI repository with API definitions
- SONiC SRv6 High-Level Design - SRv6 implementation design for SONiC
- FRRouting Documentation - FRR official documentation including SRv6 features