Saturday, June 18, 2016

Installing lastest version (1.4.6) of GNS3 in Ubuntu/Debian

GNS3 is a Graphical Network Simulator that allows emulation of
complex networks. In this lab am going to show you how to install the lasted version of it on Ubuntu/Debian distributions.
This lab was full tested in Debian 8 and Deepin 15. If you face any issue please drop me a comment.

1. Install dependencies

a. GNS3 dependencies

sudo apt-get install gcc
sudo apt-get install python3-setuptools
sudo apt-get install python3-dev
sudo apt-get install python3-netifaces
sudo apt-get install python3-pyqt4
sudo apt-get install python3-ws4py
sudo apt-get install python3-tornado
sudo apt-get install python3-zmq

b. Dyamips dependencies
The dynamips hypervisor is a program that emulates Cisco MIPS based router hardware, allowing you to run select IOS image files in GNS3. Using dynamips you can run IOS images for Cisco c1700, c2600, c3600, 3700, and 7200 series routers.

sudo apt-get install cmake
sudo apt-get install libelf-dev
sudo apt-get install uuid-dev
sudo apt-get install libpcap-dev

2. Install GNS3 from source

a. Download it

Check the latest release from here,
https://github.com/GNS3/gns3-gui/releases

As on time of compiling this howto the lasted release was version 1.4.6

On download section, download the file with .source.zip extension.

Use the terminal to change to directory containing the dowloand file and extract it.

unzip GNS3-1.4.6.source.zip -d GNS3-1.4.6.source
cd GNS3-1.4.6.source

The GNS3 software is made up of two main components; a server application, and a GUI application. This provides a great amount of flexibility by allowing you to run multiple servers on different PCs. Leveraging this feature, you can create large GNS3 networks.

b. Install GNS3 server

unzip gns3-server-1.4.6.zip
cd gns3-server-1.4.6/
sudo python3 setup.py install
cd ..

During installation it will download some packages online, make sure it finishes, below is expected final output
.
.
Using /usr/lib/python3/dist-packages
Finished processing dependencies for gns3-server==1.4.6

c. Install GNS3 gui

unzip gns3-gui-1.4.6.zip
cd gns3-gui-1.4.6
sudo python3 setup.py install
cd ..

During installation it will download some packages online, make sure it finishes, below is expected final output
.
.

Using /usr/lib/python3/dist-packages
Finished processing dependencies for gns3-gui==1.4.6

d. Install Dynamips Hypervisor

unzip dynamips-0.2.16.zip
cd dynamips-0.2.16/
mkdir build
cd build
cmake ..
make
sudo make install
sudo setcap cap_net_admin,cap_net_raw=ep /usr/local/bin/dynamips
cd .././..

Make sure everything finishes without any error.

d. Install IOU prerequisites

sudo apt-get install libssl1.0.0:i386
sudo ln -s /lib/i386-linux-gnu/libcrypto.so.1.0.0 /lib/libcrypto.so.4
sudo apt-get install bison
sudo apt-get install flex
sudo apt-get install git
git clone http://github.com/ndevilla/iniparser.git
cd iniparser
make
sudo cp libiniparser.* /usr/lib/
sudo cp src/iniparser.h /usr/local/include
sudo cp src/dictionary.h /usr/local/include
cd ..

e. Install GNS3 IOUYAP

unzip iouyap-0.97.zip
cd iouyap-0.97/
sudo make install
sudo cp iouyap /usr/local/bin
cd ..

f. Install VPCS

unzip vpcs-0.6.1.zip
cd vpcs-0.6.1/src
./mk.sh
sudo cp vpcs /usr/local/bin/
cd ../..

g. Install Ubridge
unzip ubridge-0.9.4.zip
cd ubridge-0.9.4/
make
sudo make install
cd ..

3. Install other supporting software Cpulimit, Virtualbox, QEMU and Wireshart

The cpulimit application allows GNS3 to reduce CPU usage when running Cisco ASA devices in GNS3. With VirtualBox installed you can link emulated VirtualBox devices with other GNS3 devices. QEMU (Quick Emulator) is another PC hypervisor, and it is used to create and run Cisco ASA and other devices in GNS3. Wireshark is a powerful packet analyzer; using Wireshark you can sniff packets from your virtual GNS3 networks and analyze them, just as you can in the real world. Enter the following commands to complete your installation.

sudo apt-get install cpulimit
sudo apt-get install virtualbox
sudo apt-get install qemu
sudo apt-get install wireshark

4. Start GNS3
gns3

Note:
If you get below message:

Please install the PyQt5.QtSvg module

Install the module using the command:

sudo apt-get install PyQt5.QtSvg


After installation of the module you will be able to run gns3 on command line without problem.