Are you excited about enhancing your GNS3 network testing capabilities with SONiC but concerned it might be too complex? No need to worry! π
GNS3 doesn't come pre-configured with SONiC, but we'll guide you through a straightforward method to set it up. This guide simplifies the process into easy-to-follow steps that anyone can follow. We'll provide you with all the necessary resources to take your network tests to the next level π. In this article, you'll learn how to create a new SONiC appliance for GNS3 using a shell script on Ubuntu and how to add a template in Web version of GNS3 and Desktop version of GNS3.
So, are you prepared to embark on this journey with us? We'll seamlessly integrate SONiC into your GNS3 environment β it's a breeze! ππ
Keep in mind that there are various ways to add SONiC images to GNS3, and we're presenting one of them.
Prerequisites
-
A functional GNS3 Server -> Link to the article where it's all explained
-
Access to the requisite SONiC image.
-
A fundamental understanding of networking concepts and familiarity with GNS3 operations.
- Ubuntu client
Step 1. Download the ready SONiC appliance
1. Download the shell script from the link below.
https://github.com/sonic-net/sonic-buildimage/blob/master/platform/vs/sonic-gns3a.sh
Now save the file on your PC. I created a new directory for this operation, so my file will be downloaded to :
C:\COMMUNITY_SONIC
Also you'll need the SONiC image. Put the image in the same directory as shell script you just downloaded.
2. Run the shell script, in this case I'm using the WSL2 Ubuntu 22.04. To create an appliance with the downloaded shell script, enter the directory where you have the SONiC VS image and the downloaded shell script. The command is right below:
./sonic-gns3a.sh -r Community -b sonic-vs.img
With -r you are naming the appliance that you'll create.
With -b you are choosing which image to use to create an appliance.
Step 2. Adding new device with appliance.
1. Enter GNS3, select the File button in the top-left corner of the GNS3, and select the Import appliance button from the drop-down list. Select the .gns3a file that you created earlier.
2.Select Install the appliance on the main server button, and click Next
3. Change Qemu binary to:
/bin/qemu-system-x86_64
And select Next
4. In the next window you will see your .img image that is applied to your .gns3a file. Select Next.
5. In the final window there is information about the category. Select Finish and there will be a window about the successfully created appliance.
Congratulations!
You have successfully created a SONiC template in GNS3. Now you can utilize SONiC in your GNS3 network simulations.
Happy Networking !!! π
Adding new device with appliance using web version of GNS3.
So, we learned how to add a new appliance in the downloaded GNS3. In this step, you'll learn how to add a new appliance in the web version of GNS3. First, you need to enter the address of your web version of GNS3.
1. Enter an existing project, if you don't have any click Add blank project.
2. Select the + icon and from the drop-down table select the New Template option.
3. Select Import an appliance file and click Next
4. Select the .gns3a file that you created using the Linux shell and click the Open button.
5. Change Qemu binary to:
/bin/qemu-system-x86_64
And select Create
Congratulations!
You have successfully created a SONiC template in GNS3. Now you can utilize SONiC in your GNS3 network simulations.
Happy Networking !!! π
If you're looking for more GNS3 tutorials and resources, you can explore the following articles:
How to create a new GNS3 appliance template to work with SONiC using GNS3 Desktop Client?
How to set up GNS3 server on VirtualBox?
How to create a new GNS3 appliance template to work with SONiC using GNS3 Web UI?