Dynamips/Dynagen Official Thread. CCNA/CCNP/CCIE equipment questions... come here!

xphil3

[H]ard|Gawd
Joined
Nov 11, 2005
Messages
1,212
You've all heard it before, weather it be from my mouth or a few others, use Dynagen/dynamips for your Cisco study needs. Well, for the past few years people have been consistently asking what equipment they should buy to accommodate their CCNA/CCNP training, so ive *finally* decided to create this thread to hopefully educate some of the readers here about Dynagen/dynamips.

Additions:
Please, if you would like me to add anything or if I left out something PM me and I will fix it. I would very much like for this post to be sticke'd as I feel it is 100% necessary.


What it is and is not:
Dynagen is the front end manipulation tool for dynamips
Dynamips is the backed(Server) hypervisor(if you don't know what a hypervisor is, please use google)
Dynamips is a platform dependent hypervisor, it runs REAL cisco IOS.
Dynamips is a *router* emulator
Dynagen is NOT graphical based
Dynamips is also NOT graphical
Dynamips is NOT a simulator
Dynamips will NOT emulate L3 switching


My intent for this thread is not to be redundant, so I will be linking to many sites which have done all the wet work so to speak. I want to first do a FAQ and then go over a "get er done" turorial.

FAQ:

Q: What do you mean its emulation?
A: Dynamips at its most basic form is a virtualization tool, when you build those routers, what they actually are is virtual machines. Since they run actual code, the software(IOS) is completely unaware that its being virtualizard. If you're familiar with virtualization, this is full hardware virtualization as opposed to paravirtualization.

Q: Can dynamips emulate switches?
A: Yes and no, again. Dynamips can emulate very limited switching features. You can build a 3640(or something that supports the NM-16ESW. This card will allow you to connect multiple routers together. Anything that is unsupported on the 16ESW will also be unsupported on the virtualized version. Dynamips cannot emulate any Layer 3 switching, so you will still need your 3550/3560's

Q: Can this really take me through my training?
A: Yes, this will take you from CCNA through CCIE from a router standpoint. You can also do many of the other certifications as well, including many voice certifications. Yes, dynamips can run CME :)

Q: How stable is it?
A: This is a training tool, for that its worth its weight in gold. As for stability, you will not notice any instability or loss of features until you get very deep into your studies(CCIE).

Q: Why should I use this, and not real gear?
A: Real gear is awesome, blinkey lights, cables,lound fans, rack space... its all sweet. Whats not is the electric bill. You need to keep that stuff running to have those blinkey lights right? The power savings alone are reason enough for most people to not have their own routers. Now, I do not recommend not ever using real gear, you need to have some kind of physical interaction with the actual equipment. For a home lab, I think that its unnecessary if you dont have the means.

Q: I like stuff with a GUI, should I use GNS3
A: Personally, I hate GNS3. If you attempt to export a net file from GNS3 into dynagen it wont work(as of a few versions ago). They add all these retarded coordinates that just dont play well with dynagen. To each their own though, if you like GNS3.. use it. I just wont cover it in this thread.

Q: Does cisco support this as a training tool.
A: Yes and No. Officially, absolutely not but unofficially.... Ive had to talk about this tool to over 100 Cisco employees already.



Last but not least,
Q: What kind of hardware do I need:
A: This might be a long one.

I get this questione PM'd to me all the time, and it really depends on what you want to get out of this home lab as well as your budget. The question that you want to ask youeself is this, "How far do I want to take my studies". Im not talking certification wise either, say that you want to test a 50 router MPVPN design then you're going to need a pretty beefy box. Also, anything with more power will allow you to run more routers...keep the basics in mind. So, at bare minimum I would recommend the following:

1 x Dual core processor
2 gigs of memory
60 gigs of hdd space(virtual router memory is stored on the disk dy default, and net files)
This is obviously barebones, and would be perfect for a CCNA pod and possibly a CCNP pod. If you decide to run it on linux, that setup might even allow you to run the CCIE pod(11 routers).

Personally, I recommend this if on a semi-tight budget:

1x quad core proc(phenom or equivilent intel)
4 gigs of memory
60 gigs

For all those that are curious, my specs are as follows(my recycled virtual box):
2x quad core xeon(5310 I think)
12 gigs of ram
a ton of hdd space(not needed)
3x 4 port NIC



For the CCIE:
Yes it can be done! and many people are doing it. See my setup above. The reason for the 12 network interfaces is that you can tie virtual router interfaces(fast ethernet/ethernet) to real physical interfaces, and you need 12 interfaces for Internetwork expert workbooks. You can do this in windows or unix/linux. This is the easiest and most cost efficient way to do a CCIE pod. Obviously you're going to need a dynamips server and the required 4 L3 switches(2x 3550, 2x3560). Here is a snippet of my configuration file, notice the mapping of virtual to physical interfaces:

Code:
 [[Router R2]]
                model = 3640
                console = 5002

                slot0 = NM-1FE-TX
                slot1 = NM-4T
                F0/0 = NIO_linux_eth:eth1 #Physical to SW2 -> f0/2 # This is the mapping
                S1/0 = FRSW 2
                cnfg = /home/xphile/initial/IEWBII/Labs/r2.txt
Thats pretty much it, not rocket science.

DYNAGEN/DYNAMIPS GET ER DONE!:

IMAGES:
First: GET youself the desired *supported* images/platforms, they are as follows:

1710
1720
1721
1750
1751
1760
2610
2611
2620
2621
2610XM
2611XM
2620XM
2621XM
2650XM
2651XM
3660
3640
3620
2691
3725
3745
* card support is different on each.

Note: Extracting your images will greatly decrease the time in which it takes your router to load. I always recommend doing this.

Installation:
Installation is fairly easy, and completely platform dependent. I personally recommend running Dynagen on really any flavor of unix/linux. If you wish to use binaries, that's easily available but I always like to do things to good ole fashioned way. Dynagen installtion could not be easier and here is the process:

1. Head over to the dynagen sourceforge page and download the desired flavor.
http://sourceforge.net/project/showfiles.php?group_id=160317

2. Unzip/unpack and put into a directory of your choice(or install using exe for windows)
3. You're done!

Remember, this is just the front end package for dynamips. Next you're going to need to get the Dynamips server. *If you're using windows, the installer should have installed the dynamips server


Linux/unix instructions:
1. Now head over to the dynamips BLOG. Yes blog. I prefer using the blog because all of the most recent updates are always posted there by chris.
http://www.ipflow.utc.fr/blog/

2. As you can tell, the updates are pretty damn old. Grab the 0.2.8-RC2-xxx.bin
3. This is the part thats a bit shady(documentation wise), remove the .bin extension of that file for ease.
4. chomd it, I usually use 777 becuase im herendouzly lazy.
5. Load it up like you would any other exec file.
6(optional) Since Im using dynamips for CCIE study and the dynamips server will usually only run around 7 routers(nicely) with one instance, I run two seperate server instances. I will create a quick script(if you can call it that) file to call the dynamips server and create the two instances. It looks like:
dynamips -H 7201 &
dynamips -H 7200 &

For those of you who might not know, the "&" is the put the process into the background.

Congrats! We have dynamips and dynagen installed. This was a pretty quick and dirty guide, and to the point. For those of you who want some more "meat" then check out the Dynagen tutorial.

The turorial will also explain some other essentials that I will briefly go over. Since we are using dynagen as our front end we will be using a simple text editor to modify our "net" files. The net file is exactly what it sounds like, its your network file/map/diagram/whatever. Dynagen will provide you with 4 or 5 different samples of network files. I suggest that you always keep your .net files in their own seperate directories along with your dynagen working directory. Again, Im trying to not be too redundant so Im will go over the important apsects of the net file:

The Net File:
Code:
# Simple lab

 
[localhost:7201] # This is where you define your server and TCP port that the server opearates on. Default int 7200!


    [[3640]] # This is your router model definition, this relates DIRECTLY to the IOS image as well.

    image = \Program Files\Dynamips\images\c7200-jk9o3s-mz.124-7a.image # Path to your REAL ios image.

    # On Linux / Unix use forward slashes:

    # image = /opt/7200-images/c7200-jk9o3s-mz.124-7a.image

    ram = 160 # Memory definitions, if you want to give routers more than their base defaults.

       
    [[ROUTER R1]] # This is your virtual router instance definition, each name needs to be unique
	s1/0 = R2 s1/0 # Your virtual router to router definitions. This one defines that Routers 1's serial 1/0 interface connects to R2's serial s1/0 interface.
	model = 3640 # This defines which IOS image you're going to use for this virtual router instance. It will refrence your "[[3640]]" image definition above. 


    [[router R2]]

	# Notice that you do NOT need to re-define R1-R2 s1/0 back to back connection. If you do, dynagen will fail to load and tell you there is a problem with your configuration file[net file].

Wheww:eek:.... alright, so that's a fair bit of information to stomach but now you have your net file complete. The next thing to do is to load your dynamips server executable first, then your net file. If completed successfully you should see a => prompt. By default, all of your routers will load automagically, if this is undesired(I dont like mine starting all at once) insert this "autostart = false" to the top of EACH one of your net files.

Tuning Dynamips w/ IDLE PC Values:


This is the single most important part of dynagen/dynamips, you need to tune it. By this I mean, load up one of your routers, then when its fully complete go back to the dynagen prompt and type int the following command:
idlepc get R1(or your router name)
This will give you a list of hex values, some with a asterisk and some with none. The ones with asterisk's are preferred.
Code:
 Please wait while gathering statistics...
 Done. Suggested idling PC:
   0x80340d80 (count=27)
   0x80623c00 (count=31)
[COLOR="Red"]*  0x8061de94 (count=29)[/COLOR]
   0x8061dea8 (count=41)
   0x8061e078 (count=39)
   0x8061e3c0 (count=47)
[COLOR="Red"]*  0x8061e3e8 (count=25)[/COLOR]
   0x8061e3ec (count=46)
   0x8061e414 (count=40)
   0x8061e43c (count=48)
 Restart the emulator with "--idle-pc=0x80340d80" (for example)

Hit the number that correlates with that hex value and watch your CPU usage drop. What you have done was tell the hypervisor to free up CPU cycles that it had reserved because the router is not doing anything. Without this, you could probably only load up around 3 routers. THIS IS EXTREMELY IMPORTANT, DO NOT SKIP THIS STEP! Next, copy that value.. thats your idlepc value for THAT specific IOS image for YOUR computer. I like to manually add my idlepc values to EACH one of my net files and not the IOS image... to do this simply add this line under your IOS definition in the net file "idlepc = 0xab1830202". Other people prefer to add it to the IOS image itself, but do not recommend it.

GhostIOS:
The GhostIOS feature is used to conserve physical RAM. By default dynamips will utilize disk space for router DRAM, which you can change if you dont want to constantly be paging, but this is how it works. Dynamips will utilize physical memory for the hypervisor process as well as the IOS image(s) that you load for each virtual router. For memory conservation you can use GhostIOS, which will load one IOS image into a shared memory location for all virtual routers to access. I definitely recommend doing if you are memory constrained and/or wish to load up a large topology of routers. Syntax is very basic, and I generally add it under my router IOS model definition.
Code:
##################################################
#
# Instance 1
#
##################################################

autostart = true
[localhost:7200]

        [[3640]]
                #
                # Specify 3640 IOS image on Windows here:
                #
                # Specify 3640 IOS image on Linux here:
                image = /home/marc/dynagen/images/C3640-JK.BIN
               [B][COLOR="Red"] ghostios = true[/COLOR][/B]
                idlepc = 0x605050e4

Linkage:

http://7200emu.hacki.at/ - Essential to your path with dynamips/dynagen
http://dynagen.org/tutorial.htm

http://www.blindhog.net/tutorials/dynagen-linux-install.htm - Excellent New video tutorial by blindhog.


PS. apologies for the grammatical and spelling errors. I should be studying but am taking some time to do this.

Thanks,
Xphile
 
Last edited:
> Grabs popcorn and starts reading. I have been playing with both for some time, but was rather lost. Thanks!
 
Reported...for sticky. Nice job xphil3, and thanks for all your help.
 
Very nice post XPhil3. I will point a lot of people to this. It would be nice over at techexams, too. You are definitely an asset to the Cisco cert community, man. You've helped me out in the past, and just gone above and beyond again and again. Thank you.

I also would like to see this a sticky. It answers a lot of common and FAQ's. Great work!
 
Yes, good info. However....

Q: Can this really take me through my training?

A: Yes, this will take you from CCNA through CCIE from a router standpoint. You can also do many of the other certifications as well, including many voice certifications. Yes, dynamips can run CME :)

