GNS3 Network Simulation Guide

3 (1 reviews total)
By "RedNectar" Chris Welsh
    Advance your knowledge in tech with a Packt subscription

  • Instant online access to over 7,500+ books and videos
  • Constantly updated with 100+ new titles each month
  • Breadth and depth in over 1,000+ technologies

About this book

GNS3 is an open-source Graphical Network Simulator used extensively by networking professionals to simulate networking devices such as Cisco, Juniper and Vyatta routers, along with Virtual PCs.

GNS3 Network Simulation Guide gives you all the information you need to run a successful GNS3 simulation. You will be guided through the tricky installation pre-requisites and procedures involved in developing a simulated topology suitable for studying for Cisco CCIE Certification. We will also cover many useful tips and tricks which will help you make the most of your GNS3 simulator application.

You will begin the GNS3 journey by ensuring that you have prepared your computer with any additional files required by GNS3, to set up the simulated environment needed for a successful installation process.

Once GNS3 is installed, you will get to work creating a successful simulation including routers, Ethernet switches, Virtual PCs, and capture packets using Wireshark. Next, you will learn how to master GNS3’s Graphical User Interface as well as the Command Console. The inner workings of GNS3 are described in depth so that you gain an appreciation of how UDP tunnels are used to tie the many components of GNS3 together.

By following the clear examples and exercises in this guide, you will learn everything that you need to know about how to use GNS3 to prepare for certifications, as well as simulate real-world network scenarios.

Publication date:
October 2013


Chapter 1. Clearing the First Hurdle

This chapter gets you through the first hurdles you will strike in your quest to have a Graphical Network Simulator (GNS3) running on your computer, and it comes in three parts: pre-installation tasks and prerequisites, the installation process, and the post installation tasks required to build your first simulation. During the process, you will gain an appreciation of the other applications and pieces of software that all contribute to make GNS3 work. I will explain the reasoning behind the multiple steps you need to take to install GNS3 successfully and finish the chapter with you well-prepared to build your first simulation emulating Cisco routers.

The following topics will be covered in this chapter:

  • Pre-installation tasks and prerequisites:

    • Router image files

    • Downloading GNS3

  • The installation process:

    • Installing on Windows

    • Installing on OS X

    • Installing on Linux Mint

  • Post installation tasks

By the end of this chapter you should have GNS3 running on your computer ready to create your first network simulation.


Pre-installation tasks and prerequisites

The first prerequisite is that the installer realizes that GNS3 is not a normal application! It is a collection of inter-working applications and hosted operating systems, each with their own memory and CPU demands. You are not going to get GNS3 installed and running as quickly as you might some other standalone application.

But you probably already know that – I'm guessing that you are reading this book because you have at least already installed, or attempted to install GNS3, and struck a point at which you realize you need to know more. To address this, I will start with some essential knowledge that will help you see the bigger picture. If you are new to GNS3 or new to network simulation concepts, you would do well to read the home page before you continue.

Understanding the GNS3 family of applications

GNS3 can be thought of as a meeting place for a variety of operating system emulators. The best known and most important of these is Dynamips. Dynamips allows you to emulate Cisco routers and provides a collection of generic devices and interfaces.

Other emulators supported by GNS3 are the following:

  • Qemu: This provides emulation of Cisco ASA devices, Juniper Routers, Vyatta routers, and Linux hosts.

  • Pemu: This is a variation of Qemu used expressly for Cisco PIX firewalls.

  • VirtualBox: This provides emulation of Juniper Routers, Vyatta routers, Linux hosts, and Windows hosts.

Every instance of a router or any other device you run is going to spawn a copy of its own operating system that will compete for your host computer's RAM and CPU cycles. You will be running multiple computers within your computer, so remember that as your computer's CPU heats up and your fans begin to whirr more loudly.

