SONiC explained: the open network operating system behind cloud and AI data centres (SAI, containers, Redis, and who ships it)

What SONiC is, how SAI separates the network operating system from the switch chip, how it is built from containers around a Redis database, who ships it, and where it runs, with each idea proven on a running leaf switch.
Hand-drawn whiteboard: SONiC Explained, the open network OS, with SONiC over SAI over three switch ASICs

On this page

The switches inside some of the largest cloud networks run an operating system whose source code anyone can read. SONiC, Software for Open Networking in the Cloud, is a Linux-based network operating system (NOS) for data centre switches. It began at Microsoft, it is now a Linux Foundation project, and it runs on switches built around chips from several manufacturers, and on no chip at all, as a virtual switch on a laptop or a lab server.

This post is the written deep dive that goes with the first video of the SONiC track on the LevelUP I.T. YouTube channel. It covers what SONiC is, how the Switch Abstraction Interface (SAI) separates it from the switch hardware, how it is built from containers around a Redis database, who ships it, and where it runs. Each idea is followed by a proof on a running leaf switch, with the commands and their output.

What you'll find here

  • What SONiC is, where it came from, and why "Linux-based" is meant literally.
  • SAI: the API between the network operating system and the switch chip, and the one container that holds the chip-specific code.
  • The architecture: one container per function, Redis in the middle, and what CONFIG_DB, APPL_DB, ASIC_DB, STATE_DB and COUNTERS_DB each hold.
  • One route followed from FRR to APPL_DB to ASIC_DB, object by object.
  • What a virtual switch shows and what it cannot show.
  • Community SONiC and the enterprise distributions, and the two command lines on one switch.
  • Where SONiC runs: cloud fabrics and AI back-end fabrics, with the operators' and vendors' own statements.

The lab behind the proofs

Every output in this post comes from one leaf (leaf1a) of a small spine-leaf fabric: two spines, four leaves in two racks, and eight Linux hosts. The switches run Enterprise SONiC Distribution by Dell Technologies, release 4.6.0, as virtual machines started by containerlab. The fabric runs eBGP unnumbered in the underlay and BGP EVPN with VXLAN on top, with two tenants in their own VRFs.

These are virtual switches. There is no switching chip (ASIC) behind them. That matters for how to read the proofs, and a later section measures exactly what it changes.

This post is for paying subscribers only

Subscribe to LevelUp I.T. newsletter and stay updated.

Don't miss anything. Get all the latest posts delivered straight to your inbox. It's free!
Great! Check your inbox and click the link to confirm your subscription.
Error! Please enter a valid email address!