In this article, we will examine how to set up and use the GNS3 (Graphical Network Simulator 3) network software, which is used to prepare professionally for Cisco exams on a computer with the famous Debian 11 Bullseye operating system among Linux distributions.
How to Set Up GNS3 2.2 (2.2.32) to Run Cisco Router/Switch on Debian 11 Bullseye
In order to use the devices that form the basis of computer networks in a virtual environment, you must use one of the network simulator programs, such as GNS3. GNS3 software allows you to run a genuine Cisco Router or Switch by emulating it on your computer.
You can easily install the GNS3 network emulator on Windows, Linux, or macOS platforms and create a basic or advanced network topology. But since you need to add a network device, you need to add one of the different sources on the Internet or one of the IOS images we have published in this article to GNS3.
If you are using the Debian system instead of Microsoft’s Windows operating system, you should master the basic Linux commands for the installation stages of the software. Installing any program on Windows systems is pretty simple, but on Linux systems, you need to follow the appropriate script, depending on the distribution.
You can follow the installation instructions for GNS3 by browsing the guides published on the official website. However, sometimes you may need to browse more detailed technical articles as you may need to install dependent packages during installation as well.
How to Download and Install GNS3
Before installing the network simulator program on Bullseye version 11 of Debian, you need to update your repo addresses and then download and install the software via PyPI (Python Package Index) via pip3.
On your Debian system, please search for the terminal from the Activities section, find it, and run it. After opening the terminal in your Gnome desktop environment, execute the “sudo apt update” command and update the software list.
sudo apt update
After refreshing the repo addresses, since you will download GNS3 to your system using pip3, execute the command below in the terminal to install python3 and additional packages.
Click Edit / Preferences from the tool menu of the GNS3 program.
You can check that there are multiple settings in the Preferences window from the left panel. To add an iOS device, click IOS Routers under Dynamips and then click the New button to open the wizard.
When the New IOS Router Template wizard opens, click Browse to add the IOS file.
Select the c7200-adventerprisek9-mz.152-4.M7.bin IOS file or any other file you downloaded to your computer and open it.
Click Yes to confirm decompressing the IOS image and wait for the decompression process.
After specifying the IOS location, click Next and proceed to other settings.
You can see the name of the IOS device you selected in the Name section of the Name and Platform window. If you are going to add more than one device model to the program, change the device name from the Name section and edit its platform.
According to the RAM size of your host computer, configure a suitable memory size so that the Router IOS device can work more efficiently and perform.
If there are additional interfaces that you want to add to the Router you have added, you can select them from the Slot sections in the Network Adapters window.
The Idle-PC value is a necessary configuration so that the IOS device does not use 100% of your computer’s processor. Therefore, to determine the Idle-PC value for the c7200 based on the performance of your PC, click the Idle-PC Finder button and wait for the appropriate value to be found.
After adding the Router c7200 device, when you check the Server setting, you can see that the device will work in Localhost.
How to Fix uBridge Error
You may encounter a uBridge error when you try to cable the Router and Switch devices that you have added to the GNS3 logical workspace. The reason for this error is that the uBridge package is not compatible with the version of your Linux distribution.
When connecting the Switch with the Router, you may get the “Error while creating link: uBridge is not available, path doesn’t exist, or you just installed GNS3 and need to restart your user session to refresh user permissions.” error as in the image below.
Error while creating link: uBridge is not available, path doesn't exist, or you just installed GNS3 and need to restart your user session to refresh user permissions.
To fix the uBridge error on your Debian system, you must first install the necessary packages. To install the libpcap package, execute the “sudo apt install libpcap-dev -y” command in the terminal.
sudo apt install libpcap-dev -y
After installing the libpcap package, you must also install the Git software on your system to download and compile the uBridge package via Git. To install Git, execute the “sudo apt install git -y” command in the terminal.
sudo apt install git -y
To clone uBridge via Github, first, go to the Downloads location with the “cd ~/Downloads” command in the terminal and then execute the “git clone https://github.com/GNS3/ubridge.git” command.
After cloning uBridge, go into the folder with the “cd ubridge” command and execute the “make” command to compile it in the directory.
git clone https://github.com/GNS3/ubridge.git
Finally, execute the “sudo make install” command in the terminal to configure the necessary permissions and settings.
sudo make install
How to Fix No path to a VPCS executable has been set error
After fixing the ubridge problem, when you run all the devices in the workspace, the VPCS you added to the topology sometimes does not work, depending on the Linux distribution you are using.
When you run all the devices in the topology, you will get the error “No path to a VPCS executable has been set,” as in the image below. This is due to the VPCS device not being set up correctly.
No path to a VPCS executable has been set
To install VPCS on your Debian computer, execute the “sudo apt install vpcs” command in the terminal.
sudo apt install vpcs
How to Fix VPCS Executable Version Error
When you rerun the network devices after installing VPCS, you may get an error about the VPCS version this time. The version error of the virtual computer is due to the Debian 11 version.
When you run the VPCSs in the topology, you will get the error “VPCS executable version must be >= 0.6.1 but not 0.8” in the image below, and you will not be able to operate the devices.
To fix the VPCS problem on Linux platforms, you need to download and install an appropriate version. To install VPCS version 0.8.1, execute the commands below in the order in the terminal.
git clone https://github.com/TolgaBagci/vpcs_0.8-1_amd64.deb.git
sudo dpkg -i vpcs_0.8-1_amd64.deb
After installing the old version of VPCS, you can now see that all devices in the topology are working without any problems.
How to Create a Network Topology
You can analyze how computers on the network communicate by creating a simple and professional network design using the GNS3 software.
Open the project wizard by clicking the New icon or CTRL + N from the GNS3 tool menu. Give a name suitable for the network topology you will design, specify the location you want to save, and click OK.
To add two c7200 Routers to your project, click Routers on the left panel and drag and drop the device to the workspace.
Select Ethernet Switch from the Switches category and add two Switches to the workspace.
Open the All Devices category and add two VPCS (Virtual PC Simulator) to the workspace.
To add Serial Interface to the empty ports of the Routers in the topology, right-click / Configure on them.
In the Node Properties window, on the Slots tab, add PA-4T+ (Serial Interface) to the Slot1 port in the Adapters section and click OK.
After adding a serial interface to the routers, activate the cabling option to connect the VPCSs to the Switches and plug one end of the cable into the Ethernet0 port of the PCs and the other end into one of the free ports of the Switches.
Likewise, to connect the Switches to the Routers, plug one end of the cable into the Switches and the other end into the FastEthernet0/0 ports of the Routers.
To connect Cisco Routers, plug one end of the cable into R1’s Serial 1/0 port and the other end into R2’s Serial 1/0 port.
After wiring all the devices, click the green arrow from the tool menu and click Yes in the pop-up window to run them.
To add static IP addresses to VPCS PCs, click on them to open the CLI prompt and configure the TCP/IP settings of PC1 and PC2.
PC1> ip 192.168.1.10/24 192.168.1.1
PC1> show ip
PC1> ip 192.168.2.20/24 192.168.2.1
PC1> show ip
Execute the commands below in the CLI to assign IP addresses to the FastEthernet ports of Cisco Routers and open them.
R1# conf t
R1(config)# interface fastethernet 0/0
R1(config-if)# ip address 192.168.1.1 255.255.255.0
R1(config-if)# no shutdown
R2# conf t
R2(config)# interface fastethernet 0/0
R2(config-if)# ip address 192.168.2.1 255.255.255.0
R2(config-if)# no shutdown
Since you connect Router R1 and R2 with Serial Interface port, configure those ports as well.
R1# conf t
R1(config)# interface serial 1/0
R1(config-if)# ip address 192.168.3.1 255.255.255.0
R1(config-if)# no shutdown
R2# conf t
R2(config)# interface serial 1/0
R2(config-if)# ip address 192.168.3.2 255.255.255.0
R2(config-if)# no shutdown
When you ping the external serial ports of the Routers from the PCs, you can see that there is a network connection.
PC1> ping 192.168.3.1
PC2> ping 192.168.3.2
However, since one of the RIPv1/v2, IGRP, EIGRP, or OSPF routing protocols or a static route is not configured on the routers, you will not be able to ping each other from PCs, and you will get a Destination host unreachable error as in the image below.
Execute the “sudo apt purge 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 -y” command in terminal to delete all dependent packages related to GNS3 from your system.
Hi, I'm Tolga, a computer expert with 20 years of experience. I help fix computer issues with things like hardware, systems, networks, virtualization, servers, and operating systems. Check out my website for helpful info, and feel free to ask me anything. Keep yourself in the loop about the newest technologies!