GNS Linux Install Summary

In this article I will cover installing a GNS3 Linux installation on an Ubuntu 18.04 based desktop/workstation. This is going to be performed on a fresh install on my Linux SSD drive that I use specifically for GNS3.


GNS3 Linux System Prep

The first step in the GNS3 Linux installation is to ensure a number of things are in place and ready before we beginning. Since GNS3 maintains official PPA’s, I recommend most people use an Ubuntu LTS release (16.04 or 18.04) for the easiest installation. There are ways of getting GNS3 running on other distros. However, I have had varying degrees of success and stability. Please note that all commands executed in this article were done from root (sudo -s).

If you want to learn more about GNS3, you may be interested in The Book of GNS3 available on Amazon as paperback or Kindle. Check it out using our Amazon affiliate link, https://amzn.to/322eKCO.


Checking installed Ubuntu version and ensuring latest updates

Before we begin we want to ensure we are running an LTS based distro, in my case Pop! OS 18.04. We also want to be sure the OS is up to date before we begin.

[email protected]:~# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Pop!_OS 18.04 LTS"

[email protected]:~# apt-get update && apt-get dist-upgrade
Hit:1 http://ppa.launchpad.net/system76/pop/ubuntu bionic InRelease                          
Hit:2 http://us.archive.ubuntu.com/ubuntu bionic InRelease                                                       
Hit:3 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease                                                        
Hit:4 http://us.archive.ubuntu.com/ubuntu bionic-security InRelease                                                                     
Hit:5 http://apt.pop-os.org/proprietary bionic InRelease                                                                                
Hit:6 http://us.archive.ubuntu.com/ubuntu bionic-backports InRelease                                              
Hit:7 https://download.sublimetext.com apt/stable/ InRelease                                
Reading package lists... Done                              
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Checking for Virtualization Support

GNS3 will require virtualization support by your hardware. This will usually be found in the BIOS under CPU options and is typically referred to as Intel-VT on Intel platforms and SVM on AMD platforms. We can check the status from the OS level by either looking for the Kernel modules or by using the KVM-OK tool in the cpu-checker package. If your system does not pass KVM OK then consult your owners manual for information on enabling virtualization support in your bios.

[email protected]:~# lsmod | grep kvm
kvm_amd                94208  0
kvm                   626688  1 kvm_amd
irqbypass              16384  1 kvm
ccp                    86016  7 kvm_amd

[email protected]:~# apt-get install cpu-checker

[email protected]:~# kvm-ok
INFO: /dev/kvm exists
KVM acceleration can be used

Installing the Base GNS3 packages

Adding GNS3 PPA

We can proceed with adding the GNS3 PPA now that we have confirmed that the system is up to date and supports KVM acceleration.

[email protected]:~# add-apt-repository ppa:gns3/ppa
 PPA for GNS3 and Supporting Packages. Please see http://www.gns3.com for more details
 More info: https://launchpad.net/~gns3/+archive/ubuntu/ppa
Press [ENTER] to continue or Ctrl-c to cancel adding it.

Hit:1 https://download.sublimetext.com apt/stable/ InRelease
Get:2 http://ppa.launchpad.net/gns3/ppa/ubuntu bionic InRelease [15.3 kB]                
Hit:3 http://us.archive.ubuntu.com/ubuntu bionic InRelease                                                                                         
Hit:4 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease                                      
Hit:5 http://ppa.launchpad.net/system76/pop/ubuntu bionic InRelease                                    
Hit:6 http://us.archive.ubuntu.com/ubuntu bionic-security InRelease                                                                
Hit:7 http://us.archive.ubuntu.com/ubuntu bionic-backports InRelease                                                               
Get:8 http://ppa.launchpad.net/gns3/ppa/ubuntu bionic/main amd64 Packages [1,736 B]                                                
Get:9 http://ppa.launchpad.net/gns3/ppa/ubuntu bionic/main i386 Packages [1,240 B]                                                  
Get:10 http://ppa.launchpad.net/gns3/ppa/ubuntu bionic/main Translation-en [836 B]                       
Hit:11 http://apt.pop-os.org/proprietary bionic InRelease                         
Fetched 19.2 kB in 2s (8,980 B/s)
Reading package lists... Done

