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

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 http://gns3.net/ 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

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

Windows

%HOMEPATH%\GNS3\Images\

OS X or Linux

~/GNS3/Images/

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 sourceforge.net download page: http://sourceforge.net/projects/gns-3/files/ - 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: http://www.gns3.net/download/.

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.