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 difficult. 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 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.
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
Execute the command below in the terminal to install the dependent and required packages for GNS3 on your system.
Press Y and Enter to confirm the 220 MB packages to be installed.
To install GNS3 on your system via Pip3, execute the command “sudo pip3 install gns3-gui gns3-server” in the terminal and type your root password, and press Enter.
sudo pip3 install gns3-gui gns3-server
After installing the simulator program on your Linux computer, find the program from the start menu and run it.
When GNS3 is opened, when you see the Setup Wizard window, select Run appliances on my local computer to choose to run your IOS devices on your local PC and click Next.
Change the Host Binding setting to Localhost in the Local server configuration and configure the port number in an unused range on your system.
After successfully configuring the local server, check the settings in the summary window and close the wizard.
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 a new project and start developing your network topologies.
Click Edit / Preferences from the tool menu of the GNS3 program to open the IOS add wizard.
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.
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.
Click Yes to confirm decompressing the IOS image and wait for the process to complete.
Type the router’s platform name and add it to an appropriate category.
Determine a suitable virtual memory value for the c7200 Router according to the RAM capacity of your PC.
You can add a GigabitEthernet or Serial Interface to the c7200 Router in the Network Adapters window.
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.
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.
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.
Select the Routers category from the left panel and drag and drop the c7200 device you added to the workspace.
Select the All Devices category and add a Switch and a VPCS to the workspace.
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.
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 in the output below. To fix this problem, do not close your project and execute the commands below in order to download and compile uBridge again 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
sudo git clone https://github.com/GNS3/ubridge.git
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
make: *** [: src/ubridge.o] Error 1
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
After resolving the VPCS error, to configure a network device in the workspace, double-click on it to 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
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
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
After configuring R1, to check the network connection from VPCS PC1 to the Router, ping with the command “ping 192.168.1.1” and test the connection.
How to Uninstall GNS3
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.
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
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.