SONiC consists of multiple containers, each containing one or more daemons. Communication between these daemons occurs through Redis and Linux netlink. Understanding which process reads or writes which Redis tables is essential for tracing system behavior and debugging.
This section groups processes by container and describes their roles, the tables they interact with, and how they drive configuration or state upward or downward through the system.
The management plane processes implement user-facing interfaces:
- CLI (
config ...) - REST/RESTCONF
- gNMI
These processes
- Receive configuration from the user,
- Validate and normalize inputs,
- Write user intent into CONFIG_DB, and
- Provide configuration to the users
This is the northbound management plane API in SONiC. It implements:
- RESTCONF API
- gNMI API
- YANG-modeled configuration retrieval + updates
- “show” commands via REST
mgmt-framework reads from CONFIG_DB when a user performs:
GET /restconf/data/sonic-vlan:sonic-vlan/VLAN_TABLE
gnmi-cli get /openconfig-interfaces:interfaces
show running-configuration
get-config over gNMI
This component runs during:
- Boot
- config reload
- config save
- YANG-based template expansions
config-engine reads from CONFIG_DB to:
- Build the running config or startup config JSON
- Validate YANG constraints
- Regenerate portions of the DB during reload
- Apply templates for interfaces, VLANs, BGP, ACLs, etc.
| Component | Reads From | Write To | Purpose |
|---|---|---|---|
| mgmt-framework | CONFIG_DB | CONFIG_DB (via REST/gNMI edits) | External API for config |
| config-engine | CONFIG_DB, YANG Models | CONFIG_DB | Build/apply configuration |
The bgp container hosts the routing stack (FRR). It contains:
bgpd— BGP protocol enginezebra— central RIB and FIB managerstaticd— static route manager
- Learn routes from BGP neighbors.
- Maintain best-path selection.
- Produce routes for SONiC’s data plane.
bgpd → zebra → fpmsyncd → APPL_DB → orchagent
- Linux kernel routing table is not used for forwarding.
- zebra sends routes using the FPM (Forwarding Plane Manager) socket.
fpmsyncdlistens on the FPM socket and writes routes into APPL_DB.
SONiC’s architecture is built on a powerful separation of configuration intent, operational state, and hardware programming. In the center of this architecture sit two families of daemons:
*mgrddaemons*syncdhelper processes
The purpose of the *mgrd daemons is simple but essential:
Take administrative intent from CONFIG_DB → apply it to Linux → express it for hardware via APPL_DB.
These daemons respond exclusively to configuration changes. If the admin changes the running configuration—whether through CLI, REST/gNMI, or config reload—the update first reaches CONFIG_DB. The *mgrd daemons wake up and translate that high-level intent into:
- Linux network device creation
- IP address assignments
- VLAN and bridging configuration
- VRF creation
- Buffer profile computation
- Static neighbor insertion
They also write APPL_DB entries that orchagent consumes to program SAI objects into hardware.
These processes sit on the opposite side of the architecture:
Take Linux operational/kernel/network/FPM state → publish it into APPL_DB → trigger hardware updates.
*syncd helpers listen to:
- Netlink (interfaces, neighbor updates)
- Kernel events
- FRR Zebra’s FPM updates
- ARP/NDP entries
They translate these physical events into APPL_DB entries that orchagent must react to.
Both *mgrd and *syncd write to APPL_DB, but they write different fields for very different purposes.
| Category | Meaning | Written By |
|---|---|---|
| Configuration fields | What the admin wants | *mgrd |
| Operational fields | What the hardware/kernel reports | *syncd |
For example, in APPL_DB:PORT_TABLE:
- Admin MTU / speed / FEC → portmgrd
- Oper-up/down status → portsyncd
These sets of fields are non-overlapping, ensuring they never conflict.
vlanmgrd
- Reads: CONFIG_DB:{VLAN_TABLE, VLAN_MEMBER_TABLE}
- Writes: Linux bridge (via ip link, bridge vlan), APPL_DB VLAN tables
- Purpose: Create VLANs and VLAN members in Linux, notify orchagent
portmgrd
- Reads: CONFIG_DB:PORT_TABLE
- Writes: Linux netdev attributes (MTU, speed, admin state), APPL_DB config fields
- Purpose: Apply physical port configuration to Linux and orchagent
intfmgrd
- Reads: Interface tables from CONFIG_DB
- Writes: Linux IP address assignments, APPL_DB L3 interface tables
- Purpose: Configure RIFs (router interfaces), VRF associations, IPs
neighmgrd
- Reads: CONFIG_DB static neighbor entries
- Writes: Linux ARP/NDP table
- Purpose: Install static neighbors
vrfmgrd
- Reads: CONFIG_DB VRF tables
- Writes: Linux VRF devices, APPL_DB VRF_TABLE
- Purpose: Create VRFs and notify orchagent
portsyncd
- Reads: Linux netlink (RTM_NEWLINK/DELLINK)
- Writes: APPL_DB:PORT_TABLE (oper state), STATE_DB:PORT_TABLE
- Purpose: Report physical link state to orchagent
intfsyncd
- Reads: Linux netlink IP address updates
- Writes: APPL_DB:INTERFACE_TABLE
- Purpose: Notify orchagent when kernel gains/loses IPs
neighsyncd
- Reads: Kernel ARP/NDP cache
- Writes: APPL_DB:NEIGH_TABLE
- Purpose: Publish dynamic neighbor events (ARP/NDP)
fpmsyncd
- Reads: FRR Zebra via FPM (route updates)
- Writes: APPL_DB:ROUTE_TABLE
- Purpose: Reflect best routes from Zebra → orchagent for ASIC programming
Runs in the swss container.
- Reads CONFIG_DB, STATE_DB, and APPL_DB.
- Determines required ASIC state.
- Writes SAI operations to ASIC_DB.
| Orchagent | Reads From | Writes To |
|---|---|---|
| orchagent | CONFIG_DB, STATE_DB, APPL_DB | ASIC_DB |
The syncd container hosts:
- syncd daemon
- SAI vendor library
- ASIC SDK
- Apply SAI operations from ASIC_DB.
- Poll ASIC counters and store them in COUNTERS_DB.
- Emit hardware notifications (MAC learn, port state) to swss daemons.
| Component | Reads From | Writes To |
|---|---|---|
| syncd daemon | ASIC_DB | COUNTERS_DB |
| Process | CONFIG_DB | STATE_DB | APPL_DB | ASIC_DB | COUNTERS_DB |
|---|---|---|---|---|---|
| mgmt-framework | W | - | - | - | - |
| config-engine | W | - | - | - | - |
| vlanmgrd | R | W | - | - | - |
| portmgrd | R | W | - | - | - |
| intfmgrd | R | W | - | - | - |
| portsyncd | - | W | - | - | - |
| neighsyncd | - | - | W | - | - |
| fdbsyncd | - | - | W | - | - |
| intfsyncd | - | W | - | - | - |
| fpmsyncd | - | - | W | - | - |
| orchagent | R | R | R | W | - |
| syncd daemon | - | - | - | R | W |