Sunday, January 17, 2021

Microsoft Sonic Virtual Switch on Eve-NG

 Microsoft, SONiC is probabily the most populan open-source network operating system which is  currently being developed by a community of network market leaders: Broadcom, Marvell, Dell, Mellanox/NVIDIA, Intel, Microsoft and others. IT supports 101 whitebox platforms (by January 2021)  which you could find the latest list in 

To test and see how Sonic works it’s better to create a virtual topology (e.g. a data center Clos topology.) with a network emulation tool like GNS3, Eve-NG etc. On Sonic Github page there is a script to make Sonic-Virtual-Switch image with GNS3 but not for EVE-NG. I make Sonic work on Even-NG. Here are the instructions: 

I assume that you already installed Eve-NG and started using it. 

  • Copy the mssonic.yml file into “/opt/unetlab/html/templates/intel” or “/opt/unetlab/html/templates/amd” based on your cpu. 
  • Create a folder under “opt/unetlab/addons/qemu/” with name “mssonic-version/” . Folder name is really important since eve-ng understands that it is a a sonic image folder with naming convention. The first part of the folder name  must be "mssonic" if you are using my yml file and later you could add version to the folder name, e.g: "mssonic-202012"

root@EVENG-SRLAB:~# mkdir pt/unetlab/addons/qemu/mssonic-202012
  • Extract sonic-vs.img.gz 
  • Rename sonic-vs.img to virtioa.qcow2 (just rename,  no convert) 
root@EVENG-SRLAB:/opt/unetlab/addons/qemu/mssonic-202012# mv sonic-vs.img virtioa.qcow2

As a last step you need to execute the command below, which should be done for any new image 
/opt/unetlab/wrappers/unl_wrapper -a fixpermission
The order of the EVE-NG ethernet and sonic ethernet is misaligned somehow. 10 interfaces are configured under yml file but only 9 are up in sonic. So :

eve-ng ethernet 1 == sonic ethernet0 (in below picture you need to configure ethernet0 in Sonic)  


Post a Comment


Internetworking Hints Copyright © 2011 -- Template created by O Pregador -- Powered by Blogger