Dynamips/GNS3, .net files, and Cisco networking labs.
User avatar
Vito_Corleone
Moderator
Posts:
9850
Joined:
Mon Apr 07, 2008 10:38 am
Certs:
CCNP RS, CCNP DC, CCDP, CCIP

Dynamips/Dynagen/GNS3 FAQ

Mon Feb 08, 2010 11:55 am

Marc (xphile on here) wrote up a nice Dynamips FAQ on [H], he said it was cool for me to repost it over here.


You've all heard it before, whether 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 I've 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 Vito and it will be fixed.

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" tutorial.

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 virtualized. 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 it's 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 question 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". I'm 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: Select all
 [[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!:

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, remove the .bin extension of that file.
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 aspects of the net file:

Code: Select all
# 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 = \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.... 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 not desired (I dont like mine starting all at once) insert this "autostart = false" to the top of EACH one of your net files.

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. 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.. that's 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.

Note: I'm sorry I didn't go over ghostIOS and some of the other features, please see the dynagen tutorial to read about them (I use ghostIOS btw, great little feature). I really don't have so much time these days again.

Linkage:

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

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

Thanks,
Xphile
http://blog.alwaysthenetwork.com

User avatar
expaddy
Post Whore
Posts:
1598
Joined:
Wed Jun 17, 2009 11:28 am
Certs:
BSc computer network administration, CCNP, MCSE

Re: Dynamips/Dynagen/GNS3 FAQ

Mon Feb 08, 2010 1:10 pm

A great read Vito, (hats of to ya).

But, I do like the ease of GNS3 and I find that it runs fine, (with a little nudging at times).



Note: Extracting your images will greatly increase the time in which it takes your router to load. I always recommend doing this.
Do you not mean decrease??
Last edited by expaddy on Mon Feb 08, 2010 1:14 pm, edited 1 time in total.
Good Luck,

David

User avatar
dlots
Post Whore
Posts:
3540
Joined:
Mon Jun 15, 2009 9:48 am
Certs:
CC\NP\DP\IP\NP-Security\NA-Voice

Re: Dynamips/Dynagen/GNS3 FAQ

Mon Feb 08, 2010 1:13 pm

TY :-D
Freedom to all the people. Brave, true and strong.
Freedom to all the people. Unless I think you're wrong

dhimes.com

User avatar
Vito_Corleone
Moderator
Posts:
9850
Joined:
Mon Apr 07, 2008 10:38 am
Certs:
CCNP RS, CCNP DC, CCDP, CCIP

Re: Dynamips/Dynagen/GNS3 FAQ

Mon Feb 08, 2010 1:14 pm

expaddy wrote:A great read Vito, (hats of to ya).

But, I do like the ease of GNS3 and I find that it runs fine, (with a little nudging at times).


Thanks, but I didn't write it, it's all Marc's.

(I did fix some of his terrible grammar and typos though, lol)
http://blog.alwaysthenetwork.com

User avatar
expaddy
Post Whore
Posts:
1598
Joined:
Wed Jun 17, 2009 11:28 am
Certs:
BSc computer network administration, CCNP, MCSE

Re: Dynamips/Dynagen/GNS3 FAQ

Mon Feb 08, 2010 1:20 pm

Sorry, Marc?
Good Luck,

David

User avatar
Vito_Corleone
Moderator
Posts:
9850
Joined:
Mon Apr 07, 2008 10:38 am
Certs:
CCNP RS, CCNP DC, CCDP, CCIP

Re: Dynamips/Dynagen/GNS3 FAQ

Mon Feb 08, 2010 1:22 pm

expaddy wrote:Sorry, Marc?


He's xphile on here. He doesn't post a ton, but he's big on hard forum.
http://blog.alwaysthenetwork.com

User avatar
mellowd
CCIE #38070
Posts:
13814
Joined:
Wed Jun 18, 2008 7:49 am
Certs:
CCIE (RS,SP), JNCIE-SP, BC-/SPNE/NP

Re: Dynamips/Dynagen/GNS3 FAQ

Mon Feb 08, 2010 1:29 pm

expaddy wrote:
Note: Extracting your images will greatly increase the time in which it takes your router to load. I always recommend doing this.
Do you not mean decrease??


Yes, seems an error

User avatar
expaddy
Post Whore
Posts:
1598
Joined:
Wed Jun 17, 2009 11:28 am
Certs:
BSc computer network administration, CCNP, MCSE

Re: Dynamips/Dynagen/GNS3 FAQ

Mon Feb 08, 2010 1:29 pm

ahhhhhhhhhhhh!
Good Luck,

David

User avatar
Vito_Corleone
Moderator
Posts:
9850
Joined:
Mon Apr 07, 2008 10:38 am
Certs:
CCNP RS, CCNP DC, CCDP, CCIP

Re: Dynamips/Dynagen/GNS3 FAQ

Mon Feb 08, 2010 1:35 pm

Fixed. Thanks guys.
http://blog.alwaysthenetwork.com

User avatar
launchpad
Senior Member
Posts:
399
Joined:
Tue Sep 28, 2010 9:52 pm
Certs:
MCSA/MCSE/MCITP/CCNA/IIUWNE

Re: Dynamips/Dynagen/GNS3 FAQ

Thu Dec 02, 2010 12:20 pm

How exactly do you add CME?

User avatar
Vito_Corleone
Moderator
Posts:
9850
Joined:
Mon Apr 07, 2008 10:38 am
Certs:
CCNP RS, CCNP DC, CCDP, CCIP

Re: Dynamips/Dynagen/GNS3 FAQ

Thu Dec 02, 2010 12:22 pm

http://blog.alwaysthenetwork.com

nickbeee
Member
Posts:
100
Joined:
Tue Nov 24, 2009 2:14 pm
Certs:
640-[802,553]

Re: Dynamips/Dynagen/GNS3 FAQ

Mon Feb 21, 2011 10:18 am

I discovered you can get a lot of useful info just by running Dynamips -P [7200, 3600, 2691, 3725, 3745, 2600, 1700] from the shell/command prompt. I've grabbed the output from the OSX version, maybe it varies with Linux or Win32? It tells me that the 2621XM support is broken which might explain a few crashes and idle-pc issues...

Feel free to add this to the FAQ if you feel it is useful. I've put this online in Google Docs at
http://preview.tinyurl.com/dynamipscmd. I think there are some useful options in here that are not mentioned in all_config_options.txt
Nick B.

siti
New Member
Posts:
1
Joined:
Tue Mar 15, 2011 10:54 pm
Certs:
degree

Re: Dynamips/Dynagen/GNS3 FAQ

Tue Mar 15, 2011 11:01 pm

Hi..

I'm so new in network field but I've been required to setup a dynamips/dynagen from my supervisor. So, is there anyone that can help me solve my prob?..I've tried searching many websites and study on dynamip tutorial but, it is still cannot help me. Thus, I hope someone can help me to understand this dynamip from the beginning and how I can setup the emulator. For your information, my sv asked me to use cisco 3475 not 7200 like in tutorial.

User avatar
mellowd
CCIE #38070
Posts:
13814
Joined:
Wed Jun 18, 2008 7:49 am
Certs:
CCIE (RS,SP), JNCIE-SP, BC-/SPNE/NP

Re: Dynamips/Dynagen/GNS3 FAQ

Wed Mar 16, 2011 3:32 am

siti wrote:Hi..

I'm so new in network field but I've been required to setup a dynamips/dynagen from my supervisor. So, is there anyone that can help me solve my prob?..I've tried searching many websites and study on dynamip tutorial but, it is still cannot help me. Thus, I hope someone can help me to understand this dynamip from the beginning and how I can setup the emulator. For your information, my sv asked me to use cisco 3475 not 7200 like in tutorial.


http://dynagen.org/tutorial.htm
http://www.ine.com/resources/iosonpc.htm

mananaja
New Member
Posts:
8
Joined:
Fri Aug 14, 2015 2:01 am

Re: Dynamips/Dynagen/GNS3 FAQ

Sat Aug 15, 2015 2:57 am

Please, if you would like me to add anything or if I left out something PM Vito and it will be fixed.
จีคลับ

mananaja
New Member
Posts:
8
Joined:
Fri Aug 14, 2015 2:01 am

Re: Dynamips/Dynagen/GNS3 FAQ

Sat Aug 15, 2015 2:58 am

Please, if you would like me to add anything or if I left out something PM Vito and it will be fixed.

adseo2016
New Member
Posts:
1
Joined:
Fri Jan 15, 2016 3:03 am

Re: Dynamips/Dynagen/GNS3 FAQ

Fri Jan 15, 2016 3:05 am

How exactly do you add CME?
gclub

mariareese
New Member
Posts:
1
Joined:
Fri Jan 22, 2016 6:57 am

Re: Dynamips/Dynagen/GNS3 FAQ

Fri Jan 22, 2016 7:03 am

Getting full info here, thanku sir .. :D


Return to Dynamips/GNS3 and Labs

Who is online

Users browsing this forum: No registered users and 10 guests