Thanks for visiting! If you're new here, you may want to subscribe to my RSS feed. This blog posts regular tutorials, news, and study tips about networking, especially about Cisco CCIE related topics. Go ahead, subscribe to the feed! You can also receive updates from this blog via email. Thanks for visiting!
I get a lot of requests from students asking how they can practice some of the topics I teach on my Cisco courses. Cisco equipment can be pretty expensive especially when you are starting out your networking career, and not having anything to practice on makes that barrier to entry that much higher. Enter Dynamips. Dynamips is a Cisco hardware emulator. Its like VMWare for Cisco! It emulates a basic Cisco hardware platform so all you need to add is an IOS.
Let’s take a look at how we configure it. This article focuses on the basics, getting two routers to talk to each other in a virtual environment. Part II will focus on setting up a basic lab that we can use for all the examples in this site.
First we need to download Dynagen. Dynagen is a front-end to the Dynamips Cisco emulator. It provides a custom-built windows installer and easy to use configuration file which makes lab set up a whole lot nicer than the basic dynamips. It runs on Windows, Linux and MacOSX (with Intel cpus). This article will focus on the Windows installation and configuration. We can download Dynagen here. We will also need WinPcap, which we can download here.Once we have downloaded Dynagen installation is a snap. Just double click the exe files and click next a couple of times!
Once we have Dynagen installed and ready to roll you should see a Dynagen Sample Labs icon, a Dynamips Server icon and a Network device icon placed on your desktop. We’ll need to reboot the machine after the installation, to make sure windows picks up
Our First Dynagen Lab
Double click on the Dynagen Sample Labs and open up the simple1 folder. In the simple1 folder you’ll see a simple1.net file. These .net files are used by dynagen to describe a network topology. Lets have a look at the file:
[localhost]
#
[[7200]]
image = \Program Files\Dynamips\images\c7200-advipservicesk9_li-mz.124-11.T.bin
# On Linux / Unix use forward slashes:
# image = /opt/7200-images/c7200-jk9o3s-mz.124-7a.image
npe = npe-400
ram = 160
#
[[ROUTER R1]]
s1/0 = R2 s1/0
#
[[router R2]]
# No need to specify an adapter here, it is taken care of
# by the interface specification under Router R1
The simple1.net configuration file is divided up into three section. The [localhost] tag up the top specifies that the simulated routers defined will run on the local dynamips server. Dynamips allows you to run labs on multiple servers (so it appears as one giant lab), but for the purpose of this example we are only looking at one dynamips server.
The simple1.net file has two routers defined, R1 and R2. They are connected up via Serial 1/0 on both routers. Lets start up the dynamips server by double clicking on the Dynamips Server icon on the desktop.


You can see above, that R1 and R2 have both started correctly. You should notice that your CPU usage has just shot through the roof. This is because there are no idle-pc values set for the IOS we are using. We will tweak that a bit later, but first lets have a play with our new virtual network.
On the dynagen console, type:
console R1
This allows us to get access to the console port of R1. If you type this in fast enough, you should see R1 IOS startup process. Once the router has finished its startup process we can configure the router as if we were directly connected to its console port!

I feel the need for more speed! Tweaking idle-pc timings for Dynagen
One of the problems you might notice as you progress through this tutorial is the CPU usage for Dynagen. With two routers started, R1 and R2, its probably already utilising 100% CPU usage. If its using 100% for two routers, how in the world are we going to create a 6 router lab? We can tweak the way Dynagen uses this IOS on your PC by changing the idle-pc timings.
What are idle-pc timings? The Dynagen simulator does not know when the router is performing useful router stuff, and just being idle. Setting idle-pc values is a way of getting Dynagen to analyse the IOS that you are running, and figuring out when it is actually idle.
The idle-pc values are specific to the IOS that you are running, so the results i get here might be different than yours.
The first thing we need to do is stop R2. On the Dynagen management console enter:
stop R2

