Skip to content

Latest commit

 

History

History
107 lines (62 loc) · 5.92 KB

GNS3 VM for SONiC.md

File metadata and controls

107 lines (62 loc) · 5.92 KB

SONiC on GNS3 VM

GNS3 is an environment that allows simulation of networking equipment in realistic scenarios. It can be used to emulate, configure, test, and troubleshoot networks in a simulated environment. GNS3 allows you to run a small network topology consisting of only a few devices on your Windows 10 laptop, or larger network topologies using a GNS Server that is installed on an Ubuntu Linux server. You can use the GNS3 simulator to create a virtual environment to emulate various networks. See GNS3 online documentation and Getting started with GNS3 for complete information. Use GNS3 to run SONiC simulator VMs. GNS3 consists of the following components:

For Windows Environment

GNS3 user interface — Used to create and visualize network connections for the Windows environment.

For Client Server Model

GNS3 client — Used to create and visualize complex network connections for the Windows environment. GNS3 server — Controls SONiC VM execution (natively supported on Ubuntu Linux running on a Dell server)

GNS3 VM installation overview

  1. Install GNS3 on a windows environment using GNS3 VM installation guide.
  2. Download the SONiC image from the azure pipeline to the windows environment.
  3. Import the SONiC image the GNS3 VM environment.
  4. Build your SONiC topology virtual devices.
  5. Log in and configure each device.

SONiC image download

  1. Goto azure pipeline under master branch
  2. Select the latest successful build by clicking the Artifacts.

  1. Under artifacts, click on sonic-buildimage.vs

  1. Now, download the sonic image with the name target/sonic-vs.img.gz

  1. Extract sonic-vs-img.gz to a folder in your windows environment. Example: d:\sonic-vs.img

GNS3 VM set up

Once the GNS3 VM is installed and application is opened. We see a window as shown below,

In the GNS3 window, create a project.

a. Select File->New blank project. b. Name: Enter a new project name. c. Location: The default projects folder name changes to the new project name. d. Click OK.

The project window opens. The window title displays the name of the new project.

Install an SONiC image for GNS3 appliance file. - Go to SONiC pipeline and select the version of the SONiC image that you want to use. - Select an SONiC build image zip file and click Download. The zip file contains an SONiC image file. - On the windows environment, extract the SONiC image file.

In the GNS3 project window, Click on New template on the left corner of the screen Select the option "Manually createa new template"

Under the new tab, select Qemu VM and then select a new template as shown below. Key in the desired type of device and its RAM details as recommended.

Now, we should be able to find a new device on the left side panel to configure our device template. - In the QEMU VM template configuration window, under the General Settings tab, change the RAM size to 8192 MB (8GB) and the vCPU number to 4. - Select Auto Start Console to automatically open the console when the Community SONiC appliances start. - Click OK to save the changes.

Build your network topology

In the GNS3 project window, click the Browse Routers icon on the left side bar. Drag and drop CommunitySONiC devices in the middle project frame as required for your network topology. Place each device in the appropriate location on the screen. To rename a switch, click its icon and overwrite the text

Connect the Community SONiC switches. Select the "Add a link" icon on the left side bar. Click a switch in the project frame and select an available port in the drop-down list.

Drag the connection line to another switch, click the switch icon, and select a port from the drop-down list to establish the link.

Repeat this step to connect each Community SONiC devices.

Configure the Management IP address on each Community SONiC switch. Start each Community SONiC switch by right-clicking the icon and selecting Start. The connections from the switch to other devices in the project frame turn from red to green and the console window opens.

In the console window of each Enterprise SONiC switch, log in by entering the default username admin and the default password YourPaSsWoRd.

Access Configuration mode in the Community SONiC command-line interface to configure each switch. See the Community SONiC User Guide for configuration information and procedures.