12/1/2021

Cloud Gns3

GNS3 integrates with virtual machines and uses the GNS3 templates to allow users to simulate complex networks and multi-vendor support so you can get fully hands-on experience. In this basic network, we have an internet cloud which is connected to GNS3 server’s network adapter. So, any device connected to this cloud will be able to connect to real network. We also have an Ethernet switch connected to the internet cloud and two VPCSs connected to the Ethernet switch.

Gns3

GNS3 (Graphical Network Simulator) is one of the most popular network simulator software used by hundreds of thousands of network engineers worldwide to emulate, configure, test and troubleshoot virtual and real networks. GNS3 supports a large number of vendors such as MikroTik, Cisco, Juniper, Windows, Linux and many other vendors. GNS3 can be installed on Windows, Linux and MAC Operating System. In this article, I will show how to download and install GNS3 application in Windows Operating System. I will also show how to configure a basic network in GNS3 that will communicate with the real networks.

GNS3 Download for Windows Operating System

GNS3 is completely free and open source software. So, it can be downloaded from its official website without any charge. In GNS3 official website, the installation file is found for major three operating platforms (Windows, Linux and MAC). The following steps will show how to download GNS3 installation file (.exe) for Windows Operating System.

  • Go to GNS3 official website (gns3.com) from your favorite web browser.
  • You must Sign Up and Login before any download. So, Sign Up and Login with your personal information.
  • Now click on DOWNLOAD menu item. GNS3 current version (now it is 2.1.9) information will appear with a download button. Click on this Download button. GNS3 download pop up window will appear where installer file for major three operating systems will be found.
  • Click on Download button under Window operating system. Within a few seconds your download will be started. The installer file (GNS3-2.1.9-all-in-one.exe) size is about 54.5 MB.

GNS3 Installation Step by Step on Windows Operating System

After completing GNS3 installer file download, we will now start installation on Windows Operating System. But before going to start installation, we have to check system requirements. For GNS3 v2.1.9, we have to use minimum Windows 7 SP1 (64 bit), 4GB RAM and IGB free storage. To get detail about GNS3 installation requirements, visit GNS3 installation minimum, recommended and optimal requirements page.

