Introduction to GNS3

From ITCwiki
Revision as of 23:47, 9 May 2011 by Lueyang (talk | contribs)
Jump to navigation Jump to search

Introduction

GNS3 Logo

In project will give you a brief introduction to GNS3 as a Quick Start Guide only. It will not cover everything you need to know about GNS3. For more information and detail, please refer to the official website at http://www.gns3.net/.

GNS3 is an open source, free program that can be used to to simulate actual Cisco IOS and even Juniper JunOS, too. GNS3 is a graphical network simulator that allows emulation of complex networks. It allows you to run a Cisco IOS in a virtual environment on your computer running Windows or Linux OS. Emulation is possible based on Cisco router platforms and PIX firewalls. It is a great tool for people who preparing for Cisco certifications such as CCNA and CCNP certifications. I found that it is a very good tool for learning and testing in a lab environment. However, there are some advantage and disadvantage of GNS3.

Advantages of GNS3

  • GNS3 is an open source, free program.
  • GNS3 runs an actual Cisco IOS.
  • Can simulate complex network.
  • Simulated topology can be connected to real world.
  • You can take packet capture between devices on your lab.
  • Other devices and vendors are also supported.

Disadvantage of GNS3

  • It can not take the place of a real router.
  • Slow throughput compare to real equipments.
  • Very limited switching functionality.
  • Limited Cisco device platforms supported.
  • High CPU utilization.

Quick Start Guide

I will show you how to download, install, and setup a simple lab using GNS3. There are Windows version and Linux version of GNS3 but I will discus the version for Windows only in this project.

Downloading GNS3

Most of the time you will need to download the all-in-one package that contains everything you need (Dynamips, Qemu/Pemu, Putty and WinPCAP). To download GNS3, go to http://www.gns3.net/download and on the "GNS3 v0.7.4 all-in-one" on the website, or you may simply click here to download the all in one package.

01 dl gns3.jpg

Installing GNS3

Once you have downloaded the package, just double click it and follow the on screen instructions. Note that GNS3 depends on many dependencies such as WinPCAP, Dynamips, and Pemuwrapper. These dependencies must be installed along with GNS3 in order for GNS3 to work correctly.

Defining Cisco IOS files

Before we configure the location for a Cisco ISO, we must have a Cisco ISO for one of the supported platforms. Remember that not every Cisco ISO images are supported in GNS3. Only certain IOS from older platforms of Cisco routers are supported. Current platforms supported include: Cisco 1700, 2600, 2600mx, 2691, 3600, 3700, and 7200 series routers. In this example, I will use the IOS image from my Cisco 2621xm router. The IOS I am using here is c2600-i-mz.122-8.T5.BIN.

Setting GNS3 Environment

Once the installation is completed, you need to set the path to Dynamips executable and IOS location. Follow the steps on the "Setup Wizard" windows to complete the requirements at the first time you lunch GNS3.

  • Step 1: On the Preferences windows, click on Dynamips. You can change the working directory if you want to and then click on the "Test" button. It should says that "Dynamips successfully started" and then click Apply and then OK buttons. This test will make sure that everything working correctly.
  • Step 2: On the IOS image and hypervisors windows, add the IOS image you have into the windows and close the IOS image windows and the Setup Wizard windows. You can add more than one image for use in GNS3.
Setup Wizard Windows
Testing Dynapips
Adding IOS Image

Building a Network topology

Once want the IOS image is defined, you are ready to build your network topology, power on your devices, and configure the network. Note that you can use only the router platforms corresponding to the images you have defined earlier. You must define all the images corresponding to the platform routers that you want to use in your lab. In this example I have defined the image for the Cisco 2600 series router, so I will be able to use the 2600 router only.

  • To create a network diagram, just click on the device icon you needed from the left pane and drag and drop it into the work area or work space which is the middle top area. In this example, I am using the 2600 platform so I can only use the Router C2600. In this example diagram, I placed two routers and two switches on the work space.
  • To cable the network, click the Add a link button on the toolbar at the top and choose manual from the drop-down menu. Your mouse cursor will change to + sign. Click on the router or device you want to connect from and select the interface you want to connect. Click on the destination router or device you want to connect to and then select the interface you want to connect to.

05 gns3.jpg

  • To configure the network, first you need to power on the devices. Right-click on each each device and choose Start. Then right-click the device you want to configure and choose Console. A telnet console should opens up. Note that some devices such as the Ethernet switch are not configurable through telnet console.

06 gns3.jpg

Now you can configure the router as you would configure a real Cisco router.


I hope this project helpful for you who are students like me.

Just spend sometime playing around with this program and be familiar with it, and it will be a very good tool for your CCNA, CCNP and even CCIE labs without spending hundred of thousand dollars on equipments.