Setting up SONiC on GNS3

Setting up SONiC on GNS3

Setting up SONiC on GNS3

In this article I will explain how to run SONiC on GNS3 so you can check out its functionalities.

SONiC stands for Software for Open Networking in the Cloud. SONiC Network Operating System is a Linux based open source solution for managing network infrastructure. Developed by Microsoft in 2016, SONiC was initially created for their Azure cloud data centers, but it has since gained popularity and adoption in the industry.

Sonic was developed to be compatible with SAI (Switch Abstraction Interface), an open standard that defines a common API for network switch ASICs (Application Specific Integrated Circuits). As a result, it offers a flexible and modular network operating system that can run on a variety of whitebox hardware platforms, such as Edgecore Networks, Celestica, Dell, Detla and so on. This makes Sonic an appealing option for disaggregated networking since it enables businesses to make use of open source software on cost-effective white box hardware.

As more businesses seek to reduce costs and gain more control over their network infrastructure, the networking sector has seen a spike in the adoption of open source solutions in recent years. With its versatile and adaptable network operating system, SONiC has become a top open source option in this field. SONiC is becoming a more widely used option for managing network infrastructure at scale by facilitating continuing upgrades and innovation via more openness and community involvement. SONiC’s acceptance and popularity are anticipated to increase even more as the movement toward open source solutions picks up speed, confirming its place as a major player in the open source networking market.

Today there are several SONiC distributions with commercial support to choose from.  Some of the popular SONiC NOS distributions include: Edgecore Networks SONiC, Dell SONiC Distribution (Dell EMC),  SONiC Distribution by NVIDIA, SONiC Distribution by Broadcom and so on.

One of SONiC’s main advantages is its capacity to offer a network infrastructure that can be customized and scaled to suit the needs of different sectors and businesses of varied sizes. Due to its adaptability and open source status, SONiC may be used by service providers, small and big enterprises, and data centers. For instance, data centers may use Sonic to manage the network infrastructure, increasing productivity and lowering expenses. The ability to customize SONiC’s network operating system to meet the unique demands of small and large businesses enables them to innovate and roll out new services more quickly. Service providers may employ SONiC to give their consumers access to a more flexible and responsive network infrastructure, giving them a competitive advantage in the market.

SONiC supports various features and functionality including:

  • Layer 2
  • Layer 3
  • ACLs, QoS
  • VXLAN
  • Timing
  • Monitoring and Security.
In conclusion, SONiC Network Operating System is a top open source networking solution since it provides a customized, adaptable, and scalable network architecture ideal for a variety of businesses and organizations. To try out SONiC Network Operating System on GNS3, you need to follow the below steps:
SONiC Appliance Download
First, install the SONIC GNS3 appliance file as well as the SONIC image.
You can find the required files on Broadcom’s Github page:
https://github.com/Broadcom/sonic-VirtualSwitch/releases/tag/3.1.2

 

Open you GNS3, go to File -> Import Appliance and select your appliance file.

Select appliance file
Install on SONiC on GNS3 remote server

You will be prompted to choose the server on which to run the appliance on.

Choose your preferred server, in this installation guide, we will choose the remote server, but the installation on GNS3 VM would be the same.

 

 

Choose the QEMU binary that will be used to run this appliance.

The recommended option is /bin/qemu-system-x86_64(v4.2.1).

Choose QEMU Binary
Import SONiC Image

 

 

Next, we need to import the sonic image file by clicking on the sonic-vs-3.1.2.img and clicking import.

Select your file, and wait for the upload to finish, it may take some time.

 

 

Finally, you will be prompted by an installation confirmation.

Click yes.

Installation Prompt
SONiC Installation Complete

 

And that’s it! 

With these steps you should have SONiC running on GNS3.

 

Now you can start using the SONiC appliance in GNS3 by dragging the SONiC appliance into the main window of your GNS3 project.

In my project I will have a topology with 3 x SONiC appliances.

GNS3 topology

 

Right click on each appliance and then click “start” to start it.

The default credentials are:

  • Sonic login: admin
  • Password: YourPaSsWoRd

 

SONiC Startup
SONiC Restart

 

 

Note: You will see a lot of logs since the router has started ZTP process. To disable ZTP use the command sudo ztp disable -y

Once you issue this command, SONiC will restart its services

This may take 30 to 120 seconds

 

 

 

 

 

 

Once the router has started, you can access the SONiC cli by using the command sonic-cli

SONiC CLI
Show running-config

 

 

 

 

You can try the command “show running-configuration” to see the initial configuration of the router.

I hope you liked this article. Don’t hesitate to provide your comments or feedback from your experience using SONiC.