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.