You can see above that R2 has been stopped. The CPU usage might drop slightly but we can do a whole lot better than that. For the best analysis results, we should have only one router running so Dynagen can accurately collect idle-pc statistics.
Log into R1 and make sure that R1 is idle. You might need to wait until all the interfaces are initialized.

You can see above that R1 has completed its boot cycle and all its interfaces are initialized. For all intents and purposes the Router is now idle.
On the Dynagen management console enter:
idlepc get R1
Dynagen will then collect statistics for this router. This can take a minute or two, but once this is complete you should be presented with a list of idle-pc values

The items with the star next to them are the ones we want to try. Selecting one should drop your cpu-usage dramatically. If it did not drop we can try the following on the Dynagen management console:
idlepc show R1
This should present all the idle-pc values so we can select another value to try. Once we are satisfied with the CPU usage, we should save the idle-pc timing so we don’t have to do this everytime we use dynagen. We can save our idle-pc values by entering the following on the Dynagen management console:
idlepc save R1 db
This will save idle-pc information about the IOS we are running to a dynagen configuration file. Any other routers we now start with the analysed IOS will automatically have the idle-pc applied.
The Finished Lab
We can see in the configuration file for simple1.net that R1 and R2 are connected via there Serial 1/0 interfaces. Lets start up R1 and R2 and get them talking.
On the Dynagen management console enter:
start R2
This should start up R2. R2 uses the same IOS as R1 and should use the same idle-pc values to minimize the CPU resources required. We can log onto R2 by going to the Dynagen management console and entering:
console R2

R2 should go a startup procedure and after it has initialized its interfaces we can configure them both:
R1
Router#
Router# conf t
Router(config)# hostname R1
R1(config)# no ip domain-lookup
R1(config)# line con 0
R1(config-line)# exec-timeout 0 0
R1(config-line)# logging synchronous
R1(config-line)# int s1/0
R1(config-if)# ip address 192.168.1.1 255.255.255.0
R1(config-if)# no shut
R1(config-if)# end
R1# wr
R2
Router#
Router# conf t
Router(config)# hostname R2
R2(config)# no ip domain-lookup
R2(config)# line con 0
R2(config-line)# exec-timeout 0 0
R2(config-line)# logging synchronous
R2(config-line)# int s1/0
R2(config-if)# ip address 192.168.1.2 255.255.255.0
R2(config-if)# no shut
R2(config-if)# end
R2# wr
Once the virtual routers are set up they should be able to ping each other as if they were physical router connected up to each other.