Show me one person that went from a total n00b to CCIE with dynamips and no real experience. You might be a bit zealous in your accolades. ;)
 
Yes, good info. However....



Show me one person that went from a total n00b to CCIE with dynamips and no real experience. You might be a bit zealous in your accolades. ;)
You would be surprised. Ive heard stories upon stories. I personally know two people that have went from college graduates with only minor switching experience(how to carve out vlans) to full fledged CCIE's. Its not uncommon at all.

Anyways, lets not get off-topic here. :)

Thanks for the kind words guys, trying to help here.
 
nice guide xphil3, I've been using all hardware, but the heat and noise does get annoying. I'll have to give this a go.
Anyone have much experience running Dynamips in a VM on ESX? does it play well with virtual network adapters? I know you can run a switch as a virtual appliance in VMware, would a person be able to use dynamips to run router IOS images and run a cisco switch as a virtual appliance?
 
Next, copy that value.. thats your idlepc value for THAT specific IOS image for YOUR computer.

Are you sure about this part? From my understanding, the idlepc is the hex code for the idle function in IOS; they are specific to the exact IOS image, but I thought they should apply between different computers.
 
nice guide xphil3, I've been using all hardware, but the heat and noise does get annoying. I'll have to give this a go.
Anyone have much experience running Dynamips in a VM on ESX? does it play well with virtual network adapters? I know you can run a switch as a virtual appliance in VMware, would a person be able to use dynamips to run router IOS images and run a cisco switch as a virtual appliance?

