Book Image

GNS3 Network Simulation Guide

Book Image

GNS3 Network Simulation Guide

Overview of 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.
Table of Contents (14 chapters)
GNS3 Network Simulation Guide
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Post-installation tasks


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

Note

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.

Note

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.

Note

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.