Now consider that devices like routers and firewalls require some kind of terminal application to give you access, so meet the next member of the GNS3 extended family, your terminal application. Depending on your operating system, your terminal application might be Gnome Terminal, iTerm2, Konsole, PuTTY, SecureCRT, SuperPutty, TeraTerm, Windows Telnet client, or even Xterm.

No matter which terminal application you choose, it will consume some more resources for every session you have opened, although it is minimal.

Finally, there are two more companion applications that are not essential, but often used in conjunction with GNS3. These applications are as follows:

  • Wireshark: This is a popular open source packet-capture application.

  • Virtual PC Simulator (VPCS): This allows you to simulate up to nine PCs that you can use to ping, traceroute, and more.

And of course, these too need CPU and RAM when you use them.

So before you start thinking about running GNS3 on your computer, you had better make sure that it is up to the job, but that will largely depend on how many devices you plan to include in your simulations, how much memory you allocate to these devices, and how well you are able to "tune" the Idle-PC value (discussed in Chapter 2, Creating your First GNS3 Simulation).

I have successfully run GNS3 with a single router on a Pentium IV based computer with 1.5GB RAM. Running two routers on the same computer is possible, but slower.

Memory and CPU

I'll cut to the chase. You need as much memory as you can afford. I wouldn't want to run GNS3 on less than 2GB RAM and I'd buy 16GB or more if I could afford it. And router emulation can be CPU intensive. Quad core CPU would be awesome, but a Pentium IV could get you started. Multi-core CPUs are especially useful if you intend to use Qemu or VirtualBox emulators.

That said, if you want to be more precise, you should be able to calculate how much of your RAM is being consumed by your Operating System itself, with as few other programs as possible running, then add the amount of RAM that GNS and the associated programs consume, and finally add the amount of RAM you will allocate to your devices.

Router image files

The most important pre-installation task for GNS3 is to have a router image file ready. This is often the task that causes people to give up on GNS3 before they get started, but it is necessary because Dynamips (or Qemu or VirtualBox) is nothing more than an emulator, and it is going to need an operating system image to emulate!

For example, if you plan to emulate Cisco 3725 router, your image file might be called c3725-adventerprisek9_ivs-mz.124-25b.bin.


Note: Obtaining the appropriate image files for your router is your responsibility. It may be necessary to buy a piece of the hardware you wish to emulate and copy the image files from the hardware you own.

Whatever your image file(s) are, prepare for your installation by copying your image files to the appropriate locations as listed below. You will need to create the GNS3 and Images directories as you go.

Operating System

Location for the image files



OS X or Linux


If you have a maintenance contract with Cisco, you can download router images for your router from the Cisco Software Centre. If you have an ASA device, you will probably find copies of the software on the accompanying CD, or again you can obtain software for devices from Cisco, provided you bought a maintenance contract.

For Cisco routers I recommend using Cisco 7200 or 3725 router images. Most of the examples in this book will use the Cisco 3725 router because it requires no configuration to get started. For serious simulations, I would recommend using 7200 routers because the 7200 is the model for which Dynamips was designed, and this router also supports Cisco IOS (Internet Operating System) Version 15.

The story is similar for Junos – the operating system for Juniper routers. You can find the Junos software easily on the Juniper website, but you'll need to use your customer login to download the software.

Downloading Vyatta router images is much easier because Vyatta is an open source project. You can download both Qemu and Virtual Box based Vyatta router images directly from the GNS3 download page: - look in the Qemu Appliances or VirtualBox Appliances directories. However, getting a Vyatta router working is much more complicated than the Cisco routers discussed here. Deploying Vyatta routers is discussed in Chapter 4, Unleashing Other Emulators.

Now, if you have one or more router images in your Images directory as described previously, you are ready to install GNS3. The following examples will assume you have a Cisco 3725 router image in your Images directory.

Downloading GNS3

Depending on your operating system and which features you want to use, you may need to download more than a single application to get GNS3 running. However, there is no better place to start than at the GNS3 website:

