SONiC (container)#
SONiC Network OS is distributed in two formats suitable for testing with containerlab
- Containerized SONiC (topic of this document)
- Virtual Machine SONiC
This document covers the containerized SONiC that is identified with sonic-vs
kind in the topology file. A kind defines a supported feature set and a startup procedure of a sonic-vs
node.
Getting Sonic images#
Getting SONiC images is possible via two resources:
- Sonic.software -- an unofficial repo with SONiC images (may be down sometimes, uses Azure pipeline as a source)
- Azure pipeline -- an official source of SONiC images, but finding the right one there is a pita.
When https://sonic.software is down, you can follow the following procedure to find the SONiC image in the Azure pipeline artifacts maze:
- Go to the piplines list: https://sonic-build.azurewebsites.net/ui/sonic/pipelines
- Scroll all the way to the bottom where
vs
platform is listed - Pick a branch name that you want to use (e.g.
202405
) and click on the "Build History". - On the build history page choose the latest build that has succeeded (check the Result column) and click on the "Artifacts" link
- In the new window, you will see a list with a single artifact, click on it
- One more long scroll down until you see
target/docker-sonic-vs.gz
name (or Ctrl+F for it), click on it to start the download or copy the download link. - Here you go, you managed to download a SONiC image from a mysteriosly named branch for a build that probably means nothing to you. This Sonic experience for ya...
How to download SONiC image from Azure pipeline (video)
Managing sonic-vs nodes#
SONiC node launched with containerlab can be managed via the following interfaces:
Interfaces mapping#
sonic-vs container uses the following mapping for its linux interfaces:
eth0
- management interface connected to the containerlab management networketh1
- first data (front-panel port) interface
When containerlab launches sonic-vs node, it will assign IPv4/6 address to the eth0
interface. Data interface eth1
mapped to Ethernet0
port and needs to be configured with IP addressing manually. See Lab examples for exact configurations.
Lab examples#
The following labs feature sonic-vs node: