Setup Instructions for SONiC Lite Demo

August 31, 2023
Setup Instructions for SONiC Lite Demo

SONiC-Lite is the lightweight version of Community SONiC that can run on cost-effective management and access switches (with limited CPU performance, reduced RAM, and storage size). All optimizations by the PLVision team were done to the SONiC part of the product and are not related to vendor-specific components (like SAI, platform, etc.).

Besides multiple cleanups/optimizations, SONiC Lite offers extended functionality: PoE, xSTP and Static routing.

The key features:

·   reduced CPU utilization

·   reduced RAM consumption

·   reduced image size

·   removed unused kernel modules

·   removed unused files

·   moved to the “slim” docker base

Minimal requirements:

·   CPU 2 cores low/middle performance

·   RAM 2Gb

·   Storage ~3 Gb




SONiC Lite Use case

L1 access switch is the main use case for the SONiC Lite. The access layer, as the lowest layer of the hierarchical inter-networking model, connects end-users or end nodes such as PCs, printers, wireless access points to the network. This layer facilitates the continuous network connection of the end devices no matter where they are located. In the meantime, the design of the L1 depends on the upper layer connections.

Access switches form the L1 connect with the distribution layer switches and end devices as well as ensure the packets are delivered to the end devices. They also must meet the requirements of the layer to provide certain functions (network management simplification, security, etc) for the specific network environment.

SONiC Lite Features

The access switch predefines this feature list:

Management and security:



·   802.1x

.   Secure boot




·   LLDP

·   XSTP

·   DHCP relay

.   VLAN

.   LAG

.   LACP


·   Static routing







·   QoS

  Storm Control


  ACL (L2-L4)



Test topology example

Host 1
acts as an end-user, obtains IP configuration from DHCP server.

DHCP Server provides IP configuration for end-users (has configured isc-dhcp server instance).

SONiC Lite 1, 2, 3 provide network access service for end-users. They have the same configurations:

  •   VLAN 100 (ports connected to Host and DHCP server in access mode, connections between SONiC boxes working in trunk mode
  •   LACP
  •   LAG/LACP (connection between SONiC 1 and SONiC 2 is static, other LAG connections use LACP for dynamic configuration)
  •   PVST
  •   DHCP relay
  •   Routing

Setting up SONiC Lite

Infrastructure. The topology is emulated on the GNS3 application. The DHCP Server appliance and host can be downloaded from the GNS3 marketplace. The SONiC Line appliance is imported according to this instruction.

The GNS3 limitations: since we a running virtual machine we can not test HW dependent features (QoS, PoE, ACL etc.). To emulate link failure, we need to disable interfaces on both sides.

DHCP server. The ISC DHCP server should be deployed.

1. Assign IP address: ip addr add dev eth1

2. Update dhcp configuration (/etc/dhcp/dhcpd.conf), add following section:

                            Subnet netmask



  option routers;

  Interface eth1;


3. Update dhcp server configuration (/etc/default/isc-dhcp-server), add line: INTERFACESv4=”eth1″

4. Start or restart dhcp service: service isc-dhcp-server start or service isc-dhcp-server restart

5. Check dhcp service status: service isc-dhcp-server status

SONiC Lite configuration:

1. Remove IP address from interfaces:

                            sudo config interface ip remove Ethernet0

sudo config interface ip remove Ethernet4

sudo config interface ip remove Ethernet8

sudo config interface ip remove Ethernet12

sudo config interface ip remove Ethernet16                        

2. Create port channel interfaces:

                            sudo config portchannel add --static true PortChannel1

sudo config portchannel member add PortChannel1 Ethernet4

sudo config portchannel member add PortChannel1 Ethernet8

sudo config portchannel add PortChannel2

sudo config portchannel member add PortChannel2 Ethernet12

sudo config portchannel member add PortChannel2 Ethernet16                        

3. Create VLANs and add ports and IP addess:

                            sudo config vlan add 100

sudo config vlan member add -u 100 Ethernet0

sudo config vlan member add 100 PortChannel1

sudo config vlan member add 100 PortChannel2

sudo config interface ip add Vlan100                        

4. Configure DHCP relay:

                            sudo config feature state dhcp_relay enabled

sudo config vlan dhcp_relay add 100                        

5. Enable PVST:

                            sudo config spanning-tree enable pvst                        

6. Check status:

                            show vlan brief

show interfaces portchannel

show lldp neigbours

show spanning-tree                        

DHCP client:

1. Generate dhcp request: dhclient Ethernet0

2. Check interface address: ip addr show dev Ethernet0

3. Check connectivity: ping

About protocols

VLAN: A virtual local area network (VLAN) is a segment of the network that is partitioned and isolated at the data link layer (OSI layer 2). VLANs work by applying tags to network frames and handling these tags in networking systems, creating the appearance and functionality of network traffic that is physically on a single network but acts as if it is split between separate networks. In this way, VLANs can keep network applications separate, despite being connected to the same physical network. It allows engineers to organize the infrastructure without deployment of multiple sets of cabling and networking devices.

Using VLANs network administrators can group hosts together even if the hosts are not directly connected to the same network switch and configure VLAN membership remotely. This functionality makes deployment and network design easier.

STP (PVST): The Spanning Tree Protocol (STP) is a network protocol that builds a loop-free logical topology for Ethernet networks. The primary function of STP is to prevent bridge loops and broadcast radiation caused by these loops. STP also allows to include backup links providing fault tolerance if an active link fails into the network design.

RSTP (Rapid RSP): provides significantly faster spanning tree convergence due to the topology changes that introduce new convergence behaviors and bridge port roles.

LACP/LAG: The Link Aggregation Control Protocol (LACP) provides a method to control the bundling of several physical links together to form a single logical link. LACP allows a network device to negotiate an automatic bundling of links by sending LACP packets to their peer: a directly connected device that also implements LACP.

LACP works by sending frames (LACPDUs) down all links that have the protocol enabled. If it finds a device on the other end of a link that also has LACP enabled, that device will independently send frames along the same links in the opposite direction enabling two units to detect excessive links between themselves  and configure them into a single logical link. LACP can be set into one of two modes: active or passive. In the active mode, LACPDUs are sent 1 per second down the configured links. In passive mode, LACPDUs are not sent until one is received from the other side according to a speak-when-spoken-to protocol.

LLDP: The Link Layer Discovery Protocol (LLDP) is a vendor-neutral link layer protocol used by network devices for advertising their identity, capabilities, and neighbors in the local area network. LLDP is a functionality for network management and monitoring of network applications.

LLDP information is sent by devices from their interfaces at a fixed interval in the Ethernet frame form. Each frame contains one LLDP Data Unit (LLDPDU). Each LLDPDU is a sequence of type–length–value (TLV) structures that start with the following mandatory TLVs: Chassis ID, Port ID, and Time-to-Live. The mandatory TLVs are followed by any number of optional TLVs. The frame optionally ends with a special TLV ( end of LLDPDU) in which both the type and length fields are 0.

Try out SONiC Lite demo version

Fill out the form to access Demo. Your download will start automatically (available only on PC) and may take some time.

Thank you for requesting the demo. Follow our instructions to set up SONiC Lite demo version. Please note, demo file weights 800 mb and may take some time to download.

Taras Chornyi