Not only will you find links to the latest GNS3 downloads for Windows, OS X (Macintosh) and Linux, but also a list of links to some of the other associated software you might need.


The installation process

The installation process is vastly different for each operating system. If you are running a version of Windows, the only installation package you need is the all-in-one package – although getting it installed and running may require a little more work. For OS X and Linux users, your tasks are going to be much more detailed.

Installing on Windows

Download and install the all-in-one package from During the installation process you will get the chance to choose the packages you wish to install.

I recommend that you choose to install SuperPutty during the installation. It will then become your default console application, otherwise PuTTY will be your default console application. However, be warned that SuperPutty will download and install the .NET framework the first time it runs (it is huge and takes a long time) and requires a restart as well.

During the installation you will need to confirm any Windows UAC challenges or license agreements you may be confronted with, and in the case of Windows 8 you may even be presented with a compatibility issue when WinPcap is installed. If so, simply choose to Run the program without getting help.

Once the installation is complete, go ahead and begin the Post-installation tasks in this chapter.

Installing on OS X (Macintosh)

There is no all-in-one package for OS X, so you have to find the bits you need and install them one at a time. Here is what you will need to download in addition to GNS3. Use the latest version, and for the installation process, I will assume that the following applications have been downloaded.


Download from…

XQuartz X11


Step 1: Install XQuartz X11

With OS X, it is best to install Wireshark before GNS3, but Wireshark uses an X11 display, so first you have to install X11. XQuartz is the X11 version created by the XQuartz community project created by Apple.

Open the XQuartz install .pkg file, accepting all the agreements and entering your password when required.

When your XQuartz installation is completed, you will have to log out and log in again. I suggest running XQuartz after logging back in (it gets installed in the /Applications/Utilities directory) to be sure the install went smoothly. You should see an Xterm window open.

Step 2: Install Wireshark

I recommend you install Wireshark before GNS3. This is because, as explained in the Read me first.rtf document, Wireshark installs:

/Library/StartupItems/ChmodBPF. A script which adjusts permissions on the system's packet capture devices (/dev/bpf*) when the system starts up.

Having these permissions is going to make life easier when you install GNS3.

Wireshark comes as a .pkg install file. But (on Mountain Lion at least,) your default security preferences will prevent you from installing it. To bypass the security preferences, you must launch the install package by right-clicking (or <Ctrl>-clicking) on the package and selecting Open. Accept all the agreements and enter your password when required.

Run Wireshark when the installation is finished. When you first run Wireshark, it will ask for the location of your X11 application – which is XQuartz.

Click on the Browse button and locate XQuartz in /Applications/Utilities/. You will then have to quit Wireshark and run it again, being patient as it builds its cache.


Note: Wireshark always starts XQuartz when it runs, and you will need to switch to the XQuartz window rather than the Wireshark window when you switch between applications.

Step 3: Install GNS3

Open the GNS3 .dmg you downloaded, where you will find a single application – GNS3. Drag the GNS app to your Applications directory to install it.

However, your is more packed away than just GNS3. Not quite an all-in-one package like Windows, but it does include a copy of Dynamips and VPCS, which you will use soon, as well as a copy of the Qemu emulator which you will use later.

Once the installation is complete, go ahead and begin the Post-installation tasks section.

Installing on Linux Mint

There are many variations of Linux, but when it comes to software distribution, there are two main installation flavors – rpm (based on Red Hat) and deb (based on Debian). Since there is actually a way to install GNS3 from a deb package, I have chosen to use Linux Mint 15.0 (Cinnamon) desktop as the principle flavor of Linux to describe the installation process. This process should also work on other flavors of Debian Linux including Ubuntu. For other Linux flavors like Red Hat, check out the GNS3 Forum and go ahead, ask for help if you need it.

Step 1: Prepare your repository

The GNS3 source files are now stored in a Private Package Archive (PPA). Before you can use the PPA, you must first give your Linux system permission to use it. From a Linux command line, issue the following command to prepare your system to use the GNS3 PPA. At the same time, you should ensure that your repository is up-to-date by running apt-get update from a terminal command window.

