Featured image of post Adding SONiC to EVE-NG

Adding SONiC to EVE-NG

Adding SONiC to EVE-NG

Preface

Downloading and adding the image

  1. The latest images can be found here https://sonic-net.github.io/SONiC/sonic_latest_images.html . In particular we need the image with platform type “VS”.

  2. Next take note on what branch you downloaded, as it is necessary for the folder naming in EVE-NG.
    In my case it was 202305 so I will create a folder named sonicsw-202305 with this command.
    mkdir /opt/unetlab/addons/qemu/sonicsw-202305

  3. Once created we need to move the file over with your method of choice. I prefer scp or rsync.

  4. unzip the file using gunzip.
    gunzip sonic-vs.img.gz

  5. rename the file.
    mv sonic-vs.img virtioa.qcow2

  6. Finally we need to run this command to ensure permissions are set correctly on folder and items /opt/unetlab/wrappers/unl_wrapper -a fixpermissions

Initial Configuration

Once the node has been added to lab and booted. The default username is admin and password is YourPaSsWoRd. To change it you can use this command. sudo passwd admin

The SONiC virtual switch will load with the default Hardware SKU of ‘Force10-S6000’. We can change that using the sonic-cfggen command. Also notice the --preset flag generally options are t1,l2,empty,l1, and l3. l2 and l3 are the most common options used.

sudo cp /etc/sonic/config_db.json ~/config_db.json.bak
sudo sonic-cfggen -H --preset l2 -k Force10-S6000 -p /usr/share/sonic/device/x86_64-kvm_x86_64-r0/Force10-S6000/port_config.ini > ~/tmp.json
sudo mv ~/tmp.json /etc/sonic/config_db.json
config reload -y

Once the switch has reloaded, we can configure OOB management. By default no mamangement VRF exists. upon creation Ethernet0 becomes bound to master interface ‘mgmt’ which belongs to the management VRF:

sudo config vrf add mgmt
sudo config save

We can then confirm the Layer 3 configuation for the OOB managment.

Last updated on Oct 19, 2024 22:02 UTC
Built with Hugo
Theme Stack designed by Jimmy