I have run it in VMware workstation with pretty good success, though it took me about 30 tries to get a good idlepc value.
 
Are you sure about this part? From my understanding, the idlepc is the hex code for the idle function in IOS; they are specific to the exact IOS image, but I thought they should apply between different computers.
From my personal experience, these values did not export well for me but they are considered specific to the image only. I like to ensure proper performance, thats why I do it every time for a specific computer.
 
this is a great thread, i was very sceptical about using gns3 at first since i really craved some proper hands on experience with kit after finishing up the academy route and passing my ccna a couple of weeks back. however, i've been having a proper go with it, even linking it in with my vmware hacklab, and i have to say - i'm very impressed with what it can do, particularly as i have it emulating some pix firewalls as well as routers. would be quite good to share some lab topologies and lab 'challenges'...?
 
this is a great thread, i was very sceptical about using gns3 at first since i really craved some proper hands on experience with kit after finishing up the academy route and passing my ccna a couple of weeks back. however, i've been having a proper go with it, even linking it in with my vmware hacklab, and i have to say - i'm very impressed with what it can do, particularly as i have it emulating some pix firewalls as well as routers. would be quite good to share some lab topologies and lab 'challenges'...?

I think this is a need in the network forum, but please not this thread. If all of you like this thread please recommend it to be sticke'd. Also, if a mod reads this and decides to sticky this perhaps remove everyones conversations to keep the thread useful.

