GNS3 Configuration Guide

GNS3 is actually the graphical front-end of Dynamips/Dynagen and allows you to drag-and-drop routers onto a stage, connect them up, run IOS on them, and save their configs, just as if you had your own network. It can be a little confusing to set up first of all so I will present a step-by-step guide below of how to install and configure GNS3 including a couple of advanced options which will allow you to run Cisco Security Device Manager (SDM) on your PC.

Installation and Configuration

This process needs to be done only the once.

1. Download GNS3 from and install, accepting the various license agreements etc.

2. You now need a Cisco IOS. Get one from

3. Now open up GNS3.

4. Go to Edit-->IOS Images and Hyper visors and you should get a screen similar to below.

5. In the Settings section you need to point to the IOS image you copied in Step 2 then click on Save. The value of the IDLE PC section will be blank and leave blank for now. Now click on Close.

6. Now go to Edit-->Preferences then click on Dynamips on the left-hand side. You should get a screen similar to below.

7. The executable path should point to the dynamips-wxp.exe in the Program Files directory. Change the Working Directory to a desired folder then click on the Test button. You should see that Dynamips has successfully started, if so click Apply then OK. If not you should double-check the Executable Path and the Working Directory:

8. On the main screen drag a router onto the main screen then right-click on it and show hostname. Now click on Emulation Mode.

9. Click on the Play button on the tool bar to start the Cisco IOS.

10. In the bottom pane marked “Console” type console R0 to set up a console session with your router similar to below.

11. Say “No” to initial configuration dialog until you get to the Router> prompt. Now type enable to go into Enable mode.

12. Go back to the GNS3 session (screen shot in Step 8) KEEPING THE CONSOLE SESSION OPEN.

13. Type idlepc get your-router-name for example idlepc get R0 and wait for some idlepc values to be displayed. Make a note of these values and click Cancel.

14. By default Dynamips will take up 100% of your CPU usage and you need to specify an idlepc value to get that changed. Close down the console session and go to Design Mode in GNS3. Open up Task Manager on your PC (usually CTRL-ALT-DELETE) then go to the Performance tab.

15. Go to Edit-->IOS Images and Hypervisors and select the IOS you identified in Step 4 then click on Edit. Enter the first idlepc value you wrote down from Step 13 then click on Save then Close.

16. Go back into Emulation mode then start the IOS again then console to the router. View the CPU utilization in Task Manager and see if it falls below 5%. If it stays at 100% then go back to step 15 and change the idlepc value to the next one in the list. Repeat this until you get an idlepc value that has the CPU utilization at around 5% or less.

You have now successfully installed and configured GNS3.

Configuring a Serial Interface on a Router

By default the 3660 image that I use comes with 2 Fast-Ethernet interfaces. In order to simulate WAN links you need to add serial interfaces to the router as outlined below.

1. Right-click on your router in Design Mode then click Configure then on your router name.

2. Click on the slots tab and change slot 1 (or any other slot other than slot 0) to NM-4T. This will provide you with 4 serial interfaces. NOTE THAT THE SLOT NAME MAY BE DIFFERENT DEPENDING ON WHICH IOS YOU USE.

3. Click on Apply then OK.

Adding a switch module to your router

Follow the same steps as you did for configuring a serial interface but choose the NM-16ESW module from the drop-down list.

Connecting two or more routers

You will come to the point where configuring just one router is not sufficient such as when you want to run a routing protocol. The following guidelines show you how to connect routers together.

1. Drag two or more routers onto the stage and configure their slots if required. Display their hostnames by pressing the ABC button on the toolbar.

This is a personal preference and allows you to track which router is which.

2. Now click on the interface button on the toolbar and select Manual.

The interface button changes to a red cross.

Now left-click on a router and select an interface which you want a cable connected to. Now click the router to which you want to connect to and select the interface on that router for the other end of the link. You should now see the link has been drawn. Once you have finished configuring the interfaces click the interface button (red cross) to get out of interface configuration mode (the icon will revert to the telephone jack symbol). The picture below shows three routers with a Fast-Ethernet connection and the other with a Serial link (zig-zag line).

3. Notice that each link has got a red dot on it. When you go back into Emulation Mode and start the IOS, each dot should turn to green which denotes that each router has successfully started the IOS.

Saving your configuration

After all your hard work on the command line you will probably want to save your configuration and reuse it on another day. Follow the steps below to save your work:

1. In Emulation Mode go to FileSave As and save your topology where you want as a .net file. When it comes to reusing this topology just double-click on the .net file to open it up in GNS3.

2. On each router save your config using copy run start

3. Back in Emulation Mode type save /all to save all of the configs into the .net file. If you want to save the config of only one router you can replace the keyword all with the name of the router you wish to save the config of.

Configuring a host in the network (Advanced)

There may be an occasion when you want to connect a host in your topology such as running Cisco’s Security Device Manager (use of this may figure in future CCNA exams). To do this you must first configure a Loop-back Adapter on your PC.

1. Go to Control Panel-->Add Hardware then click Next

2. Yes I have already connected the hardware

3. Scroll to the bottom and click on Add a new hardware device then Next

4. Install the hardware that I manually select from a list (Advanced)

5. Click on Network Adapters then Next

6. Select Microsoft as the Manufacturer then on Microsoft Loop-back Adapter under Network Adapter then click Next then Next again.

7. Open up Control Panel-->Network Connections to see the adapter in place.

Now that you have created a loop-back adapter you will want to connect it to a router. To do this, follow these steps:

1. In the GNS3 installation directory run the Network Device List.bat file which will give you the Ethernet address of your Loop-back Adapter.

Notice the second adapter shown where description is MS Loop-back Driver. I have renamed the adapter as Loop-back Adapter for SDM. We are interested in the NIO_gen_eth string.

2. Go into GNS3 and drag a cloud onto the stage.

3. Right-click the cloud and select configure.

4. Choose your cloud from the list.

5. In the Generic Ethernet NIO section select your Loop-back Adapter from the drop-down list (the one that matches what is shown in Step 1) and click on Add, Apply, the OK.

6. Now connect a Fast-Ethernet port on your router to the cloud as you would connect two routers.

7. Configure an IP address and subnet mask on the router interface connected to the cloud and bring the interface up.

8. Go to Control Panel-->Network Connections and right-click your adapter. Choose Properties then Internet Protocol (TCP/IP) and give it an IP address in the same subnet as the router’s Fast-Ethernet interface with the same subnet mask and with a default gateway matching the IP address of the router’s interface.


Router’s Fast-Ethernet 0/0 interface connected to the cloud:

On the router I would have something like:
Router(config)#int fa0/0
Router(config-if)#ip address
Router(config-if)#no shut

On the PC I would have something like:
IP address =
Subnet Mask =
Default Gateway =

You should now be able to ping between your PC and the router.

Running SDM (Advanced)

There may be a need to practice using the Cisco Security Device Manager (SDM) for your exam and the following steps show you how to configure it.

1. Download and install SDM from

2. Choose to only install SDM to your PC, NOT to the router.

3. Once installed you need to configure your router with the following commands:

Router#conf t
Router(config)#hostname SDMRouter
SDMRouter(config)#ip domain-name SDMDomain

Now configure your router with the following commands:

SDMRouter(config)#username your_username privilege 15 secret 5
SDMRouter(config)#ip http server
SDMRouter(config)#ip http secure-server
SDMRouter(config)#ip http authentication local
SDMRouter(config)#line vty 0 4
SDMRouter(config-line)#login local
SDMRouter(config-line)#transport input telnet ssh
SDMRouter(config-line)#privilege level 15
SDMRouter(config-line)#line cons 0
SDMRouter(config-line)#login local
SDMRouter(config-line)#transport input telnet ssh
SDMRouter(config-line)#privilege level 15
SDMRouter(config)#crypto key generate rsa gen mod 1024

4. Now double-click the SDM icon and enter the IP address of the router and tick the box asking about HTTPS then click on Launch.

5. Ensure you allow pop-ups on your browser.

6. Enter username and password as defined after step 3.

7. Say yes to allow SDM to install.

You should now have a screen similar to the one below although this may be because I used a username and password of “cisco” which are the default.

8. Select a new username and password for the router then click OK. You should see the screen below then click OK.

9. You should now be in SDM and able to configure the router.

Share your views...

1 Respones to "GNS3 Configuration Guide"

Nayan said...

Where is the necessary images!!!!!!!!!!!!!!!!!

November 24, 2012 at 6:44 PM

Post a Comment



Our Partners

DISCLAIMER: This site does not store any files on its server. I only index and link to content provided by other sites. All the files are from internet. In case of any query/objection regarding copyright or privacy, please inform me at Contact me and leave your comment here. I will immediately respond to you.