[email protected]:~# apt-get update
Hit:1 http://us.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease                                                              
Hit:3 http://ppa.launchpad.net/gns3/ppa/ubuntu bionic InRelease                                                                 
Hit:4 http://us.archive.ubuntu.com/ubuntu bionic-security InRelease                                                                                         
Hit:5 https://download.sublimetext.com apt/stable/ InRelease                                                                                                
Hit:6 http://us.archive.ubuntu.com/ubuntu bionic-backports InRelease                                
Hit:7 http://ppa.launchpad.net/system76/pop/ubuntu bionic InRelease                                 
Hit:8 http://apt.pop-os.org/proprietary bionic InRelease                          
Reading package lists... Done  

Performing the GNS3 Install

The next step in the GNS3 Linux installation is the install of the GNS3 packages. Since this is a workstation we will install the GNS3-GUI package which will pull in all of the dependencies required followed by some interactive prompts.

For most workstation environments you will want non root users to be able to run GNS3 and we will cover adding correct group permissions at a later section.

[email protected]:~# apt-get install gns3-gui
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  augeas-lenses bridge-utils cpulimit dynamips ebtables gns3-server ibverbs-providers ipxe-qemu ipxe-qemu-256k-compat-efi-roms libaio1 libaugeas0 libavahi-gobject0
  libavahi-ui-gtk3-0 libc-ares2 libcacard0 libdouble-conversion1 libfdt1 libfreerdp2-2 libgtk-vnc-2.0-0 libgvnc-1.0-0 libibverbs1 libiscsi7 libmaxminddb0 libnetcf1 libnl-route-3-200
  libphodav-2.0-0 libphodav-2.0-common libqgsttools-p1 libqt5core5a libqt5dbus5 libqt5designer5 libqt5gui5 libqt5help5 libqt5multimedia5 libqt5multimedia5-plugins
  libqt5multimediawidgets5 libqt5network5 libqt5opengl5 libqt5printsupport5 libqt5sql5 libqt5sql5-sqlite libqt5svg5 libqt5test5 libqt5websockets5 libqt5widgets5 libqt5xml5 librados2
  librbd1 librdmacm1 libsdl1.2debian libsmi2ldbl libsnappy1v5 libspandsp2 libspice-client-glib-2.0-8 libspice-client-gtk-3.0-5 libspice-server1 libssh-gcrypt-4 libtcl8.6 libtk8.6
  libusbredirhost1 libusbredirparser1 libvirt-bin libvirt-clients libvirt-daemon libvirt-daemon-driver-storage-rbd libvirt-daemon-system libvirt0 libvncclient1 libvncserver1
  libwinpr2-2 libwireshark-data libwireshark11 libwiretap8 libwscodecs2 libwsutil9 libxcb-xinerama0 libxen-4.9 libxenstore3.0 libxml2-utils python3-pyqt5 python3-pyqt5.qtsvg
  python3-pyqt5.qtwebsockets python3-sip qemu-block-extra qemu-kvm qemu-system-arm qemu-system-common qemu-system-x86 qemu-utils qt5-gtk-platformtheme qttranslations5-l10n seabios
  sharutils spice-client-glib-usb-acl-helper tcl tcl8.6 tk tk8.6 ubridge vinagre vpcs wireshark wireshark-common wireshark-qt x11vnc x11vnc-data xvfb
Suggested packages:
  augeas-doc gns3 augeas-tools freerdp2-x11 mmdb-bin qt5-image-formats-plugins qtwayland5 snmp-mibs-downloader gstreamer1.0-plugins-bad gstreamer1.0-libav
  libvirt-daemon-driver-storage-gluster libvirt-daemon-driver-storage-sheepdog libvirt-daemon-driver-storage-zfs numad radvd auditd systemtap nfs-common zfsutils pm-utils
  wireshark-doc python3-pyqt5-dbg samba vde2 qemu-efi sgabios ovmf debootstrap sharutils-doc bsd-mailx | mailx tcl-tclreadline
