SONiC (Software for Open Networking in the Cloud)

repository·master·Indexed 25 days ago

https://github.com/sonic-net/sonic

An open-source, Linux-based network operating system for multi-vendor hardware and ASICs used in large-scale cloud data centers. The documentation covers installation via ONIE, Docker, or VM, basic CLI configuration, AAA implementation details including the Host Account Management Daemon (hamd) and sac NSS module, and comprehensive methodologies for route performance benchmarking and optimization.

Tokens
172.5K
Snippets
328
Records
875
Agent score
84%

What's inside SONiC

  1. Overview of EVPN VxLAN Multihoming in SONiC

    master

    EVPN VxLAN Multihoming provides an all-active access redundancy solution in SONiC, implementing standards based on RFC 7432 and RFC 8365. This feature allows multi-homed devices (MHD) to connect to multiple VTEPs (VXLAN Tunnel End points) simultaneously. It is designed to coexist with the existing ICCPd-based MCLAG (Multi-Chassis LAG) solution.

    Key Capabilities:

    • Support for all-active access redundancy.
    • Support for Static Anycast Gateway, BGP-EVPN Multihomed Ethernet-Segment, and ARP/ND suppression.
    • Support for both Type-0 (Operator configured) and Type-3 (System-MAC config based) Ethernet Segment IDs.
    • Support for routing and switching traffic flows equivalent to legacy MCLAG.

    Limitations and Non-Goals:

    • Does not support single-active, port-active, or single-flow-active EVPN services.
    • Does not support DF (Designated Forwarder) election modes other than preference-based.
    • Does not support asymmetric IRB.
    • Does not support VRRP over EVPN Multihoming (use Static Anycast Gateway instead).
    • EVPN Multihomed interfaces must be configured as switchports; they cannot be used as router-ports or routed sub-interfaces.
  2. Overview of SONiC (Software for Open Networking in the Cloud)

    master
    SONiC is a free and open-source, Linux-based network operating system designed to run on switches from multiple vendors and ASICs. It is built on a container-based architecture where each network function runs in its own Docker container, providing fault isolation, easier debugging, and simplified maintenance. It is used in large-scale cloud environments and supports features like BGP and RDMA.
  3. Overview of sFlow Support in SONiC-VPP

    master

    SONiC-VPP provides standards-conformant sFlow (RFC 3176 / sFlow v5) support. It integrates with the standard SONiC sFlow stack (sflowmgrdsflowOrch → SAI → host-sflowd) to ensure end-to-end operation without bypassing existing SONiC management tools.

    Key Capabilities:

    • Per-port packet sampling: Configurable on physical interfaces via the standard SONiC SFLOW/SFLOW_SESSION/SFLOW_COLLECTOR CONFIG_DB schema and the config sflow ... CLI.
    • Counter Samples: Per-interface counter samples are exported by hsflowd to one or more sFlow collectors.
    • Drop Notifications: Supports optional drop-event notifications (sFlow drop monitor / dropmon).
    • Standard Compliance: Designed to pass sonic-mgmt sFlow regression suites.
  4. Overview of the SONiC CLI Auto-generation tool

    master

    The SONiC CLI Auto-generation tool is a utility designed for the SONiC Application Extension (SAE) infrastructure. It automates the creation of command-line interfaces (CLI) for third-party features that are provided as separate Docker containers.

    By using a YANG model as input, the tool generates a CLI plugin that allows users to perform show and config operations against the CONFIG DB schema described in the model. This ensures that new features have an intuitive CLI consistent with the SONiC NOS experience without requiring manual development of CLI components.

  5. Overview of Zero Touch Provisioning (ZTP)

    master
    Zero Touch Provisioning (ZTP) is a framework in SONiC that allows for the automatic setup of a switch without user intervention upon its first boot. It is triggered by a DHCP offer and can be used to configure a fleet of switches using common configuration templates. ZTP supports both out-of-band management and in-band network provisioning.
  6. Overview of ICMP Hardware Offload in Dual ToR Architecture

    master

    ICMP Hardware Offload is a feature designed to improve link state failure detection time in Dual Top of Rack (ToR) architectures.

    In standard SONiC configurations, ICMP echo request and reply packets are generated and received via the Host OS network stack (software-based), which results in link state detection times of approximately 200-400 milliseconds.

    ICMP Hardware Offload utilizes the Network Processing Unit (NPU) hardware in the ToR switches to transmit and receive ICMP packets. This hardware-based monitoring reduces link state detection time to less than 10 milliseconds.

  7. Overview of Smart Switch IP Address Assignment

    master

    A DASH smart switch integrates a datacenter switch (NPU) with one or more Data Processing Units (DPUs). The DPU front-panel network interfaces are wired directly into the switching fabric. The control planes of the NPU and DPUs interconnect via PCIe interfaces. Each DPU has a pair of PCIe interfaces (one NPU-side endpoint and one DPU-side endpoint), and each PCIe endpoint is represented as a netdev in the Linux Kernel.

    Key requirements for the IP assignment flow include:

    • A uniform procedure for assigning IP addresses on both DPU and Switch side interfaces.
    • Deterministic behavior.
    • Stateless operation of the DPU.
    • Centralizing all logic on the switch side.
    • Compatibility with network boot scenarios (e.g., OOB PXE on DPU).
  8. Overview of Memory Statistics Feature

    master

    The Memory Statistics feature in SONiC provides native system-wide memory monitoring. It automatically records metrics including Total Memory, Used Memory, Free Memory, Available Memory, Cached Memory, Shared Memory, and Buffers.

    Key characteristics:

    • Default State: Disabled by default to conserve resources.
    • Default Configuration: If enabled, it samples memory every 5 minutes and retains data for 15 days.
    • Storage: Data is collected by the memorystatsd daemon and stored in compressed log files to optimize storage usage.
  9. Overview of the PSU Daemon (psud)

    master

    The PSU daemon (psud) is responsible for collecting platform Power Supply Unit (PSU) data and triggering actions based on that data.

    Key Functions:

    • Data Collection: Collects constant data (PSU number) at boot and periodic variable data (entity info, presence, power good status, power, current, voltage, temperature, and thresholds).
    • Event Monitoring: Monitors events such as presence/power good status, voltage threshold violations, temperature threshold violations, and power consumption exceeding budgets (modular switches) or specific PSU thresholds.
    • Management: Manages PSU LED colors and triggers syslog messages based on event types.
  10. Overview of SONiC Console Switch

    master

    The SONiC Console Switch feature allows users to manage connected routers or switches via their console ports through a SONiC device. It enables the SONiC device to act as a management gateway for connected serial devices (e.g., a Serial Hub).

    Key capabilities include:

    • Configuring baud rate and flow control for each console port.
    • Accessing console lines via reverse SSH.
    • Persisting configurations (Line Number, Flow Control, Remote Device Name, and optional Management IP) via SONiC's CONFIG_DB.
    • Recording console line states in STATE_DB.

    Limitations:

    • Configuration is only supported on console ports.
    • Only one active session can be alive on a console line at a time.
  11. Overview of the Event and Alarm Framework

    master

    The Event and Alarm Framework in SONiC provides a centralized system for applications to raise notifications and store them for northbound monitoring interfaces. It distinguishes between two types of notifications:

    • Events: "One-shot" notifications for abnormal or important situations (e.g., user login, authentication failure, configuration changes).
    • Alarms: Notifications for dynamic conditions that can be cleared (e.g., out of memory, temperature threshold crossing). Alarms use an action field with values RAISE, CLEAR, or ACKNOWLEDGE/UNACKNOWLEDGE to track the lifecycle of the condition.

    Both events and alarms are recorded in Redis DB tables for historical and current status tracking.

  12. Overview of SONiC Console Monitor

    master
    The SONiC Console Monitor provides real-time automatic detection of the operational (Oper) state of serial links between a Console Server (DCE) and a SONiC Switch (DTE). This enables observability for out-of-band management connections, allowing operations teams to monitor link health instantly during incident response without interfering with normal console operations like remote reboots or system reinstalls.