Looks like we have a working simulation. We will be building on the lab in Part 2 of this article to come up with a topology consisting of 6 routers. Stay Tuned!
[...] Other useful stuff: http://ardenpackeer.com/2007/07/07/how-to-set-up-a-basic-dynamips-lab-using-dynagen-part-1/ [...]
Hello
I need help.I have installed everything but i am getting an error like unable to create vm instance please help me out.thx in advance.u can even reply to my email.
Hi Krishna,
Can you give the exact error message? This could be caused by lots of issues, one of the common reasons it happens to me is that dynagen doesn’t find the path to the IOS image. I’d suggest double check your path for the IOS in the .net file.
Ex.: image = C:\Program Files\Dynamips\images\c3640-ik9o3s-mz.123-22.image
In this case, make sure you have copied your IOS image to C:\Program Files\Dynamips\images and that the .net file points there. Let me know a little bit more detail on the error message and I’ll be glad to help.
Thanks Arden. Got Dynamips and a mini lab up and running… this is really cool! Good to see my cpu no longer sitting at 100%. :)
And where is this Part 2 that you keep promising?! Anyone would think that you were extremely busy or something!!
Great guide. I have one for GNS3 which is the graphical front-end for Dynamips. I have had plenty of positive feedback for it so please come and see it at http://www.subnettingmadeeasy.blogspot.com
Regards,
Chris
Hi Arden,
I’ve installed WinPcap, Dynagen & Dynamips. Copied my IOS to the images folder (c7200-advipservicesk9-mz.124-2.T.bin) then run the Dynamips shortcut on the desktop, the app runs but doesn’t get past here
Cisco Router Simulation Platform (version 0.2.8-RC
Copyright (c) 2005-2007 Christophe Fillot.
Build date: Sep 7 2007 17:17:20
ILT: loaded table “mips64j” from cache.
ILT: loaded table “mips64e” from cache.
ILT: loaded table “ppc32j” from cache.
ILT: loaded table “ppc32e” from cache.
Hypervisor TCP control server started (port 7200).
I missing a step? If not any ideas where i might be going wrong?
Cheers Ian
Hi Ian,
Looks like the Dynamips server is running correctly. All you should need to do now is run a .net file. Double click a .net file (try a sample one in the sample_labs directory). You might need to edit the .net file to point to your IOS image.
Sorted it out, it was a silly mistake. When i had edited the .net file to start with i had check “Always open in notepad”
Up and running now, cheers
Hi Arden
I had downloaded the Dynamips and when i clicked rhe simpl1.net iam getting a message
Reading configuration file…
*** Error: Could not connect to server: localhost
Press ENTER to continue
I copied the IOS into the particular image folder.
C:\Program Files\Dynamips\images\c2800nm-spservicesk9-mz.124-3h.bin.
Still iam getting the above error message.I even changed the name of the IOS file from bin to img its not working.
I opened the simple1.net folder using notepad and i changed the path.
Image = C:\Program Files\Dynamips\images\c2800nm-spservicesk9-mz.124-3h.img
# image = C:\Program Files\Dynamips\images\c2800nm-spservicesk9-mz.124-3h.img.
So i need ur help arden and also when iam opening the Dynamips server iam getting the error message as somebody pointed out above.
Thanks in advance Expecting a reply
Sriram.V
Hi Sriram,
That error usually happens because you don’t have dynamips server running. It is trying to make a connection to your dynamips server and it can’t find one. Make sure you have your dynamips server running then double click on the .net file.
Hi Arden
Thanks I got that right.
But after I type Console R1 telnet window opens but it stops there and that self decompressing the image is not occuring.
Connected to Dynamips VM “R1″ (ID 0, type c7200) - Console port
It stops there.
Can u help me out
Thanks Arden
Sriram.V
Hi Sriram,
The image you are using is for a 2800, this is not supported by Dynagen. You will have to get one that is supported. You might also have to modify your network file. Say for example you get a 3640 image, you would have to replace [[7200]] in your network file with [[3640]].
I dont know how to configure it to start working. I keep on getting error signals from scratch
I am having a brand new HP desktop with Core 2 Duo 1.86 Ghz & 2GB of RAM in it. I have setup Dynamips & Dynagen. I am able to run even 3640 & 7200 routers on it, but I am having one problem that I can not able to ping local serial Interface where as I can easily ping ethernet interfaces.
Hi Yatin,
Can you please post your .net file, and I’ll take a look
Hi Adren ,
Is it possible to setup an Internetwork Expert lab on dynamips .
Please note that i have only one gig of RAM . Do I need to Upgrade the RAM .
I have already made the topology and I have all the routers configured .
But when I start BB1 , BB2 , BB3 . The cpu Utilization on my laptop rockets up to 100% .
Please let me know what to do !
Regards
Yogesh
Hi Yogesh,
Have you set the idle-pc values for the IOS you are using?
Hello!
I’m triying to simulate a 1710 series router. The text files that come with the installer, say its supported (im running dynagen 0.10.1, dynamips 0.8.0 RC1 and WinPcap 4.0.2).
The IOS images im using are c1700-ipbase-mz.123-14.T3.bin and c1700-ipbase-mz.124-9.T.bin.
Ok, the server starts without a problem, and when i run my .net file, it also runs without a problem. My .net file looks like this:
autostart = false
[localhost]
[[1710]]
image = \Program Files\Dynamips\images\c1700-ipbase-mz.124-9.T.bin
ram = 64
[[ROUTER RC1]]
model = 1710
f0 = SW1 1
[[ROUTER RC2]]
model = 1710
f0 = SW1 2
[[ROUTER RM1]]
model = 1710
f0 = SW1 3
[[ethsw SW1]]
1 = access 1
2 = access 1
3 = access 1
Ok, i start one of my routers, and when i telnet to it, i u can see it loads the IOS image, but when u get to the “OK” part, it freezes.
What am I doing wrong?
[...] Other useful stuff: http://ardenpackeer.com/2007/07/07/how-to-set-up-a-basic-dynamips-lab-using-dynagen-part-1/ [...]
I installed dynamips. but only two routers i.e., R1 and R2 are opened. I want to work at 4 Routers. Kindly reply me how I can open remaining 2 Routers.
Hello, I have an image c7200-is.mz.121-27b and having difficulties when trying to console R1.. It stays, as somene posted here before, in the part, when it should boot, but it doesnt… This happens on my laptop running Vista. I tried it on my desktop running XP, and it seems it boots, but stops and says - Unknown CPU card type, ROM: reload requested….
Any idea?
Thank you
Hi Nori, send me a copy of your .net file and I’ll take a look.
I actually got it working, but I had to change a IOS…, so I guess I dont need to emulate the old one.
but thanks anyway
Mate,
Very nice guide. Very clear and detailed, thanks for the help! much appreciated.
Hi i try to do simple frame relay lab over dynamips.. when i try to run frame relay, it runs without any problem.. when i try to console router R1 then messege show Skipping stopped device R1…
wht i have to do..
i send the frame relay config..
autostart = false
[localhost]
[[7200]]
image = \Program
Files\Dynamips\images\c7200-jk9o3s-mz.124-7a.image
# On Linux / Unix use forward slashes:
# image =
/opt/7200-images/c7200-jk9o3s-mz.124-7a.image
npe = npe-400
ram = 160
[[ROUTER R1]]
model = 7200
s1/0 = F1 1
[[ROUTER R2]]
model = 7200
s1/0 = F1 2
[[ROUTER R3]]
model = 7200
s1/0 = F1 3
[[FRSW F1]]
1:102 = 2:201
1:103 = 3:301
2:203 = 3:302
Thank you
@Amarjeeet: You have “autostart=false” in your config file so the routers will start in the stopped state. The routers aren’t turned on by default if you use this. Just type in “start R1″ or “start /all” and then console in to R1
i tried a couple of IOS, but can’t get my .net file running. always getting error msg below:
dyngen:
Reading configuration file…
*** Warning: Starting R1 with no idle-pc value
*** Error: unable to start VM instance ‘R1′
See dynamips output for more info.
Press ENTER to continue
dynamips: (server)
Cisco Router Simulation Platform (version 0.2.8-RC2-x86)
Copyright (c) 2005-2007 Christophe Fillot.
Build date: Nov 9 2007 09:54:39
ILT: loaded table “mips64j” from cache.
ILT: loaded table “mips64e” from cache.
ILT: loaded table “ppc32j” from cache.
ILT: loaded table “ppc32e” from cache.
Hypervisor TCP control server started (port 7200).
Shutdown in progress…
Shutdown completed.
CPU0: carved JIT exec zone of 16 Mb into 512 pages of 32 Kb.
NVRAM is empty, setting config register to 0×2142
C7200 instance ‘R1′ (id 0):
VM Status : 0
RAM size : 160 Mb
IOMEM size : 0 Mb
NVRAM size : 128 Kb
NPE model : npe-400
Midplane : vxr
IOS image : \Program Files\Dynamips\images\c7200-js-mz.124-19a.bin
load_elf_image: open: No such file or directory
C7200 ‘R1′: failed to load Cisco IOS image ‘\Program Files\Dynamips\images\c7200
-js-mz.124-19a.bin’.
Shutdown in progress…
Shutdown completed.
Hi Amy,
Do you have a file called c7200-js-mz.124-19a.bin in your c:\program files\Dynamips\images directory?
Dynamips cannot find this file. Also are you using a 7200 in your .net file?
have the ff. files under
C:\Program Files\Dynamips\images
c3640-js-mz.124-19a.bin
c7200-js-mz.124-19a.bin
Put IOS images here
and here’s my .net file
# Simple lab
[localhost]
[[7200]]
image = \Program Files\Dynamips\images\c7200-js-mz.124-19a.bin
# On Linux / Unix use forward slashes:
# image = /opt/7200-images/c7200-jk9o3s-mz.124-7a.image
npe = npe-400
ram = 160
[[ROUTER R1]]
s1/0 = R2 s1/0
[[router R2]]
# No need to specify an adapter here, it is taken care of
# by the interface specification under Router R1
Arden, thanks much
Hi Amy,
For whatever reason, it seems like Dynamips can’t find your IOS image. Are you running this under XP?
Arden, thanks for pointing out on the IOS path. Made a mistake in renaming the extracted IOS file..I still added .bin, where it’s a default .bin file upon extracting. It’s working fine now..
Hi Arden
I have installed the dyagen acording to the above mentioned steps.I have set the IOS path in “simple1.net” file(by editing it in notpad),then i have :
1)First run dynamips server
when i run the server follwing mesage appears:”c:\program files\Dynamips\dynamips.exe: *** fatal error - could not dynamically determine load address for ‘getaddrinfo’ (handle 0×75030000),Win32 error 127″
I have checked dynamips.exe files it is present in follwing directory:
c:\program files\Dynamips\dynamips.exe
2)Then i try to run simple1.net
but still follwing message appears:
Reading configuration file…
*** Error: Could not connect to server: localhost
Press ENTER to continue
plz solve my problem
hi
after I type Console R1 or R2, telnet window appears but it stops and it looks like this :
connected to dynamips vm “R1″-console port or when i have set the idlepc value ,it goes alittle more forward and shows this message and then stops ############################################## [ok]
It stops here.
plz help me
Thanks
Hi Arden,
I came to your website while browsing some information about CCIE and I liked the information on your website.I am actually trying to make a lab using dynamibs and I had some success but not much due to lack of knowledge on my behalf.Would you be able to assist me in making a customized topology using Dynamibs.I have the topology with me and I can forward it to you.
Thanks in advance for your support.
Regards
Raj
@Raj Shoot me an email and I’ll be happy to help. :)
hi arden
i wanted to install sdm on one of my virtual routers (3640) but during it i got this error stating that i hadnt enough flash memory .so i dont know how to increase the amout of the flash memory of the virtual router in the .net file
hi
i m facing a problem that whenever i m running dynamips server and then trying to open .net lab it’s showing an error that could not open ..location and filename …
press any key to exit
why i m getting this error because when i m doing the same thing of other system it’s running perfectly.
please help it’s urgent
you are simly gr8….gotta a chance to share with my frds..thnx
Hi Arden,
Appreciate your efforts…
I don’t have any problem with the dynamips… I play with it..
I just want to know is there anyway to set idlepc value for pix..
for routers i can set idlepc but not for pix.. actually that option is not given..
So, please let me know if you know other way to set idlepc value for PIX..
Thanks in advance..
cscrtr..
@cscrtr: On Windows, I use BES (http://mion.faireal.net/BES). This is a free utility that allows you to controll the cpu limit of the pemu.exe process.
On Linux, you can try cpulimit.sf.net
Hi Arden,
Really thanks for your prompt reply… I’ll surely check it and let you know …
Thanks again..
how can I define multi-layer switch on dynamips??