The following steps will show how to install GNS3 on Windows Operating System.

  • Click twice on your downloaded GNS3 Windows installer file (GNS3-2.1.9-all-in-one.exe). A security warning window will appear. Inside this window, click on Run button.
  • GNS3-2.1.9 Setup starting window will appear to welcome you. Nothing to do in this window. Just click on Next button.
  • License Agreement window will appear. Accept the license agreement clicking the I Agree button.
  • Choose Start Menu Folder window will appear. Keep default name (GNS3) or if you wish you can change it. Click on Next button.
  • Choose Components window will appear where available GNS3 features will be listed. Among these features uncheck only Wireshark, SolarWinds Response and Npcap features because initially we don’t require these features. Now click Next button.
  • Choose Install Location window will appear. Keep default location or if you wish you can change browsing destination folder. Now click Install button.
  • GNS3 features installation will be started and installation progress will be found on progress bar. During GNS3 installation, WinPCAP installation will be appeared separately. Follow some easy instructions as indicated. Also keep your internet connection OK because virt-viewer will be downloaded during GNS3 installation.
  • Within a few minutes, GNS3 installation will be completed and Installation Complete window will appear with success message. Click Next button from this window.
  • Solarwinds Standards Toolset window will appear. We don’t need any toolset now. So, click on No radio button and then click on Next button.
  • GNS3 Setup close window will appear. Click Finish button. GNS3 installation will be finished and GNS3 will start to run now.
  • Introduction to GNS3 GUI

    After completing GNS3 installation, you will find GNS3 shortcut icon in your Desktop. GNS3 icon can also be found in Windows Start menu. Run GNS3 from Desktop or Start menu. You will find GNS3 GUI like below image.

    The GNS3 GUI is subdivided into several sections. These are the Menubar, Toolbar, Device Toolbar, Workspace, Topology Summery, Servers Summery and the Console section.

    GNS3 Menubar

    The GNS3 Menubar ((labeled 1)) found at the top of the GNS3 GUI that contains several menu items which are frequently required to manage GNS3 GUI. Each menu item contains several options such as New blank project, Open project, Import appliance, Preference, Setup Wizard and so on.

    GNS3 Toolbar

    The GNS3 Toolbar (labeled 2) is located below the Menubar. It contains groups of icons that allow you to easily perform common tasks.

    Device Toolbar

    The GNS3 Device Toolbar (labeled 3) is categorized by network devices such as Routers, Switches, End Devices, Security, All Devices, along with the Add a Link button at the bottom that looks like a network cable.

    GNS3 Workspace

    The GNS3 Workspace (labeled 4) is where network devices will be dragged and dropped from Device Toolbar in order to build our topology.

    Topology Summery

    The Topology Summery panel (labeled 5) will display the current devices in the GNS3 Workspace, their status (on/off/suspended), as well as which devices are connected to one another.

    Servers Summery

    The Servers Summery panel (labeled 6) will display the servers in use (local GNS3, local GNS3 VM, and remote GNS3 VM), their status (on/off) and their current resource usage.

    GNS3 Console

    The GNS3 Console panel (labeled 7) will display any errors or any issues GNS3 itself encounters, and will output those messages in this panel.

    First Topology with GNS3

    After installing GNS3, it is time to simulate and study our desired network. Now we will design a basic network in GNS3 that will communicate with real network. Our basic network is placed in GNS3 workspace like the below image.

    In this basic network, we have an internet cloud which is connected to GNS3 server’s network adapter. So, any device connected to this cloud will be able to connect to real network. We also have an Ethernet switch connected to the internet cloud and two VPCSs connected to the Ethernet switch . Virtual PC Simulator (VPCS) is a program that allows you to simulate a PC supporting DHCP and ping. So, we can easily test and study our network configuration using VPCS.

    We will now design this basic network in our GNS3 GUI. So, run GNS3 GUI from Windows Start Menu or Desktop and follow the below steps to design this network in GNS3.

    • Go to File menu and click on New blank project item. Project window will appear. Inside Project window, put a project name in Name input field and then click OK button.
    • Now click on Browse all devices button from Device Toolbar. All devices panel will appear at right side. Inside this panel you will find Installed and available appliances for GNS3. Choose only Installed appliances from drop down menu. A few installed appliances will be found inside this panel.
    • Drag and Drop the Cloud appliance to GNS3 Workspace and place it according to above network diagram. If you wish you can rename it as you like clicking twice on the appliance name.
    • Right click on the cloud icon and click on Configure option. Node properties window will appear. Inside this window, click on Ethernet interfaces tab. Inside Ethernet interfaces tab, choose your desired network adapter that you want to bind with this cloud from dropdown menu and then click on Add button. (If you don’t find your desired network adapter in dropdown menu, click on Show special Ethernet interfaces checkbox and you will find that your desired network adapter will now be available in interface dropdown menu). Your added network adapter will be listed in the Ethernet interfaces box area. Now click Apply and OK button.
    • Again Drag and Drop an Ethernet Switch and Two VPCSs in GNS3 Workspace and place them according to the above network diagram.
    • You will find status (on/off) of your devices in Topology summery panel. If your device is on, it will turn into green light otherwise it will be red.
    • Now click on Add a link button from Device Toolbar and move to Workspace. Mouse icon will turn into PLUS SIGN (+). Click on Cloud icon and it will ask to choose a network adapter showing the available network adapters. Click on your desired network adapter and move mouse to switch icon and click on it. It will also ask to choose an Ethernet port showing all available Ethernet ports. Click on an Ethernet port which you want to connect to internet. Now you will find a link is established between switch and internet cloud indicating green light signs that mean both devices are up and running and ready to communicate with each other.
    • Similarly, connect both VPCS and Switch and then click on Add a link button again so that mouse icon shows normally in Workspace. You will find VPCS is indicating red light because VPCS is by default in off state. Start VPCS by clicking mouse right button on it and choosing Start option. Now you will find the red light will turn into green.

    Our first network in GNS3 is ready. Now we will assign our LAN IP in PC-1 and PC-2 so that it can communicate to our real LAN devices as well as to WAN networks.

    Assigning IP in GNS3 VPCS

    VPCS is a PC simulator that helps to test network configuration with ping and trace route. VPCS supports either DHCP or static IP. In this article, we will assign static IP in our VPCSs (PC-1 and PC-2) and test whether it can communicate with real network or not.

    Assign Static IP in PC-1

    The following steps will show how to assign static IP address in PC-1.

    • Click mouse right button on PC-1 icon and then click on Console option. PC-1 command prompt will appear.
    • Issue ip command in PC-1 terminal with this format:[ip ip_address/netmask gateway] example: ip 10.10.200.2/24 10.10.200.1
    • To set DNS, issue dns command with ip command: [ip dns dns_ser_ip] example: ip dns 8.8.8.8
    • To save this IP configuration, issue save command.
    • If you have misconfigured the IP settings, issue clear ip command to clear IP settings.
    • To show IP configuration, run show ip command.

    Now ping to gateway or any public domain or trace route with trace command. If everything is OK, PC-1 will be able to ping and trace route to real networks.

    Assign Static IP in PC-2

    The following steps will show how to assign static IP address in PC-2.

    • Click mouse right button on PC-2 icon and then click on Console option. PC-2 command prompt will appear.
    • Issue ip command in PC-2 terminal with this format:[ip ip_address/netmask gateway] example: ip 10.10.200.3/24 10.10.200.1
    • To set DNS, issue dns command with ip command: [ip dns dns_ser_ip] example: ip dns 8.8.8.8
    • To save this IP configuration, issue save command.
    • If you have misconfigured the IP settings, issue clear ip command to clear IP settings.
    • To show IP configuration, run show ip command.

    Now ping to gateway or any public domain or trace route with trace command. If everything is OK, PC-2 will be able to ping and trace route to real networks.

    If you face any confusion to follow above steps properly, watch the below video about GNS3 installation and configuration in Windows Operating System. I hope it will reduce your any confusion.

    This is the starting with GNS3 application. In future we will learn more complex appliance and network in GNS3 application.

    GNS3 download, installation and configuration in Windows Operating System has been discussed in this article. I hope you will now be able to install and configure GNS3 successfully in your Windows OS. However, if you face any confusion to install and configure GNS3 in Window OS, feel free to discuss in comment or contact with me Contact page. I will try my best to stay with you.

    Creating a cloud connection from GNS3 to the hostis easily done in the GNS3 GUI.But you need some knowledge about the host OS to make to best out of it.In the following I’m going to explain,what’s special when using a Linux OS.

    This guide was developed and tested on a Debian system.It should also work on similar distributions, like Ubuntu and Mint.But it needs some adaptions for other Linux distributions.

    This is the easiest way, just choose the ethernet interfaceof your Linux system (e.g. eth0) as the cloud interface.

    The GNS3 device is connection to your LAN like a separate device.That way the GNS3 device uses the same IP networkas your linux host and it gets the same connectivity.The logical layout of a typical home network will look like this:

    The big advantage is, that you don’t have to change anythingon your host and in your network.But this has three drawbacks:

    • You can connect to the internet and to other devices on your LAN,but not to the Linux host.
      The reason is, that the data sent by GNS3 to the ethernet cloud interfaceis directly transmitted on the wire.The TCP/IP system of the host doesn’t see these packets,so it can’t respond to them.
    • It doesn’t work with WLAN interfaces,see the next chapter how to use a TAP cloud connection.
    • The performance is quite poor.
      I get about 100 MBit/s to my Linux box,but with the ethernet cloud I get only 1 MBit/s to the GNS3 device.

    A TAP interface is a dedicated point-to-point connection betweenyour Linux system and an application (in our case GNS3).A home network will have such a structure:

    Gns3 Cloud Configuration

    The advantage is, that you will be able to access the Linux host,and the connection speed is fine.Furthermore wireless interfaces can be used to connect to the LAN.The major drawback is, that a TAP interface can be used onlyby one GNS3 project at a time.If you are the only GNS3 user,having only one project open at any given time,this is not an issue.But as soon as multiple projects are simultaneously open,you have to use multiple TAP interfaces.The assignment of these TAP interfaces to the projectswill be very difficult to handle.

    This TAP connection is a new IP network,that has to be configured on the host.To create a TAP interface add the following to/etc/network/interfaces (adapt the IP address to your needs):

    Replace <gns3_user> by the user, that runs the GNS3 server process,typically it’s the user gns3.You can also leave out the “user <gns3_user>” part,then every user can connect to the TAP interface.

    Activate it with sudo ifup tap0,after reboot it’s automatically activated.

    On the GNS3 device you have to configure a static IPand a default gateway suitable for the TAP interface.

    Now you should be able to reach the host,but no other hosts and not the internet.To achieve that, the host has to enable routing(Linux calls that IP forwarding).Edit /etc/sysctl.conf and add/uncommentnet.ipv4.ip_forward=1, then reboot.

    After that start Wireshark and sniff the ethernet interface of the Linux host.When you now ping the IP of your internet router from the GNS3 device,you should see the ping going out, but you won’t see a reply.

    If you don’t see the outgoing ping, then you should check theconfiguration of the FORWARD chain of the iptables firewall.The default is to allow forwarding, but that might has been changed.

    Now we have to take care about the missing answer to our outgoing packets.The reason is, that the devices on our LAN,and especially the router to the internet, have no idea,where the TAP IP network is located and how to reach it.

    Gns3 Cloud Not Working

    You have two ways changing that.

    • Reconfigure your LAN devices
      Create a static route for the TAP network to your linux hoston all devices of your LAN.Furthermore on your internet router you might have to allow theTAP network to reach the internet.That way all LAN devices get direct access to theGNS3 devices connected to the cloud,but it’s quite of lot of work to setup this.
    • NAT the TAP traffic leaving the Linux host
      sudo iptables -t nat -A POSTROUTING -s 172.31.1.0/24 ! -d 172.31.1.0/24 -j MASQUERADE(adapt the IP addresses to your TAP network)will NAT all traffic coming from the TAP interface andleaving the Linux box.With the help of the package iptables-persistentthe iptables entries will survive a reboot.

    Cloud Nsg

    Optionally you may want to make it easier to configure theGNS3 device by enabling DHCP.For that we install dnsmasq and create the file /etc/dnsmasq.d/tap0.conf(again adapt the IP addresses):

    Then restart dnsmasq with sudo service dnsmasq restart.

    Cloud Guns

    Starting with v2.0 GNS3 is able to connect to Linux bridge interfaces.Every time a GNS3 project uses a bridge interface cloud,a TAP device is created and connected to this bridge.That way multiple projects can use the same bridge cloud in parallel.

    The NAT cloud is just a cloud to the ‘virbr0’ bridge.By default it uses NAT (network address translation)as a very easy and efficient way to access the internet.It is meant to be used with the GNS3 VM.But as this VM is just a regular Linux system,the NAT cloud can also be used with a normal Linux server.The address translation is done in the Linux OS, not by the GNS3 application.

    The easy way to create a NAT cloud is to install libvirt(libvirt-bin on Ubuntu, libvirt-daemon-system on Debian).The IP configuration can be modified with “virsh net-edit default”.

    But it’s not so hard to create a bridge interface without libvirt.In the following the ‘virbr0’ bridge is created (for use with the NAT cloud),but you can use the same procedure to setup any other bridge.

    First install the bridge-utils (sudo apt-get install bridge-utils).Then add the bridge configuration to /etc/network/interfaces(adapt IP address, choose a random hwaddress):

    Then activate it with sudo ifup <bridge_name>,after reboot it’s automatically activated.

    The remaining procedure is the same as in the TAP section,here just a quick overview:

    Connect Gns3 To Internet

    • Activate forwarding in /etc/sysctl.conf, then reboot
    • Check if the FORWARD chain in iptables allows forwarding
    • Activate NAT for the bridge traffic leaving the Linux host
      Alternatively go without NAT,change your LAN to route the bridge network to the Linux host.That means, that you can use the NAT cloud without address translation.
    • Install dnsmasq, create the configuration in/etc/dnsmasq.d/<bridge_name>.conf and restart dnsmaq.