Thanks

EDIT: Also, Ive seen a few people say that GNS3 does PIX emulation.... its actually dynagen that does the pix emulation, its called PEMU.
 
+1 for a sticky of this thread.

i purely went down the route of gns3 under windows for the 'plug-and-play' aspect to try it out quickly. now that i'm hooked and that i've also dipped my toe in the linux pool in the past couple of weeks, ideally i would like to try and get the 'core' components up and running there instead. i will definately be using this thread as a route to that goal. thanks again! :)
 
bump and +1 for sticky.

I've been using GNS3. It is a resource hog, so run it on a beefy system if you can. My work provided laptop comes to a screeching halt with ~6 devices. (P8400 2.2ghz, 2gb ram, 250gb hdd)
 
Great topic XPhil3!!!

In your setup do you use all of the supported models or just a specific one?



I used GNS alot because of the simplicity and the PEMU out of the box.
 
I'm confused on the section about switching in dynamips. i get an ios image for a 3640 router and tell dynamips it has multiple NM-16ESW cards? Is that it? Would it have all the functionality of a switch (outside of multi-layer features?) I wouldn't have any issues configuring vlan, stp, etc?

Thanks
 
I'm confused on the section about switching in dynamips. i get an ios image for a 3640 router and tell dynamips it has multiple NM-16ESW cards? Is that it? Would it have all the functionality of a switch (outside of multi-layer features?) I wouldn't have any issues configuring vlan, stp, etc?

