We are committed to provide service 24 X 7

Deals, Shopping, Training, Tools

Learn how to – How To Install GNS3 on Kali Linux 2022.x

Learn how to – How To Install GNS3 on Kali Linux 2022.x.

GNS3 team is working smarter and harder day by day to make GNS3 a must go to tool when learning and testing Network implementation scenario. GNS3 is a Graphical Network Simulator that allows emulation of complex networks. It is an essential tool when preparing for Networking certifications such CCNA, JNCIA, CCNP as well as CCIE level. With every new release there are new features added as well as improvements on existing.

In this article we will be discussing the installation of GNS3 on Kali Linux rolling editions. The GNS3 project has evolved to support many devices from multiple network vendors including Cisco virtual switches, Cisco ASAs, Brocade vRouters, Cumulus Linux switches, Docker instances, HPE VSRs, multiple Linux appliances and many others.

Some core features of GNS3 are:

  • Fully free and Open Source – No monthly or yearly license fees
  • There is no limit on the number of devices supported – CPU and RAM hardware is your only limitation
  • GNS3 supports all VIRL images (IOSv, IOSvL2, IOS-XRv, CSR1000v, NX-OSv, ASAv)
  • GNS3 can run with or without hypervisors in multi-vendor environments
  • It has support for multiple switching options (ESW16 Etherswitch, IOU/IOL Layer 2 images, VIRL IOSvL2)
  • GNS3 supports both free and paid hypervisors – Virtualbox, VMware Workstation, VMware Player, ESXi, Fusion
  • GNS3 has native support for Linux without the need for need for additional virtualization software

Step 1: Update System

Begin the installation by updating the system and all packages installed to the latest versions.

sudo apt update
sudo apt upgrade

Since the upgrade could contain updates check if upgrade is required.

[ -f /var/run/reboot-required ] && sudo reboot -f

Step 2: Install required dependencies

Make sure your Kali Linux has correct repositories configured.

Update package APT index:

$ sudo apt update
Get:1 http://kali.download/kali kali-rolling InRelease [30.5 kB]         
Get:2 http://kali.download/kali kali-rolling/contrib Sources [63.7 kB]
Get:4 http://kali.download/kali kali-rolling/main Sources [13.8 MB]
Get:8 http://kali.download/kali kali-rolling/non-free Sources [127 kB]                                                                                                                                                    
Get:9 http://kali.download/kali kali-rolling/main amd64 Packages [17.5 MB]                                                                                                                                                
Get:10 http://kali.download/kali kali-rolling/non-free amd64 Packages [202 kB]                                                                                                                                            
Get:11 http://kali.download/kali kali-rolling/contrib amd64 Packages [106 kB]                                                                                                                                             
Fetched 28.2 MB in 16s (1,769 kB/s)                                                                                                                                                                                       
Reading package lists... Done
Building dependency tree       
Reading state information... Done

Install the following software dependencies

sudo apt install -y python3-pip python3-pyqt5 python3-pyqt5.qtsvg python3-pyqt5.qtwebsockets qemu qemu-kvm qemu-utils libvirt-clients libvirt-daemon-system virtinst wireshark xtightvncviewer apt-transport-https ca-certificates curl gnupg2 software-properties-common

Step 3: Install GNS3 on Kali Linux Rolling

Finally perform the installation of GNS3 on Kali Linux Rolling release.

Install GNS3 Server component