The following NEW packages will be installed:
  augeas-lenses bridge-utils cpulimit dynamips ebtables gns3-gui gns3-server ibverbs-providers ipxe-qemu ipxe-qemu-256k-compat-efi-roms libaio1 libaugeas0 libavahi-gobject0
  libavahi-ui-gtk3-0 libc-ares2 libcacard0 libdouble-conversion1 libfdt1 libfreerdp2-2 libgtk-vnc-2.0-0 libgvnc-1.0-0 libibverbs1 libiscsi7 libmaxminddb0 libnetcf1 libnl-route-3-200
  libphodav-2.0-0 libphodav-2.0-common libqgsttools-p1 libqt5core5a libqt5dbus5 libqt5designer5 libqt5gui5 libqt5help5 libqt5multimedia5 libqt5multimedia5-plugins
  libqt5multimediawidgets5 libqt5network5 libqt5opengl5 libqt5printsupport5 libqt5sql5 libqt5sql5-sqlite libqt5svg5 libqt5test5 libqt5websockets5 libqt5widgets5 libqt5xml5 librados2
  librbd1 librdmacm1 libsdl1.2debian libsmi2ldbl libsnappy1v5 libspandsp2 libspice-client-glib-2.0-8 libspice-client-gtk-3.0-5 libspice-server1 libssh-gcrypt-4 libtcl8.6 libtk8.6
  libusbredirhost1 libusbredirparser1 libvirt-bin libvirt-clients libvirt-daemon libvirt-daemon-driver-storage-rbd libvirt-daemon-system libvirt0 libvncclient1 libvncserver1
  libwinpr2-2 libwireshark-data libwireshark11 libwiretap8 libwscodecs2 libwsutil9 libxcb-xinerama0 libxen-4.9 libxenstore3.0 libxml2-utils python3-pyqt5 python3-pyqt5.qtsvg
  python3-pyqt5.qtwebsockets python3-sip qemu-block-extra qemu-kvm qemu-system-arm qemu-system-common qemu-system-x86 qemu-utils qt5-gtk-platformtheme qttranslations5-l10n seabios
  sharutils spice-client-glib-usb-acl-helper tcl tcl8.6 tk tk8.6 ubridge vinagre vpcs wireshark wireshark-common wireshark-qt x11vnc x11vnc-data xvfb
0 upgraded, 108 newly installed, 0 to remove and 0 not upgraded.

Once this process has completed you have the base GNS3 packages installed. If you do not want/need IOU or Docker support then you can skip ahead to user configuration and GNS3 initial setup.


Optional – Installing IOU Support

If you plan on using Cisco IOU images then you will need to enable 32bit packages on your install. Then install the GNS3 IOU support package. This is one of the reasons I typically suggest sticking with Ubuntu LTS for a GNS3 Linux installation as getting IOU functional on other distro’s can require more effort.


Enabling 32 Bit packages

[email protected]:~# sudo dpkg --add-architecture i386
[email protected]:~# sudo apt-get update
Hit:1 https://download.sublimetext.com apt/stable/ InRelease
Hit:2 http://us.archive.ubuntu.com/ubuntu bionic InRelease               
Hit:3 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease       
Hit:4 http://ppa.launchpad.net/gns3/ppa/ubuntu bionic InRelease         
Hit:5 http://us.archive.ubuntu.com/ubuntu bionic-security InRelease     
Hit:6 http://us.archive.ubuntu.com/ubuntu bionic-backports InRelease                                
Hit:7 http://ppa.launchpad.net/system76/pop/ubuntu bionic InRelease                                 
Hit:8 http://apt.pop-os.org/proprietary bionic InRelease                          
Reading package lists... Done  

Installing IOU support package

[email protected]:~# sudo apt-get install gns3-iou
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  iouyap lib32z1 libc6-i386 libssl1.0.0:i386
The following NEW packages will be installed:
  gns3-iou iouyap lib32z1 libc6-i386 libssl1.0.0:i386
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 3,650 kB of archives.

Optional – Installing Docker Support

If you want docker support, which I strongly recommend, then you will need the official docker packages. This requires removing any distro provided packages, should they be installed, and then adding the docker repo.


Installing Required packages (Most installs already have them)

[email protected]:~# apt-get install apt-transport-https ca-certificates curl software-properties-common
Reading package lists... Done
Building dependency tree       
Reading state information... Done
ca-certificates is already the newest version (20180409).
software-properties-common is already the newest version (0.96.24.32.7).
apt-transport-https is already the newest version (1.6.6).
curl is already the newest version (7.58.0-2ubuntu3.5pop1).
curl set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Removing distro shipped Docker

[email protected]:~# sudo apt-get remove docker docker-engine docker.io
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package 'docker-engine' is not installed, so not removed
Package 'docker' is not installed, so not removed
Package 'docker.io' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Import Docker GPG key and add repo

[email protected]:~# curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
OK

