In this article, we will examine how to set up and use the GNS3 2.2 (2.2.34) simulator program, which allows you to run Cisco Router or Switch IOS devices virtually on the openSUSE Leap 15 (15.4) Linux distribution.
How to Set Up GNS3 2.2 to Prepare for Cisco Exams on openSUSE Leap 15 (15.4)
GNS3 is network software that works with the Dynamips IOS emulator engine and offers users an excellent user interface. With this software, you can emulate the IOS images of Routers, Switches, and other network devices on your physical computer and run them virtually. You cannot use these virtual devices as network devices because this software was developed only to prepare for Cisco and other networking exams.
You can easily install GNS3 networking software on a computer running Windows, Linux, or even macOS, but the installation process on Linux platforms can sometimes be challenging. Installing on Microsoft Windows systems may be easier for users, but on Linux systems, this may not be easy sometimes.
If you have installed one of the openSUSE Leap or Tumbleweed versions developed and supported by SUSE on your PC, we recommend that you use GNS3 for your Cisco exams.
By installing Graphical Network Simulator-3 software in the openSUSE Leap 15 (15.4) version, you can experience both IOS devices and test security devices such as Fortinet.
How to Download and Install GNS3
Before installing the network simulator program on your SUSE system, you must update the installed software on your system to new versions and install new packages. After this process, you can install and run the GNS3 software on your computer without any problems.
Step 1
Open the terminal on your openSUSE computer and execute the command “sudo zypper update” to update the available packages and confirm the packages to be installed.
sudo zypper update
Step 2
Execute the command below in the terminal to install the dependent and required packages for GNS3 on your system.
sudo zypper install kernel-devel gcc libcap-progs git python3-devel python3-setuptools python3-qt4 python3-qt5 python3-netifaces python3-pip bison flex glibc-static wireshark qemu docker libopenssl-devel
Step 3
Press Y and Enter to confirm the 220 MB packages to be installed.
Step 4
To install GNS3 on your system via Pip3, execute the command “sudo pip3 install gns3-gui gns3-server” in the terminal, type your root password, and press Enter.
sudo pip3 install gns3-gui gns3-server
Step 5
After installing the simulator program on your Linux computer, find the program from the start menu and run it.
Step 6
When GNS3 is opened, when you see the Setup Wizard window, select Run appliances on your local computer to choose to run your IOS devices on your local PC and click Next.
Step 7
Change the Host Binding setting to Localhost in the Local server configuration and configure the port number in an unused range on your system.
Step 8
After successfully configuring the local server, check the settings in the summary window and close the wizard.
Step 9
After connecting the GNS3 program, open Help / About from the tool menu, and you can access the version, license terms, or information about the developer team.
How to Add Cisco Router IOS
One of the first things you need to do after installing GNS3 on openSUSE is to add a suitable IOS Router device, depending on the projects you will develop. After adding the Router or any network device, you can create aRouterroject and start designing your network topologies.
Step 1
Click Edit / Preferences from the tool menu of the GNS3 program to open the IOS add wizard.
Step 2
Click the IOS Routers option under Dynamips from the left panel in the Preferences window, and then click the New button to add a new image.
Step 3
Click Browse to specify the location of an IOS Router image you downloaded to your computer, select the Router image in the window that opens, and open it.
Step 4
Click Yes to confirm decompressing the IOS image and wait for the process to complete.
Step 5
Type the Router’s platform name and add it to an appropriate.
Step 6
Determine a suitable virtual memory value for the c7200 Router according to the RAM capacity of your PC.
Step 7
You can add a GigabitEthernet or Serial Interface to the c7200 Router in the Network Adapters window.
Step 8
Idle-PC value is used by GNS3 so that IOS devices do not use 100% of your computer’s CPU. This value may vary depending on the computer specifications used. Therefore, click the Idle-PC Finder button and wait to find the appropriate value for your IOS Router.
Step 9
Check the features of the c7200 Router you added in the last step and close the wizard.
How to Create a New Topology
After adding the c7200 Router image or an L2 Switch device to your GNS3 program, you can start creating a new project and developing network topologies.
Step 1
Open the project wizard by pressing the CTRL + N keys together or clicking the shortcut icon indicated in the image below and configure the project name and location.
Step 2
Select the Routers category from the left panel and drag and drop the c7200 device you added to the workspace.
Step 3
Select the All Devices category and add a Switch and a VPCS to the workspace.
Step 4
To cable the network devices, select the cabling option from the left panel and plug one end of the cable into the Ethernet0 port of the VPCS and the other end into one of the free Ethernet ports of the Switch.
Step 5
In the same way, plug one end of the network cable into one of the free Ethernet ports of the Switch and plug the other end into the FastEthernet0/0 port of the Cisco Router.
NOTE: At this stage, as soon as you connect the network cable to the Router, you may get a uBridge error, as shown in the Router output below. To fix this problem, do not close your project. Instead, execute the commands below to download and recompile uBridge in the terminal.
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.
sudo zypper install libpcap-devel
cd ~/Downloads
sudo git clone https://github.com/GNS3/ubridge.git
cd ubridge
sudo make
sudo make install
WARNING: If you try to compile uBridge without installing the libpcap-devel package on your system, you will get the error below.
cc -Wall -DLINUX_RAW -c -o src/ubridge.o src/ubridge.c
In file included from src/ubridge.c:34:0:
src/ubridge.h:33:10: fatal error: pcap.h: No such file or directory
#include
^~~~~~~~
compilation terminated.
make: *** [: src/ubridge.o] Error 1
Step 6
After solving the uBridge issue, click the green arrow in the tool menu and click Yes in the confirmation window to turn on all network devices.
NOTE: At this stage, when you run all devices, you may get the error “No path to a VPCS executable has been set.” To fix the VPCS error, execute the command “sudo zypper install vpcs” in the terminal and install the package.
sudo zypper install vpcs
Step 7
After resolving the VPCS error, double-click on it to configure a network device in the workspace and open the console window. When you open VPCS’s CLI command prompt, execute the “ip 192.168.1.10/24 255.255.255.0” command to assign an IP address to the Ethernet port and use the “show ip” command to check the IP information.
ip 192.168.1.10/24 255.255.255.0
show ip
NOTE: If the console window of VPCS or Router does not open at this stage, you can change the console application of GNS3. To do this, open File / Preferences and click Edit to change the current console application in the Console Applications tab in General settings. In the window that opens, you can choose Gnome Terminal or any application you want.
WARNING: When you change the console application and try to access the CLI command prompt of VPCS or other network devices, you may receive an error like the output below on the terminal screen. To fix this problem, execute the “sudo zypper install telnet” command in the terminal to install the telnet application on your system.
sudo zypper install telnet
There was an error creating the child process for this terminal
Failed to execute child process “telnet”: Failed to execve: No such file or directory
Step 8
Open the CLI of Router R1 and execute the commands below to assign an IP address to the FastEthernet0/0 port connected to the Switch and turn it on.
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
R1(config-if)# end
Step 9
After configuring R1, ping the router from VPCS PC1 with the “ping 192.168.1.1” command to check the network connection and test the connection.
ping 192.168.1.1
How to Uninstall GNS3 from openSUSE PC
If you want to remove GNS3 from your SUSE Linux computer, you need to use the Pip3 tool for this process. Do not forget that depending on the installation methods, you have to delete a program you installed in the same way.
Step 1
To completely uninstall GNS3, open the terminal on your system and execute the command “sudo pip3 uninstall gns3-server gns3-gui” and then press Y and Enter to confirm the locations to be deleted and proceed.
sudo pip3 uninstall gns3-server gns3-gui
Step 2
Finally, to delete all dependent and necessary packages you have installed related to GNS3 on your system, execute the command below in the terminal and complete the process.
sudo zypper remove kernel-devel gcc libcap-progs git python3-devel python3-setuptools python3-qt4 python3-qt5 python3-netifaces python3-pip bison flex glibc-static wireshark qemu docker libopenssl-devel telnet vpcs dynamips libpcap-devel
Video