sudo add-apt-repository ppa:gns3/ppa

sudo apt-get update

Step 2: Install Dynamips and GNS3

Before you install GNS3 you must be sure that Dynamips is installed first. The following command ensures you get the latest of both and will also install Wireshark.

sudo apt-get install gns3 dynamips

Step 3: Install VPCS

As with the other packages, VPCS is also part of the PPA and is installed in the same way as shown:

sudo apt-get install vpcs

Step 4: Install Xterm

GNS3 requires Xterm to run VPCS and the Tools | Terminal command. Xterm is often installed by default on Linux, so the following command will update your install to the current version if it is already installed, or install it if it is not.

sudo apt-get install xterm

You are now ready to proceed to the post-installation tasks.


Post-installation tasks

No matter which OS you installed GNS3 on; the next task is to run GNS3. The Setup Wizard will appear.


Note: When GNS3 starts, it looks for the GNS3 settings file ~/.gns3/gns3.ini (OS X/Linux) or %APPDATA%\gns3.ini (Windows). If it does not exist, it runs the Setup Wizard. If the Setup Wizard did not run, quit GNS3, delete this file and run GNS3 again.

The process is similar for each operating system, and the Windows setup is shown here, with references to the other operating systems as needed.


Warning: Double check that you completed that important pre-installation prerequisite and already have a router image in your Images directory, otherwise you won't be able to complete all the steps that the Setup Wizard will take you through.

The setup wizard

This is the most important part of the installation, and the most daunting! Don't give up, I'll help you through it.

The first step is to configure the path to your OS images (IOS, Qemu, PIX etc.) directory. Remember, you copied your images to your %HOMEPATH%\GNS3\Images directory before you began the install. (Or your ~/GNS3/Images directory).

Click on the number 1 to bring up the GNS3 Preferences dialogue for General Settings. Note that the OS images (IOS, Qemu, PIX etc.) directory is set to the directory where you copied your images. If this is not correct, change it now. Also note that there is a Projects directory. It should be set to be located on the same GNS3 directory branch as your OS images (IOS, Qemu, PIX etc.) directory.

Click on OK and you will be asked if you want to create the project and image directories. Click on Yes to have GNS3 create the Projects directory for you.

Back at the Setup Wizard, click on the number 2 to bring up the GNS3 Preferences dialogue for Dynamips. The key point here is to click on the Test Settings button. This is to verify that the path to Dynamips is correct. If you do NOT see a message like Dynamips 0.2.10 successfully started, then you will need to troubleshoot. The most likely cause is that the path to Dynamips is incorrect or Dynamips was not installed correctly.

Click on OK to dismiss the Preferences dialogue and return to the Setup Wizard where you will now click on the number 3. This will open the IOS images and hypervisors dialogue.

This is the dialogue where you tell GNS3 which of the IOS images you copied to your Images directory you wish to use. The process is a little tricky, so use the next diagram for help.

Step 1: Select an image file

Click on the ellipsis (…) next to the Image file prompt. A file browser will open at your Images directory. Select an IOS image and click on OK. If the image is compressed (which is likely if this is the first image you have selected), then you will be presented with a dialogue asking if you would like to uncompress it. Some images simply won't work unless they have been decompressed, and it is always a good idea to "uncompress" the image anyway because your simulated routers will load much faster.

By convention, compressed images use a .bin extension, and uncompressed images use a .image extension.

Don't stop. Your image isn't added yet!

Step 2: Configure the Idle-PC value

There have been many tears wept, many heads banged and many disappointments suffered by people who neglect this rather inelegant feature. The actual reason for an Idle-PC value, and what is does, is discussed in Chapter 2, Creating your First GNS3 Simulation. For now, just be happy that since GNS3 0.8.4, there is an easy way to Auto calculate the Idle-PC value – possibly saving you hours of searching for a good value. Without an Idle-PC value, your routers will potentially run your computer's CPU to 100 percent.

