The GNS3 installation instructions recommend to use the Ubuntu PPA repository for Debian. While Ubuntu and Debian use similar software versions, the (small) differences might result in some issues. Therefore I prefer installing GNS3 from source.
I’m showing the installation of GNS3 v2.1.x and v2.2.x for Debian 10 (Buster). With some adaptions this should also work for other Debian based distributions.
In some cases I’m using the apt-get parameter
--no-install-recommends to save space by
installing only the packages needed for GNS3.
If you are planning to use the installed software also for other purposes,
you may want to install the complete set of packages by removing the
--no-install-recommends option from the apt-get commands.
Install Development Environment
sudo apt-get install gcc make cmake sudo apt-get install libelf-dev libpcap0.8-dev
sudo apt-get install python3-setuptools sudo apt-get install --no-install-recommends python3-pip python3-dev python3-wheel
If a python modules is installed both by apt-get and pip3, the pip3 version takes precedence. To avoid problems caused by different versions of apt-get/pip3 modules, I strongly suggest to install major python modules by apt-get. In our case, that’s PyQt5.
sudo apt-get install python3-pyqt5 python3-pyqt5.qtsvg python3-pyqt5.qtwebsockets
sudo pip3 install gns3-server sudo pip3 install gns3-gui
Starting with version 2.2.5 GNS3 includes the files for integration into the desktop. When installing earlier GNS3 versions you need to download the desktop file archive gns3-gui-desktop.tar.gz and install it:
sudo tar xfz gns3-gui-desktop.tar.gz -C /usr/local/share/
Finally the caches for the desktop files must be updated:
sudo update-mime-database /usr/local/share/mime sudo update-desktop-database /usr/local/share/applications
Install additional Tools
Download the latest uBridge source code (tar.gz) from https://github.com/GNS3/ubridge/releases and install it:
tar xvfz <uBridge source archive> cd ubridge-<version> make sudo make install cd ..
Download the latest Dynamips source code (tar.gz) from https://github.com/GNS3/dynamips/releases and install it:
tar xvfz <Dynamips source archive> cd dynamips-<version> mkdir build cd build cmake .. make sudo make install cd ../..
Download the VPCS binary (the “vpcs” file) of version 0.8beta1 or 0.6.1 from https://github.com/GNS3/vpcs/releases and install it:
sudo install vpcs /usr/local/bin
sudo apt-get install --no-install-recommends qemu-system-x86 qemu-utils ovmf sudo usermod -a -G kvm <user-who-will-run-GNS3>
If the user, who will run GNS3, is currently logged in, he should logout and re-login to activate the KVM group membership.
I’m using here the docker package provided by Debian. Alternatively you can install Docker from https://docs.docker.com/install/linux/docker-ce/debian/.
sudo apt-get install docker.io sudo apt-get install tigervnc-standalone-server sudo usermod -a -G docker <user-who-will-run-GNS3>
If the user, who will run GNS3, is currently logged in, he should logout and re-login to activate the docker group membership.
As IOU images are 32 bit programs, the 32 bit version of the system library packages have to be installed.
sudo dpkg --add-architecture i386 sudo apt-get update sudo apt-get install --no-install-recommends libssl1.1:i386 sudo ln -s libcrypto.so.1.1 /usr/lib/i386-linux-gnu/libcrypto.so.4 sudo sh -c 'printf "\0\0\0\0" > /etc/hostid' sudo sh -c 'printf "\n127.0.0.127\txml.cisco.com\n" >> /etc/hosts'
The NAT cloud requires the installation of the libvirt package.
sudo apt-get install libvirt-daemon-system sudo sh -c 'echo "net.ipv4.ip_forward=1" > /etc/sysctl.d/ip_forward.conf' sudo virsh net-autostart default
Afterwards reboot the computer.
For using VMs with graphical user interfaces a VNC viewer is needed. A SPICE viewer is optional, but would be nice as well. The virt-viewer package contains remote-viewer, which supports both protocols.
sudo apt-get install --no-install-recommends virt-viewer
In the GNS3 GUI preferences -> General -> VNC set the VNC
The SPICE application is set to remote-viewer by default.
During the wireshark installation respond to the question “Should non-superusers be able to capture packets?” with Yes.
sudo apt-get install wireshark sudo usermod -a -G wireshark <user-who-will-run-wireshark>
If the user, who will run Wireshark, is currently logged in, he should logout and re-login to activate the wireshark group membership.
Upgrade GNS3 to latest stable Version
sudo pip3 install -U gns3-server sudo pip3 install -U gns3-gui
Upgrade/Downgrade GNS3 to a specific Version
sudo pip3 install gns3-server==<version> sudo pip3 install gns3-gui==<version>