$ sudo pip3 install gns3-server
Collecting gns3-server
  Downloading gns3-server-2.2.29.tar.gz (10.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 10.0/10.0 MB 45.8 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Requirement already satisfied: Jinja2==3.0.1 in /usr/lib/python3/dist-packages (from gns3-server) (3.0.1)
Collecting aiofiles==0.7.0
  Downloading aiofiles-0.7.0-py3-none-any.whl (13 kB)
Collecting aiohttp-cors==0.7.0
  Downloading aiohttp_cors-0.7.0-py3-none-any.whl (27 kB)
Collecting aiohttp==3.7.4.post0
  Downloading aiohttp-3.7.4.post0-cp39-cp39-manylinux2014_x86_64.whl (1.4 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.4/1.4 MB 74.1 MB/s eta 0:00:00
Collecting async-timeout==3.0.1
  Downloading async_timeout-3.0.1-py3-none-any.whl (8.2 kB)
Requirement already satisfied: distro==1.6.0 in /usr/lib/python3/dist-packages (from gns3-server) (1.6.0)
Requirement already satisfied: jsonschema==3.2.0 in /usr/lib/python3/dist-packages (from gns3-server) (3.2.0)
Collecting psutil==5.8.0
  Downloading psutil-5.8.0-cp39-cp39-manylinux2010_x86_64.whl (293 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 293.5/293.5 KB 56.3 MB/s eta 0:00:00
Collecting py-cpuinfo==8.0.0
  Downloading py-cpuinfo-8.0.0.tar.gz (99 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 99.8/99.8 KB 28.0 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting sentry-sdk==1.3.1
  Downloading sentry_sdk-1.3.1-py2.py3-none-any.whl (133 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 133.6/133.6 KB 30.1 MB/s eta 0:00:00
Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from gns3-server) (59.6.0)
Requirement already satisfied: yarl<2.0,>=1.0 in /usr/lib/python3/dist-packages (from aiohttp==3.7.4.post0->gns3-server) (1.6.3)
Requirement already satisfied: typing-extensions>=3.6.5 in /usr/lib/python3/dist-packages (from aiohttp==3.7.4.post0->gns3-server) (3.10.0.2)
Requirement already satisfied: multidict<7.0,>=4.5 in /usr/lib/python3/dist-packages (from aiohttp==3.7.4.post0->gns3-server) (5.1.0)
Requirement already satisfied: chardet<5.0,>=2.0 in /usr/lib/python3/dist-packages (from aiohttp==3.7.4.post0->gns3-server) (4.0.0)
Requirement already satisfied: attrs>=17.3.0 in /usr/lib/python3/dist-packages (from aiohttp==3.7.4.post0->gns3-server) (21.2.0)
Requirement already satisfied: certifi in /usr/lib/python3/dist-packages (from sentry-sdk==1.3.1->gns3-server) (2020.6.20)
Requirement already satisfied: urllib3>=1.10.0 in /usr/lib/python3/dist-packages (from sentry-sdk==1.3.1->gns3-server) (1.26.5)
Building wheels for collected packages: gns3-server, py-cpuinfo
  Building wheel for gns3-server (setup.py) ... done
  Created wheel for gns3-server: filename=gns3_server-2.2.29-py3-none-any.whl size=10944028 sha256=70f3a2e737b6c9c551d964e4cdcbdfff4a9d8207506d4b212ed2610c1b29a827
  Stored in directory: /root/.cache/pip/wheels/cb/5b/22/3c3b43bd8adfbca6a509c05edfa71422a09e4ebf9b124a34a0
  Building wheel for py-cpuinfo (setup.py) ... done
  Created wheel for py-cpuinfo: filename=py_cpuinfo-8.0.0-py3-none-any.whl size=22257 sha256=301814a7bd4a129c55aaa1ccbb382f33e472216f2bf6a10b2950af3636d82a57
  Stored in directory: /root/.cache/pip/wheels/a9/33/c2/bcf6550ff9c95f699d7b2f261c8520b42b7f7c33b6e6920e29
Successfully built gns3-server py-cpuinfo
Installing collected packages: py-cpuinfo, sentry-sdk, psutil, async-timeout, aiofiles, aiohttp, aiohttp-cors, gns3-server
....

Wait for installation to complete then install the GUI component.

$ sudo pip3 install gns3-gui
Collecting gns3-gui
  Downloading gns3-gui-2.2.29.tar.gz (4.8 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.8/4.8 MB 64.2 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Requirement already satisfied: distro==1.6.0 in /usr/lib/python3/dist-packages (from gns3-gui) (1.6.0)
Requirement already satisfied: jsonschema==3.2.0 in /usr/lib/python3/dist-packages (from gns3-gui) (3.2.0)
Requirement already satisfied: psutil==5.8.0 in /usr/local/lib/python3.9/dist-packages (from gns3-gui) (5.8.0)
Requirement already satisfied: sentry-sdk==1.3.1 in /usr/local/lib/python3.9/dist-packages (from gns3-gui) (1.3.1)
Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from gns3-gui) (59.6.0)
Requirement already satisfied: urllib3>=1.10.0 in /usr/lib/python3/dist-packages (from sentry-sdk==1.3.1->gns3-gui) (1.26.5)
Requirement already satisfied: certifi in /usr/lib/python3/dist-packages (from sentry-sdk==1.3.1->gns3-gui) (2020.6.20)
Building wheels for collected packages: gns3-gui
  Building wheel for gns3-gui (setup.py) ... done
  Created wheel for gns3-gui: filename=gns3_gui-2.2.29-py3-none-any.whl size=3706020 sha256=898de52f2a3e96f92760e6cf105c000f59c65729ef4f3068518f60a83e52a390
  Stored in directory: /root/.cache/pip/wheels/90/b8/17/be9f008155e3adc440ce7b9477002e1a7d0795555431de0029
Successfully built gns3-gui
Installing collected packages: gns3-gui
Successfully installed gns3-gui-2.2.29

You can start GNS3 from CLI

$ gns3

Or by searching the GNS3 application from Desktop and starting it.

The next steps will be GNS3 Setup Wizard for your Local server then proceeding to create your first GNS3 topology.

Step 4: Setting up Docker Support

If you want Docker support in your GNS3 you’ll need to install Docker CE by following steps in the guide below.

Then add GNS3 repository

sudo tee /etc/apt/sources.list.d/gns3.list<<EOF
deb http://ppa.launchpad.net/gns3/ppa/ubuntu bionic main
deb-src http://ppa.launchpad.net/gns3/ppa/ubuntu bionic main
EOF

Import GPG repository key:

$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F88F6D313016330404F710FC9A2FD067A2E3EF7B                                                                                                             

Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
Executing: /tmp/apt-key-gpghome.WQqu0nldXm/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys F88F6D313016330404F710FC9A2FD067A2E3EF7B
gpg: key 9A2FD067A2E3EF7B: public key "Launchpad PPA for GNS3" imported
gpg: Total number processed: 1
gpg:               imported: 1

Update APT package index:

sudo apt update

Then install dynamips ubridge:

$ sudo apt install dynamips ubridge
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  gns3
The following NEW packages will be installed:
  dynamips ubridge
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 391 kB of archives.
After this operation, 1,190 kB of additional disk space will be used.
Get:1 http://ppa.launchpad.net/gns3/ppa/ubuntu bionic/main amd64 dynamips amd64 0.2.21-1~bionic1 [358 kB]
Get:2 http://ppa.launchpad.net/gns3/ppa/ubuntu bionic/main amd64 ubridge amd64 0.9.18-1~bionic1 [32.8 kB]                                                                                                                   
Fetched 391 kB in 9s (44.6 kB/s)                                                                                                                                                                                            
Preconfiguring packages ...
Selecting previously unselected package dynamips.
(Reading database ... 275469 files and directories currently installed.)
Preparing to unpack .../dynamips_0.2.21-1~bionic1_amd64.deb ...
Unpacking dynamips (0.2.21-1~bionic1) ...
Selecting previously unselected package ubridge.
Preparing to unpack .../ubridge_0.9.18-1~bionic1_amd64.deb ...
Unpacking ubridge (0.9.18-1~bionic1) ...
Setting up dynamips (0.2.21-1~bionic1) ...
Setting up ubridge (0.9.18-1~bionic1) ...
Processing triggers for man-db (2.9.3-2) ...
Processing triggers for kali-menu (2021.1.2) ...

Add your user to the following groups:

sudo usermod -aG kvm,libvirt,docker,ubridge,wireshark $USER

To prevent accidentally installing anything else from that repo (for now), remove comment out lines in the file.

sudo tee /etc/apt/sources.list.d/gns3.list<<EOF
#deb http://ppa.launchpad.net/gns3/ppa/ubuntu bionic main
#deb-src http://ppa.launchpad.net/gns3/ppa/ubuntu bionic main
EOF

Refresh metadata

sudo apt update

Recommended networking books:

Cart

Your Cart is Empty

Back To Shop