Thanks
Q: Can dynamips emulate switches?
A: Yes and no, again. Dynamips can emulate very limited switching features. You can build a 3640(or something that supports the NM-16ESW. This card will allow you to connect multiple routers together. Anything that is unsupported on the 16ESW will also be unsupported on the virtualized version. Dynamips cannot emulate any Layer 3 switching, so you will still need your 3550/3560's

Any switching features that are lost on the NM-16ESW will also be lost when virtualizing it in dynamips. What you would do is tell dynagen, in your net file, that this router has multiple switching cards. Then dynagen builds out those cards in dynamips.
http://www.cisco.com/en/US/prod/col...ecd802a9470_ps5854_Products_Q_and_A_Item.html
 
I'm trying to the etherswitch sample lab but not sure how to connect to the switch. when i do a list in the dynagen server it list n/a for the port to connect to SW1 (shows 2000-2002 for r1-3).

Also is there a way to change the port dynmips uses to connect to the console? I want to access this from work, but my isp seems to be blocking ports 2000-2001 for some reason.

Thanks
 
Are we integrating DNS3 into this thread because I just tried it out there and I have to say that it is imensely good stuff. I though it was going to be a major resource hog but I had 4 routers going and it wasn't that bad.

I've had a look through the first coupld of videos on blindhog.net regarding it but I'm going to try out the rest of them. They have some videos on BGP over IPSEC and GRE for those that are interested. I know that there is an ongoing project relating to it.
 
Are we integrating DNS3 into this thread because I just tried it out there and I have to say that it is imensely good stuff. I though it was going to be a major resource hog but I had 4 routers going and it wasn't that bad.

I've had a look through the first coupld of videos on blindhog.net regarding it but I'm going to try out the rest of them. They have some videos on BGP over IPSEC and GRE for those that are interested. I know that there is an ongoing project relating to it.

GNS3?
 
I'll be interested to look into the possibility of getting GNS3 working with the PeerIX Project. I'll be picking up my 3725 tomorrow (had it shipped to the parents... don't want that package sitting on the doorstep in my 'hood) but I'm still interested in VM options to peering.
 
Can you do this with any combination of 2950's and 3550's? any model?

3560's tend to get expensive...
 
Can you do this with any combination of 2950's and 3550's? any model?
Unfortunately no, the issue is how the hypervisor is designed. It was designed to emulate a network processor for the solid state platform routers and as we all know, switches dont utilize(well, they shouldn't atleast :eek:) utilize their NP's for switching frames. Building a hypervisor to emulate ASICS is almost impossible but its been done before, just not likely going to happen with dynamips :(
 
I had an additional couple of questions that were either not addressed or not fully answered.

1) Can this be used for CCIE voice preparation? Obviously supplemental equipment would be needed, but from what I was reading it may work for the backbone.

2) How does this work with non-Ethernet interfaces on the router? Do they just map it directly or are other processes needed.

3) What about sub interfaces? Will that software be able to make them work with my regular ethernet ports?

Edit: The newest lab track V3.0 (starting oct 18) specifies 3825s, but your list only goes up to 3745. Will this program still work?
 
Last edited:
well i can only coment on the fist one:

I belive it can be. I've seen some people state that they used Dynamips and VMWare to train for the CCVP and CCIE voice altough i do not know if it is true. I do know that Cisco has (or had) a page explaning how to set up a call manager in VMWare for practice
 
I had an additional couple of questions that were either not addressed or not fully answered.

1) Can this be used for CCIE voice preparation? Obviously supplemental equipment would be needed, but from what I was reading it may work for the backbone.

2) How does this work with non-Ethernet interfaces on the router? Do they just map it directly or are other processes needed.

3) What about sub interfaces? Will that software be able to make them work with my regular ethernet ports?

Edit: The newest lab track V3.0 (starting oct 18) specifies 3825s, but your list only goes up to 3745. Will this program still work?

1. People have used Dynamips heavily for Voice stuff. You may not be able to rely on it entirely, but you can supposedly do a lot. Google around for examples.

