2 Setting Up a GNS3 Environment
Mathew J. Heath Van Horn, PhD
I’ve been teaching the learning of networking principles for many years. In my experience, one of the biggest obstacles to learning networks and associated applications is the lack of a lab for learners to play. Graphical Network Simulator 3 (GNS3) solves many of those problems. GNS3 uses few hardware resources and can emulate complex networks using real images. Students no longer require access to a dedicated lab or to spend money on cloud architectures. GNS3 can be installed and used on most laptops on the market. A better processor and more RAM on the host machine will improve the GNS3 experience, but this is true with every application.
Learning Objectives
- Create a working GNS3 Learning Environment on a PC or laptop
Prerequisites
- Install Oracle VirtualBox
Deliverables
- None – This is for student needs
Resources
contributors and testers
Testers:
- Quinton D. Heath Van Horn, 7th Grade
- David Reese, Mathematics Student, SUNY Brockport
- Cody Shinkyu Park, Honeywell Software Engineer, ERAU-Prescott Alumni
- Salvador Morales, Safety Management System Analyst, ERAU-Prescott Alumni
- Evan Paddock, Cybersecurity Student, ERAU-Prescott
- Dante Rocca, Cybersecurity Student, ERAU-Prescott
- Sawyer Hansen, Cybersecurity Student, ERAU-Prescott
- Bernard Correa, Cybersecurity Student, ERAU-Prescott
- Justin La Zare, Cybersecurity Professional, ERAU-Prescott
Phase I – Install GNS3 Environment
There are two parts to GNS3: the GNS3 Working Environment and the GNS3 Virtual Machine (VM). This section covers the installation of the GNS3 environment.
- Navigate to GNS3 at https://www.gns3.com/
- Click on the Free Download button
- Select Windows, Mac, or Linux as appropriate, and then Download
- Create your GNS3 Community Account as prompted, login, and then return to the download page
NOTE: No one has reported spam from this registration.
- Run the installer you downloaded and accept the default options. If prompted:
-
-
- Permit uBridge to run as root to capture packets
- Do not accept the free offers
- Do NOT start GNS automatically! Doing so can distract new learners due to the errors that will pop up
-
Phase II – Install the GNS3 VM (Virtual Machine)
This is where you will install the GNS3 VM. Remember, the GNS3 Working Environment and the GNS3 VM must be the same version.
- Navigate to the GNS3 VM download page at https://www.gns3.com/software/download-vm
- Select the image for VirtualBox
- Extract (unzip) the .zip file
NOTE: You may get 2 errors while unzipping the file and it will show 99% completion. This happens on occasion and does not affect the extracted file.
- Download and launch https://www.virtualbox.org/wiki/Downloads
- Select File → Import Appliance → Import (Figure 1) and navigate to the .ova file (“GNS3 VM.ova”) that you just downloaded and unzipped. In this example, our .ova file is named “GNS3 VM.ova”(Figure 2)
- Click Next (Figure 3)
- Click Finish to accept the default appliance settings (Figure 4)
- Adjust the network settings of the GNS3 VM by selecting the VM and then selecting settings (Figure 5)
- In the network settings, under Network Adapter 1, select the name of the host-only adapter drop-down arrow. YES, even if the right name is already in the box. Just do it, and click OK. If you don’t do this, you will get a network error when you start the virtual machine (Figure 6)
NOTE: If no Host-only adapter is available, your VirtualBox version may need to be updated or reinstalled. If the VM still will not launch properly, then open Device Manager -> Network adapaters -> Virtualbox Host-Only Ethernet Adapter -> Disable Device. Re-enable the device again and restart VirtualBox.
- Finally, start the GNS3 VM you installed to ensure it runs properly. This is a very lightweight version of Linux (Figure 7)
- Stop the GNS3 VM
Phase III – Configure GNS3
Now we are going to configure the GNS3 working environment for first-time use. You may encounter many errors when it first starts. This is normal because the GNS3 default settings use VMWare, and we are using VirtualBox. We tried using the free version of VMWare, and it does not have the features installed to be used with GNS3. We are trying to keep things free for learners to learn and not make them spend money.
Also, if you mess up the configuration, you can always re-run the setup wizard. On the GNS3 toolbar, click Help –> Setup Wizard.
- Launch GNS3
NOTE: Sometimes VPNs will interfere with GNS3 working properly. It is recommended that they be disabled before launching GNS3.
NOTE: You may see the prompt “uBridge requires root permissions to interact with network interfaces.” Say YES. This allows you to connect GNS3 with the real network if desired.
NOTE: Sometimes GNS3 asks you to name a new project. If so, just pick any name and click OK.
- Next, choose how to run your GNS3 network simulations by selecting Run appliances in a virtual machine (Figure 8)
- Accept the defaults for the Local Server Configuration and click Next (Figure 9)
- You should get a successful message. Click Next (Figure 10)
- The GNS3 default setting is to use VMWare by default so you will get an error. Select OK and choose VirtualBox (Figure 11)
- When you change the radio button, the GNS3 VM you imported and started in VirtualBox earlier should auto-populate. Use the default settings and click Next (Figure 12)
- Then select Finish (Figure 13)
- You should have a screen like the one in Figure 14. The windows are adjustable, but the window to take note of is the “Servers Summary”. You should see your bare metal machine (In Figure 14 it is Dr. HVH) and the GNS3 VM both show green lights and details of how many resources are being used. If the server indicator light is still grey, power off the GNS3 VM and restart the GNS3 Working Environment
- When you start GNS3 it can take a minute or two while the GNS3 VM launches. The indicator will remain grey until it is fully running
Depending on the hardware of your bare-metal machine, you may get an error stating that KVM acceleration cannot be used. Simply turn off KVM support in the gns3_server.conf by adding enable_kvm = false to the [Qemu] section. Follow the steps below.
End of Lab
List of Figures for Printing Purposes