I suggest you open your Windows Task Manager (or run top in a terminal window on OS X/Linux) before you commence this process so you can observe the CPU usage as GNS3 attempts to find an Idle-PC value.


Warning: During this step your computer is likely to become unresponsive at times. Make sure your computer is not busy with other important tasks during this step.

Click on the Auto Calculation button for the Idle-PC value. A progress dialogue will appear. Don't be alarmed if your computer's CPU jumps to 100 percent several times during this process, or even if you see Application Not Responding messages.

If GNS3 is not able to find a good Idle-PC value, you will see a Failed to find a working Idle PC value message. Before you try again, make sure you have absolutely all other applications on your computer closed (except perhaps Windows Task Manager), and try again. When the process is finished, close the dialogue.

Optionally, you can now click on the Test Settings button, which simply boots your router image so you can check your CPU usage. If your CPU usage is still high, make a note of the previously allocated Idle-PC value, and try again.

Don't stop. Your image may not be added yet!

Step 3: Save your settings

If you used the Auto calculation, then GNS3 would have saved your configuration automatically, but if you manually typed your own Idle-PC or left it blank, then you need to click on Save before your settings are saved for this image. If you try to add another image before saving, you will simply overwrite the one you have already selected.

Unfortunately, there is no warning if you click on Close without saving. The best you can do is look at the list of images at the top of the window. If your image is not listed there, then you can be sure it has not been saved.

Step 4: Check the base config

GNS3 makes every effort to try and make things easy for you, but some features do so at the expense of making the GNS3 simulation less like a real hardware router.

The Base config is such a feature.

When you boot a hardware router for the first time, you are greeted at the console with a message:

         --- System Configuration Dialog ---
Would you like to enter the initial configuration dialog? [yes/no]:

But if you have a Base config file specified, GNS3 boots the router with the configuration from that file applied which is a great time saver and even assists in keeping your CPU under control if you have a lot of routers. (Having a lot of routers sitting at the [yes/no] prompt can spike your CPU).

You can edit the baseconfig.txt file if you wish to customize it, or even have a different file for each router image. By default, it is found in your Images directory.

Or if you want your simulations to be more "real-world" and boot to the System Configuration Dialog, and the [yes/no] prompt then you can delete this setting, leaving it blank. But don't forget to click on Save again after deleting the field.



In this chapter you have learned about the GNS3 family of applications, and hopefully now have a better appreciation of the many contributors to this product.

You now know how as to work out if your computer is going to be powerful enough to handle the size of the simulations you wish to run.

You have followed the process of downloading the appropriate files for your installation and installing them in the recommended order, and gone through the essential installation steps of defining the images and projects directories, tested your Dynamips installation and configured at least one IOS image ready for inclusion in a simulation. Ideally, you will have found a good Idle-PC value for this image, and you now have a working installation of GNS3 ready to build your first GNS3 project with Cisco emulated routers and the Virtual PC Simulator, which is of course what you will be doing in the next chapter.

About the Author

  • "RedNectar" Chris Welsh

    "RedNectar" Chris Welsh likes to share knowledge, so it's no surprise that he spends most of his time teaching, some of his time consulting and too much of his time on forums and blogs. The teaching is mainly Cisco related (he became a CCSI in 1998), the consulting is through his own company (Nectar Network Knowledge) and his blog (, along with his contributions to the GNS3 Forum (, became the inspiration to write this book. To keep his sanity, he likes to go for long walks in bushland, particularly around the National Parks near his hometown of Sydney, Australia.

    Browse publications by this author

Latest Reviews

(1 reviews total)
Si bien me sirvio como punto de partida, esta desactualizado y solo da ejemplos muy específicos sobre cisco.
GNS3 Network Simulation Guide
Unlock this book and the full library for $5 a month*
Start now