[email protected]:~# add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
Hit:1 http://ppa.launchpad.net/gns3/ppa/ubuntu bionic InRelease
Hit:2 http://us.archive.ubuntu.com/ubuntu bionic InRelease                                                                                                                                       
Hit:3 http://ppa.launchpad.net/system76/pop/ubuntu bionic InRelease                                                                                                                  
Hit:4 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease                                                                                                                  
Get:5 https://download.docker.com/linux/ubuntu bionic InRelease [64.4 kB]                                                                                     
Hit:6 http://us.archive.ubuntu.com/ubuntu bionic-security InRelease                                                                          
Hit:7 http://us.archive.ubuntu.com/ubuntu bionic-backports InRelease                                                                         
Hit:8 https://download.sublimetext.com apt/stable/ InRelease             
Get:9 https://download.docker.com/linux/ubuntu bionic/stable amd64 Packages [3,695 B]
Hit:10 http://apt.pop-os.org/proprietary bionic InRelease  
Fetched 68.1 kB in 2s (30.8 kB/s)             
Reading package lists... Done

[email protected]:~# apt-get update
Hit:1 http://apt.pop-os.org/proprietary bionic InRelease
Hit:2 https://download.docker.com/linux/ubuntu bionic InRelease                                                                                                                       
Hit:3 http://ppa.launchpad.net/gns3/ppa/ubuntu bionic InRelease                                                                                                                       
Hit:4 https://download.sublimetext.com apt/stable/ InRelease                                                                                                    
Hit:5 http://ppa.launchpad.net/system76/pop/ubuntu bionic InRelease                                                                                      
Hit:6 http://us.archive.ubuntu.com/ubuntu bionic InRelease               
Hit:7 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:8 http://us.archive.ubuntu.com/ubuntu bionic-security InRelease
Hit:9 http://us.archive.ubuntu.com/ubuntu bionic-backports InRelease

Installing Docker from Docker repo

[email protected]:~# sudo apt-get install docker-ce
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  aufs-tools cgroupfs-mount containerd.io docker-ce-cli
The following NEW packages will be installed:
  aufs-tools cgroupfs-mount containerd.io docker-ce docker-ce-cli
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 50.6 MB of archives.
After this operation, 242 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y

User Configuration

Now that we have installed GNS3, along with any optional packages, we can proceed to configuring our user groups to ensure the application functions.


Check current group membership

[email protected]:~# groups jbrooks
jbrooks adm sudo

As you can see my user is not a member of any groups that are going to be needed for GNS3 so we can now add them using usermod. Below are the required GNS3 groups for base functionality


Add GNS3 required group membership

[email protected]:~# usermod -a -G ubridge jbrooks
[email protected]:~# usermod -a -G libvirt jbrooks
[email protected]:~# usermod -a -G kvm jbrooks
[email protected]:~# usermod -a -G wireshark jbrooks

If you installed docker support you will also need the docker group for container control.


Add Docker required group membership

[email protected]:~# usermod -a -G docker jbrooks

Now if you check the group membership we can see that the user has all of our desired groups. Now that the installation is completed you will need to either log out of the session or reboot the machine before proceeding with the 1st run setup.


Confirm group membership

[email protected]:~# groups jbrooks
jbrooks : jbrooks adm sudo kvm ubridge libvirt wireshark docker
[email protected]:~# shutdown -r now

Performing 1st run setup

Now that you’ve successfully completed a GNS3 Linux installation and are back on a fresh login we can start the 1st run process. To do so either launch GNS3 from your application launcher or from the terminal as your normal user.

[email protected]:~$ gns3

Setup Wizard

The 1st run of GNS3 will start the setup wizard where we will select run the toplogies on my computer. This sets up the local GNS3 server to run projects. From here we will follow the prompts keeping the default settings and clicking finish once validated.


New Appliance Template

Once you have finished you will be greeted with the New appliance template screen. For now you will simply want to hit cancel or the X in the corner.


New Project Prompt

You will now be presented with a new project prompt. For now we need to go into settings so select that option rather than creating a new project.


Settings

Now that we are in the settings menu you will want to confirm your project/image storage locations (If your intended storage is NOT mounted at /home/ then move these as appropriate) You will also need to ensure that your desired applications, such as terminal emulator, are configured.


Privacy Settings

If so inclined, like myself, you can disable telemetry under the Miscellaneous tab. Once all your settings have been updated click Apply and then OK.


GNS3 Linux Installation Completed

Your GNS3 Linux installation is now complete and you can begin importing appliances and creating projects. I will cover a number of common appliances in future articles.

You’ve now completed your GNS3 Linux installation. If you want to read more articles on GNS3 then click here!