Install GNS3 (Graphical Network Simulator) On Linux

Are you preparing for any Network certification exams? I’ve got a good news for you. Meet GNS3, a free, cross-platform, and open source graphical network simulator. It is one of the best simulator for those who are preparing for exams like Cisco CCNA, CCNP, CCIE, Juniper JNCIA, JNCIS and JNCIE. If you are a student, and can’t afford to buy a real routers and switches to test commands, GNS3 is your asylum. Using GNS3, you can easily simulate and use various types of virtual network switches and routers regardless of the operating systems you use.

It is not only for students, but also can be used for Network professionals to test and build complex networks before implementing them in the production environment. GNS3 has various exciting features, including support for VirtualBox and QEMU, so that you can import and test various virtual machines to test along with virtual networks. If you are a Network certification trainer, you can also use GNS3 in your Lab to teach your students as the way you teach using the real network devices. GNS3 supports Linux, Microsoft Windows, and Mac OS X.

In this tutorial, we will see how to install, configure, and use GNS3 in Ubuntu 16.04 LTS desktop.

Install GNS3 On Linux

GNS3 is available in the default repositories of many Linux distributions. Also, GNS team offers separate repository to provide up-to-date packages. You can install it either from the official repositories or from GNS repositories.

On Arch Linux:

GNS3 is available in AUR. To install packages from AUR, you should install packer or yaourt tools. You don’t have to install both. Just install any one of them.

After installing Packer or Yaourt, run the following command to install GNS3 in Arch Linux and its derivatives such as Antergos and Manjaro Linux.

packer -S gns3-gui gns3-server

Or,

yaourt -S gns3-gui gns3-server

On Ubuntu (64-bit only):

Like I said, GNS3 is available in the default repositories of Ubuntu. Alternatively, you can add GNS repository and install the latest version as shown below.

sudo add-apt-repository ppa:gns3/ppa
sudo apt-get update
sudo apt-get install gns3-gui

During installation, you will be asked to configure wireshark for non-superusers.

Enabling non-superusers to capture pockets is a security.

So just Click No.

ostechnix@ostechnix: ~_001

If you want IOU support, then run:

sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install gns3-iou

Debian (64-bit only):

For Debian Jessie:

Open /etc/apt/sources.list file:

sudo nano /etc/apt/sources.list

Add the following lines:

deb http://ppa.launchpad.net/gns3/ppa/ubuntu trusty main

deb-src http://ppa.launchpad.net/gns3/ppa/ubuntu trusty main

Debian Stretch:

Add the following lines to the /etc/apt/sources.list file:

deb http://ppa.launchpad.net/gns3/ppa/ubuntu xenial main

deb-src http://ppa.launchpad.net/gns3/ppa/ubuntu xenial main

Save and close the file.

Finally, run the following commands in a terminal to install GNS3:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A2E3EF7B
sudo apt-get update
sudo apt-get install gns3-gui

Fedora:

In RPM distributions like Fedora, CentOS, we can install GNS3 using pip.

To install GNS3, run the following commands one by one in a Terminal:

sudo yum install python3-devel
sudo yum install python3-qt5
sudo pip3 install gns3-server
sudo pip3 install gns3-gui

GNS3 usage

Once you installed GNS3 on your preferred distro, launch it using the following command from a Terminal:

gns3

I have tested this on Ubuntu 16.04 LTS desktop.

At the first launch, you should see the following screen.

Choose a server type to run your network simulations. I would like to run them from my local system, so I selected “Local Server” option.

Ubuntu 16.04 LTS Desktop [Running] - Oracle VM VirtualBox_004

Next, you need to add the virtual network devices or virtual machines.

I’d like to add a virtual Cisco router, so I selected the first option.

Ubuntu 16.04 LTS Desktop [Running] - Oracle VM VirtualBox_005

Click Browse button to choose the IOS image for the virtual router.

Ubuntu 16.04 LTS Desktop [Running] - Oracle VM VirtualBox_006

