GNS3 is an open source graphical network simulator for Windows, Linux and macOS - gHacks Tech News

ADVERTISEMENT

GNS3 is an open source graphical network simulator for Windows, Linux and macOS

GNS3 is a graphical network simulator which lets you to create a virtual network. You don't need any hardware like routers, switches, or even endpoints (workstation computers).

This open source tool can be useful for setting up a local network in an office or other environments, and also for troubleshooting purposes.

GNS3 Windows Client

The tool consists of two parts, a virtual machine that acts as a server and a client program that you use to interact with the server and access all of GNS3's features.

Note: If you want to download GNS3 from the official website, you will need to register for an account, and that requires a lot of personal information. You can download the program and the server VM from the GitHub or SourceForge pages without registration.

Installing the GNS3 client on Windows, Mac, and Linux

The GNS3 client is what you use for controlling the virtual machine server and simulating the network.

Windows users should download the all-in-one (EXE) from GitHub or SourceForge. The installer has quite a few third-party network tools that are pre-selected for installation. You can uncheck any of these, though I would suggest you install them unless you know that you don't require some of them; I did so for the purpose of reviewing them. But then I noticed that the GNS3 client integrates these tools and you can use them directly from within the program's interface. For e.g. Npcap is required for your network cards to communicate.

Note: However, pay attention to the final step of the installation, because there is one more optional program (Solarwinds toolset) that you can download. You don't need this for GNS3 to work.

How to install the GNS3 VM server

This is basically an Ubuntu virtual machine. Download the VM image of your choice. It's available for Virtual Box, VMWare Workstatiom, VMWare Pro, ESXi anbd HyperV. Since I use VMWare Workstation Player, I used the GNS3 package which was available for it. Extract the archive which the VM image comes in to a folder.

VMWare Player users can click on Player > Open and browse to the folder where the GNS3 VM.ova file is located. Click on open again, and choose the folder where you would like to import the virtual machine to. Hit the import button and wait for it to complete the process.

Interface tour + Creating a virtual network

Now for the fun part. Run the client program and wait for it to connect to the server. You will see a dialog box and you need to wait for it to close which may take a moment. You'll see the local server displayed on the right pane. The program won't function correctly until a working server is detected. Before you begin, you will need to start a new project (to save your work).  Give it a name, select where to save it  and many of the options on the GNS3 client interface will become usable.

The sidebar on the left displays the nodes (or interfaces) that you can add to the workspace in the middle. It has the following options: routers, switches, end devices, security devices, and links. Drag a symbol from the sidebar to the workspace to add a new interface. To connect them to one another, add a link. Essentially, this is very similar to creating a flowchart. You can enable the grid if you want things to look tidy.

The topology summary pane on the right corner lists each of your devices.

Let's create a graphical network for demonstration purposes? Our virtual office is going to have 5 computers (Virtual PCs) and these will be connected to a local ethernet via a switch.

GNS3 basic topology

So we drag 5 VPCS to the workspace, a switch, and draw links between the devices. Congratulations, you have created your first topology. You can use the toolbar at the top to start, pause or stop the nodes to give you an idea of the network's connectivity.

GNS3 working nodes

In this particular setup, Hovering over the switch shows you the status. Three of the computers are connected to Ethernet0 on the switch, while two PCs are offline, as indicated by the colored box next to each interface. Click on the console button to open up a PUTTY console for each linked PC and run commands.

GNS3 status

You don't need the VM server for such simple setups, it's only required for VIRL or other images. How about adding a Cisco router? To do this you will need to install its image and you need to get this from Cisco. If you have one you can import it from the file menu.

How to get the GNS3 VM server working with VMWare Workstation Player

Once it appears in VMWare Player's main screen, power on the new VM by clicking "Play Virtual Machine". The VM should boot and you should see a window with the version details of the GNS3 server. Click on OK, and it should display a list of commands that you can use. Highlight the command using the arrow key and hit the enter key to execute it. For now let's shut it down. Why? Because we need to use the client to make some changes.

To run the VM server and manage it via the client, you will need to navigate to Edit > Preferences > GNS3 VM server. Click the checkbox here to enable the VM server. Now restart the server and it should work with the GNS3 client.

