Architecture Explorer
Select any component to see its purpose, inputs and outputs, failure modes, useful commands, an analogy, and a technically accurate explanation — then follow a clickable flow.
CLI (`show` / `config`)
Human-facing management surface. config commands write operator intent; show commands read applied/observed state back out of the databases.
Inputs
- • Operator keystrokes
- • Shell scripts / Ansible over SSH
Outputs
- • Writes to CONFIG_DB
- • Reads from CONFIG_DB / STATE_DB / COUNTERS_DB / APPL_DB
Related services
- • swss
Related databases
- • config-db
- • state-db
- • counters-db
Common failure modes
- • `config` accepted but never programmed downstream (intent stalls after CONFIG_DB)
- • `show` reads the wrong DB and looks 'fine' while hardware disagrees
- • Command not present — CLI surface varies by image, distribution, and version
Useful commands
- • show version
- • show interfaces status
- • show ip route
- • sudo config interface ip add Ethernet0 10.0.0.1/31
- • sudo config save -y
Analogy: The factory front desk where work orders are dropped off and status is looked up.
Technically: The config/show Click framework and sonic-utilities are thin clients over Redis. config translates arguments into CONFIG_DB writes; most show commands query CONFIG_DB (intent), STATE_DB (observed), or COUNTERS_DB (stats). Accepting a command only confirms the write, never that the intent reached SAI or the ASIC. Available subcommands differ across SONiC releases and vendor distributions.
Clickable flows
Operator intent traveling all the way from the CLI to programmed hardware.
- 1
Operator runs
config route add— intent enters at the front desk. - 2
The route is written to CONFIG_DB (STATIC_ROUTE) as desired state — nothing forwards yet.
- 3
The static route manager (via staticd/fpmsyncd) translates intent into APPL_DB ROUTE_TABLE.
- 4
Inside SWSS, orchagent (routeorch) picks up the APPL_DB object and resolves its next-hop/neighbor dependencies.
- 5
orchagent expresses the route as a standardized SAI route-entry create call.
- 6
The SAI operation is recorded in ASIC_DB — the sync-path representation of what we asked for, not yet proof of hardware.
- 7
syncd consumes ASIC_DB and drives the vendor SAI/SDK to actually program the entry.
- 8
The route lands in the hardware LPM table; only now does the ASIC forward matching packets.