I already have downloaded Cisco 3745 router’s IOS image in my home folder. You can download the IOS images of your choice from the Cisco or any other sites if available.

Choose the IOS image.

Ubuntu 16.04 LTS Desktop [Running] - Oracle VM VirtualBox_007

I do not want to decompress the IOS image, so I selected the option – “No”.

Ubuntu 16.04 LTS Desktop [Running] - Oracle VM VirtualBox_008

Click “Yes” to save the selected image in the default images directory.

Ubuntu 16.04 LTS Desktop [Running] - Oracle VM VirtualBox_009

Once you selected the image of your choice, click Next.

Ubuntu 16.04 LTS Desktop [Running] - Oracle VM VirtualBox_010

Choose the name and platform and chassis of your network device (Router in our case).

Ubuntu 16.04 LTS Desktop [Running] - Oracle VM VirtualBox_011

Enter the RAM size for your virtual network device.

Ubuntu 16.04 LTS Desktop [Running] - Oracle VM VirtualBox_012

Choose the default network adapters that should be inserted into your device.

Ubuntu 16.04 LTS Desktop [Running] - Oracle VM VirtualBox_013

Select the default WIC (WAN interface cards) modules that should be inserted into your router.

Ubuntu 16.04 LTS Desktop [Running] - Oracle VM VirtualBox_015

Enter the Idle-PC value. It is necessary to prevent IOS to use 100% of your processor or one of its cores. Since it is just demo purpose I left it blank.

Ubuntu 16.04 LTS Desktop [Running] - Oracle VM VirtualBox_016

Review the network device template, and click apply and OK.

Ubuntu 16.04 LTS Desktop [Running] - Oracle VM VirtualBox_017

Finally, Enter the project name and click OK.

Ubuntu 16.04 LTS Desktop [Running] - Oracle VM VirtualBox_018

Congratulations! You have successfully created a new project with a new virtual network device (Router).

This is how GNS3 workspace looks like. From here, you can create various virtual network devices and virtual machines, and interconnect them with other and start testing.

Ubuntu 16.04 LTS Desktop [Running] - Oracle VM VirtualBox_019

We already have added a virtual network router, right?

To start it, click on the Routers icon on the left bar. The list of added network devices will be found. Just click and drag it to the workplace.

Ubuntu 16.04 LTS Desktop [Running] - Oracle VM VirtualBox_020

As you in the above screen, we have added c3745 model Cisco router. To power on this device, drag it to the workplace, and right click on the device icon. Finally, click Start.

Ubuntu 16.04 LTS Desktop [Running] - Oracle VM VirtualBox_021

The network device will start now. Again, right click on it and click Console to connect with that device via Terminal.

Ubuntu 16.04 LTS Desktop [Running] - Oracle VM VirtualBox_022

The console of the selected network device will be opened in a new Terminal window.

Ubuntu 16.04 LTS Desktop [Running] - Oracle VM VirtualBox_023

Start configuring your network environment.

Ubuntu 16.04 LTS Desktop [Running] - Oracle VM VirtualBox_025

That’s it. You can add additional virtual routers from Edit -> Preferences -> IOS routers link.

Ubuntu 16.04 LTS Desktop [Running] - Oracle VM VirtualBox_026

Not just Network devices, you can also add, configure and test Virtual machines (from Oracle VirtualBox or VMWare), Docker containers etc,. in GNS3 application.

In short, GNS3 has everything you to need to setup either a simple or complex network environment, including a switch, a router, a virtual machine etc. What do you need more? Go get it and improve your networking skills.


You might want to download the following free resources related to networking and Virtualization.


That’s all for now. If you find our guides useful, please share them on social, professional networks, so that other users can also benefit. I will be here soon with another interesting and useful article. Until then, stay tuned with OSTechNix.

Cheers!

Reference links:

Thanks for stopping by!

How can I benefit from this blog:

Have a Good day!!