Fix for WinError 10049 in GNS3

You may get an "error connecting to GNS3 server", or if it keeps saying connecting..., or if the error reads "Could not connect to port 0.0.0.0:3080 [WinError 10049]".

I ran into this when I installed the client. The fix for it is simple. Click on the Client's Edit > Preference > Server > Host Binding and set it to use 127.0.0.1. This will tell it to use the local host address. This is only required if you're going to be using the GNS3 client for your project.

Fix for VMrun issue in GNS3

I ran into another issue when selecting the VM server. GNS3 wouldn't detect my VM server. The fix for that is at Edit > Preferences > VMWare. You will see a "path to vmrun". The problem is that this "vmrun" file isn't available in the default installation of VMWare Workstation Player. You can download it for free from the VIX 1.17 SDK.

When installed, it should be located at C:\Program Files (x86)\VMware\VMware VIX\vmrun.exe. Use the browse button to navigate to the location of the vmrun to confirm the path.

That's not enough though as you need to edit the last part of the vixwrapper-config.txt to add the following lines under #workstation 14.0.0

ws 19 vmdb 15.5.0 Workstation-14.0.0
player 19 vmdb 15.5.0 Workstation-14.0.0

The config file can be found at C:\Program Files (x86)\VMware\VMware VIX.

Fix for VMs located on other drives

In case your VM is stored on another drive (and not in C:), you will need to edit the VMWare preferences.INI (found inside C:\Users\USERNAME\AppData\Roaming\VMware) and set the default path as follows

prefvmx.defaultvmpath = "VM folder location".

For e.g. prefvmx.defaultvmpath = "H:\VMs\"

This got the VM name to appear in GNS3.

Closing words

GNS3 is not for the average user, but it is an excellent option for network engineers, developers, and admins.

Some parts of the official GNS3 documentation was used as a reference source for this article. Do checkout the videos made by David Bombal for more information.

GNS3

For Windows

Summary
software image
Author Rating
1star1star1star1star1star
4.5 based on 2 votes
Software Name
GNS3
Operating System
Windows, Linux, macOS
Software Category
Internet
Price
Free
Landing Page
Advertisement

Previous Post: «
Next Post: »

Comments

  1. Some guy said on November 13, 2019 at 4:52 pm
    Reply

    Another good alternative is EVE-NG – I found it easier to set up as it gave me less headache during the installation.
    I host my labs at home and access them remotely from anywhere using just a web browser.

    1. 01101001b said on November 14, 2019 at 2:52 am
      Reply

      GREAT tip! Thx!

  2. ping pong playa said on November 13, 2019 at 9:56 pm
    Reply

    wow gns3 has come a long way. I had a home lab of cisco layer 2 and 3 switches to get me through my ccnp. gns3 got me through my ccna.

  3. Gabriel said on November 13, 2019 at 11:17 pm
    Reply

    Great article, Ashwin.
    I guess it’s time to dump Packet Tracer and give GNS3 a go.

  4. Anonymous said on November 14, 2019 at 12:25 am
    Reply

    It can create big networks and can eat a lot of RAM.

    I have to check EVE-NG…

  5. Gabriel said on November 14, 2019 at 1:46 am
    Reply

    Ashwin, do you know why GNS3-2.2.3-all-in-one.exe on github has a different file size than GNS3-2.2.3-all-in-one-regular.exe on gns3.com ?

    I downloaded both just to check and to my surprise, they are the same file version but different file size.

  6. Peterc said on November 16, 2019 at 5:57 pm
    Reply

    @Gabriel: If I had to *guess*, I’d say it’s because you have to register for the version hosted at gns3.com. The GNS3 version probably has a registration-verification component tacked onto it, to ensure that everyone who uses it has independently registered. But it’s just a guess.

    1. Gabriel said on November 18, 2019 at 11:03 pm
      Reply

      Thanks for the tip, Peter.
      I’ll Install them both in a Windows VM machine and report back.

  7. Anonymous said on November 20, 2019 at 4:30 pm
    Reply

    Nice article!

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

We love comments and welcome thoughtful and civilized discussion. Rudeness and personal attacks will not be tolerated. Please stay on-topic.
Please note that your comment may not appear immediately after you post it.