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
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.
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
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
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
Once you installed GNS3 on your preferred distro, launch it using the following command from a Terminal:
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.
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.
Click Browse button to choose the IOS image for the virtual router.
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.
I do not want to decompress the IOS image, so I selected the option - "No".
Click "Yes" to save the selected image in the default images directory.
Once you selected the image of your choice, click Next.
Choose the name and platform and chassis of your network device (Router in our case).
Enter the RAM size for your virtual network device.
Choose the default network adapters that should be inserted into your device.
Select the default WIC (WAN interface cards) modules that should be inserted into your router.
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.
Review the network device template, and click apply and OK.
Finally, Enter the project name and click OK.
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.
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.
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.
The network device will start now. Again, right click on it and click Console to connect with that device via Terminal.
The console of the selected network device will be opened in a new Terminal window.
Start configuring your network environment.
That's it. You can add additional virtual routers from Edit -> Preferences -> IOS routers link.
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.