2. I don't know what you mean. Inside Mips you specify which interfaces are connected to which devices, so R1 could have s1/0 connected to S1/1 on R2. As for connecting physical non-internet interfaces from to virtual devices in Mips, I don't know how you could do that, nor do I know why you would want to. The main use for physical hardware connecting to virtual routers is so you can use switches with Mips, these switches use ethernet.

3. Sub interfaces should work, your NICs will have to support trunking.

The new CCIE is v4, not v3. As of right now, the routers/IOS/features supported in Mips are sufficient for the CCIE. Even with IOS 15 we shouldn't have a problem as the 7200 can run it.

Are you studying for the CCIE? If not, I wouldn't worry too much about it as things change somewhat frequently.
 
Oh yeah, I misunderstood the purpose of all those ethernet ports, now that I see what you mean my question seems illogical.

I am finishing both my CCNP and my CVOICE and am weighing my options for continued studies. I will either go for the CCIE R&S or the CCVP and possibly eventually CCIE voice. Since I'm moving soon and going to a new school, I won't have access to the equipment I've used so far. My hope is that I can use studying for these advanced certs to keep fresh on networking while I finish up my bachelor's.

Oh, and that version thing was a typo. :(
 
Just to clarify Vito's responses:

1. Dynagen will only allow you to study for router-centric configurations for the CCIE Voice, but obviously wont help at all with the UCM portion. As KainPT stated, most people use vmware for this. Everything has and still will integrate with the new blueprint.

2. If you're talking about ATM/FR/Back to Back serial then its all configured via the network map file, see my examples. Obviously for ATM and Frame-relay you're will need respective switching methods to accomplish L1 connectivity and L2 forwarding.

3. Sub-interfaces DO work, and again, your NIC must support tagging so it can pass post-tagged frames.

The CCIE R&S will be on the v4 blueprint in 2 days, but Rendon, you're correct about the 3.0 blueprint for the CCIE voice... so no typo :D. The changes can be viewed on the learning network, but the big change was obviously the migration from UCM 4.x to 7.x
 
Xphil3, question for you regarding the hardware recommendations for a Dynamips lab. If the lab were to be built using ESXi as a hypervisor, could no not technically get away with using only 4 or possibly even 1 NIC? The reason why I ask is that I just started gathering the necessary hardware for this and discovered tonight that ESXi 4.0 doesn't support 10/100 NIC cards anymore (I managed to find a Intel 10/100 quad port for roughly $30 off ebay). The only choice is then to either go PCI-X or PCI-E both of which are very expensive alternatives.

Any suggestions?
 
I'm still a little confused on how to connect to the switch and do configs. can anyone help?

nvm, looks like i found what to do
 
Last edited:
Is it possible to run this program over a network? For example, can I have my linux server do all the processing on this application and just connect to it with a client from my laptop because my laptop isn't really able to handle multiple routers, it seems. I assume this is possible because it looks like the server daemon and the client are different things but I'm not sure.
 
Yea, it's possible. That's how most of us use it. You point Dynagen or GNS3 to your server, which acts as the hypervisor.
 
A few things...

Q: Does cisco support this as a training tool.
A: Yes and No. Officially, absolutely not but unofficially.... Ive had to talk about this tool to over 100 Cisco employees already.

So, they Absolutely support it Officially, but they do not Unofficially support it? o_O shouldn't that be the other way around?

Note: Extracting your images will greatly increase the time in which it takes your router to load. I always recommend doing this.

I think you mean decrease the time, why would you recommend something that would "increase the time needed"..

Otherwise.. good read :D
 
Yea, it's possible. That's how most of us use it. You point Dynagen or GNS3 to your server, which acts as the hypervisor.

I've done some googling but I'm still a little confused on how to set this up. What do I need on my client machine? Just GNS3? I went into my IOS images tab and set my IOS image to "10.20.30.103:/home/ffff/c3640/c3640.bin" and I put in my external hypervisor as the 10.20.30.103 with a working dir of /tmp. Do I need to install dynamips on my client? Right now the executable path is set to "C:\Program Files\GNS3\Dynamips\dynamips-wxp.exe" and that doesn't exist because I didn't install it. This may be obvious but do I need to install it or can I map that executable to my remote server?

edit: nevermind, I got it. Very cool!
 
Last edited:
Back
Top