Friday, September 01, 2006

Become a CCIE with Simulator

Update: use GNS3. It even provides one installation file that contains all the packages (dynamips, dynagen, winpcap etc). Please RTFM.

Several months ago I wrote 'How to Become a CCIE', a step-by-step for wanna-be-CCIE out there based on my own experience passing two lab exams. In point no. 3 I mentioned that it's compulsory to have a home lab to be able to practice anytime.

How if we can save some money by not buying the equipment but using simulator instead? Thanks to Christophe Fillot, the author of Dynamips - Cisco 7200 Simulator, now it's possible to have a full CCIE lab in our PC.

The idea of this simulator is to emulate Cisco 7200 environment with MIPS processor in normal PC, so we can boot the genuine IOS for Cisco 7200 with 12.2 and 12.4 version. It can simulate various type of network modules such as PA-4T or PA-TE-FX to provide enough serial and ethernet interfaces. The simulator offers virtual ATM, FR and ethernet switch too. If we can simulate 8-9 routers, with ATM, FR and ethernet switch, and put proper interconnection between those routers..voila! we have a complete CCIE lab!

Actually this simulator has been around for quite some time. But when the first time I used this simulator, I faced so many minor issues that almost made me stop thinking about the idea to simulate CCIE lab. Before I found Dynagen, the front end interface for Dynamips, I had to map the port manually between interface in one router to another interface in another router to provide interconnectivity between them. That's because each interface in this virtual router consumes 1 UDP port. So if we want to connect one router to another router with serial connection, we need to map udp port that represents the serial interface in the first router, to the udp port that represents the serial interface in the second router.

The beauty of this is: we can connect virtual routers in one PC to another virtual routers in diferent PC through normal TCP/IP connection.
But if you have to do the mapping manually for let's say 8-9 routers..hmm, it's better to do something else with our life.

So I like to share the step-by-step how to setup CCIE lab in the PC quickly, so you can join me and all my friends who already started pursuing CCIE in this new and cheap way :)

1. You need a good PC for this simulator.
I bought a new PC for this purpose. It's a Shuttle XPC SD36G5 with Intel Dual Core 3.2 GHz and 2 GB DDR memory. Small but powerful.

With Windows OS I can simulate up to 11 routers. With Linux OS in the same machine I can simulate more than 15 routers. I read it somewhere that it's because the limitation in Windows for one process, such as this Dynamips, can take only up to 2 GB memory. While in Linux the limit for one process is 3 GB. So if one virtual router uses 128 MB, multiple this number by number of routers plus additional memory usage by the process, it makes sense to have the process crashed when the number of routers reaches more than 10.

But fear not, there are so many ways to resolve this problem. Use Linux is one solution. Or just run Dynamips in two different processes.
Surely you don't have to compete with my PC. Any decent PC with lots of memory should be enough.

2. You need Cisco IOS for 7200 routers.
Don't ask me, please. I am not allowed to distribute any IOS image.
Just get it from your close friend who works in Cisco partner and can download this IOS for you.
Since IOS comes as compressed binary, we need to unzip it first and keep the .bin extension:
$unzip -p c7200-js-mz.122-25.S9.bin > image.bin

I use the enterprise feature with 12.2.29S version.

3. Download Dynagen and Dynamips.
If you want to use Windows, Dynagen in SourceForge has already provided a package with Dynamips included and all the scripts to make our life easier.

4. Find the idle-pc value to avoid 100% CPU utilization.
Without idle-pc feature, even 1 single virtual router can shoot our PC CPU to 100%. To find the idle-pc value is simple:
- run one router with Dynamips (not Dynagen)
use the same IOS, NPE and memory that you want to use for your lab. For example, I choose NPE-400 and 96 MB ram for each virtual router:
$./dynamips -t npe-400 -r 96 image.bin

- wait until the router completes the booting process and give you the prompt
- go the enable mode and save the configuration with write memory
- press “Ctrl-] + i” sequence key, and it should give you similar output like below after few seconds:
Please wait while gathering statistics...
Done. Suggested idling PC:
0x60693f8c
0x60693fec
0x60694000
0xffffffff80755900
Restart the emulator with "--idle-pc=0x60693f8c" (for example)


- exit the simulator, you can do this by reloading the router
- run dynamips again with -idle-pc option with one of the value that you got from previous step:
$./dynamips -t npe-400 -r 96 -idle-pc=0x60693f8c image.bin

- monitor your PC CPU utilization, if it's still low than you are set to continue. If you still get 100% CPU utilization, try different value for the idle-pc option.

5. Run Dynamips in Hipervisor mode
We need to tell Dynamips to run in hipervisor mode which is basically waiting for connection in TCP port 7200 (default) for next instruction from Dynagen.
In Windows, there is a script called 'dynamips-start.cmd' to do this.
$./dynamips.exe -H 7200

Cisco 7200 Simulation Platform (version 0.2.5-RC2-x86)
Copyright (c) 2005,2006 Christophe Fillot.

Hypervisor TCP control server started.
Shutdown in progress...
Shutdown completed.


6. Create the Dynagen config file
Dynagen is awesome. The configuration is a text file that very easy to understand. It comes with sample labs and a text file, all_config_options, that explains all available options.
To practice IE Mentor and IP Expert CCIE Service Provider workbook, this is how I built my dynagen config file:

#I want to boot my routers manually
autostart = false

#I have the Dynamips in the same PC I run this Dynagen
[localhost]

#This is where I specify the location of IOS and options for NPE, RAM and idle-pc value
image = /home/himawan/IOS/c7200-js-mz.122-25.S9.bin
npe = npe-400
ram = 96
idlepc = 0xffffffff8075374c

#Each router's name and connectivity information, only showing some of them here
[[router CE1]]
f0/0 = CoreSW 1

[[router CE2]]
f0/0 = CoreSW 2

[[router PE1]]
f0/0 = CoreSW 10
f1/0 = CoreSW 11
a3/0 = A1 1
s2/0 = ASBR1 s1/2

[[router ASBR1]]
f0/0 = CoreSW 15
s1/0 = ASBR2 s1/0
s1/1 = ASBR2 s1/1

[[router ASBR2]]
f0/0 = CoreSW 16

#section for virtual ATM and ethernet switch, only showing few ports here
[[ETHSW CoreSW]]
1 = access 13
2 = access 23
3 = dot1q 1

[[ATMSW A1]]
1:1:100 = 2:1:100


As you can see the configuration file of Dynagen is very easy and straight forward. We can build as many routers as we want and put the interconnectivity information under each router. The good thing about Dynagen, we don't even need to specify which network module want to load, it will figure it out automatically.
For example, when I ASBR1 s1/0 is connected ASBR2 s1/0 interface, Dynagen will load PA-8T modules to those routers when I boot them. And one more thing, since I have specified it under ASBR1, under ASBR2 I don't need to specify that s1/0 needs to connect to ASBR1, Dynagen will take care of it automatically.

Under the virtual switch, we can assign either VLAN or dot1q trunk to the port. And for ATM switch, we can assign the value for VPI/VCI easily. Awesome, eh?

7. Execute Dynagen
Once you finish with the configuration, just make this file as executable in Linux or run Dynagen to use this configuration file:
C:\Program Files\Dynamips>dynagen.exe iementor.net

Reading configuration file...
Network successfully started

Dynamips management console
=> list
Name Type State Server Console
CE1 c7200 stopped localhost 2000
CE2 c7200 stopped localhost 2001
CE3 c7200 stopped localhost 2002


8. Start the routers, offcourse, and start playing with it!
=> start CE1
100-C7200 'CE1' started


If you don't put the Dynamips process in the background, you should see something like this:
CPU0: carved JIT exec zone of 16 Mb into 512 pages of 32 Kb.
C7200 instance 'CE1' (id 0):
VM Status : 0
RAM size : 96 Mb
IOMEM size : 0 Mb
NVRAM size : 128 Kb
NPE model : npe-400
Midplane : vxr
IOS image : c7200-js-mz.122-25.S9.bin

Loading ELF file 'c7200-js-mz.122-25.S9.bin'...
ELF entry point: 0x80008000

C7200 'CE1': starting simulation (CPU0 PC=0xffffffffbfc00000), JIT enabled.


You can even see the booting process if you want, by connecting to the console port which is starting from TCP port 2000 by default:
=> telnet CE1
or
telnet 127.0.0.1 2000

Now you have your lab ready, what are you waiting for?

Two more additional steps:
9. Googling or RTFM when you have problems
Read Chris's blog, check the FAQ, read the Dynagen tutorial, googling.. don't be lazy!

10. Simulating remote lab
I have a good PC at home but I have already got used to my IBM Thinkpad keyboard to practice CCIE lab. So what I did to simulate remote lab is:
- start Dynamips in Hipervisor mode in my home PC
- start Dynagen from my notebook, with modification in the config file, instead of [localhost] I specified [homePC_IP_address]
- once I connect to Dynamips, I start any routers that I like
- create shortcuts in my notebook Windows desktop such as CE1, CE2, ASBR1, R1, R2 and so on which is basically telneting to my home PC in respectable TCP ports
CE1.cmd file: start "CE1" telnet 127.0.0.1 2000
CE2.cmd file: start "CE2" telnet 127.0.0.1 2001
and so on

Now I just need to click CE1 shortcut to connect to CE1, CE2 to connect to CE2 and so on. It gives me the same feeling like when I had my CCIE lab in Brussels.


One thing to remember: this simulator can only simulate routers with ATM, frame-relay and virtual switch. It means if you are planning to go to CCIE lab other than R&S and Service Provider, you still need to buy some equipments such as Firewall for Security track or router with E1 interface for Voice track.
And also if you have less experience with Cisco IOS behaviour, when you face some issues in your lab you may not be able to distinguish the cause of the problem whether it's because of wrong configuration or Dynamips bugs or IOS bugs or lack of faith.

I may still require to rent a rack for some equipment that can't be simulated just like Cisco 3550. But the amount of time required in renting should be reduced significantly with this simulator.
So practice with simulator at home, and rent a rack several days before the exam.
It sounds like a good plan.

My only challenge now is that my PC is so powerful for gaming, especially after I added NVidia GeForce 6800XT 512Mb PCI Express graphic card. I can play The Battle for Middle Earth, Star Wars Empire at War, Ghost Recon Advance War Fighter and my most favorit game for whole time: Battle Field 2 with highest quality.

So now my CCIE SP plan has to compete with Snowboarding and Battle Field. What a tough life!

31 comments:

Anonymous said...

On your advice, I too have purchased a Dualcore monster but i've held off on the graphics card until AFTER my CCNP exams ;)
Keep up the good work!

Cheers,
-Prophet-

Anonymous said...

I have installed 7200 on my window xp pro successfully but i don't how how to created scenarior. Example, i dont know how to make 2 or 3 routers link together from this interface to another by using this simulator? I have read your scenarior but still do not understand. Please help me in this issue.
Your assistant will be appreciated.
Warm regards,

( my email address is: gl3nlea@yahoo.com.au)

Anonymous said...

Question: I am trying to figure out my -idlepc value. When I type "Ctrl-] + i", the result of my key strokes takes me to a telnet prompt...telnet>

I do not understand what I am doing wrong. I need to make sure I am reading the keystrokes correctly.. Is it Hold the 'Ctrl' key and press the ] (right bracket key) then the lower case 'i'?

Any help would be appreciated.

My email address is jayhawk-25@kc.rr.com

Himawan Nugroho said...

Hello, if you are interested to see some scenarios you can check the Hacki forum (http://hacki.at/7200emu/index.php)

I'm a bit busy right now so I have to leave my SP behind for a while. I was using the simulator to test some MPLS L3 VPN and it worked fine.

The reason why you get the telnet> prompt is that's because "ctrl-]" is the escape character to quit from telnet client as well.
This problem happens because I believe you are connected to the virtual router by telnetting.
To find the idle-pc, start the dynamips manually, don't use dynagen

c:\>dyanmips.exe -t npe-400 -r 96 image.bin

with this way, you are not telnetting but enter the console directly. So when you press the ctrl-] sequence it won't give you kick you out from the telnet session.

Anonymous said...

You also have some interresting stuff in www.ciscoroute.com -- including a very simple topology to start messing with MPLS :)

Anonymous said...

I am also having trouble getting the idelpc values. I have followed the instructions and whenever i press the keystrokes i am getting a help menu with all different options on it.

Is anyone else getting this problem and can anyone help?

Thanks in advance

Anonymous said...

where did you buy your shuttle from.
any contact nos?
will buy one for meself for this purpose...MF

Anonymous said...

dynamips Cisco 7200|3600 Simulator on USB using SLAX

http://www.qsor.pl/narzedzia_gpl/dynamips_slax/

Anonymous said...

Dude there is no such limitations :)) you have different proccess for single router in
windows yes but this is a peace of shit in linux and freebsd you don't have such problem the limitation that you reach is com e from 32bit architecture (32bit procesors can't address more than 4G RAM hard limit ) of your Intel processor actualy you will have another limit if you have use ghost ram feature ... but this is another story

Anonymous said...

my advice is to buy amd64 X2 that is a real monster :) and use it with real 64bit OS

Anonymous said...

Hi and thanks for your information,
I'm currently preparing for my CCIE R&S lab exam and I'would like to ask you some things about the simulator:
What kind of Linux OS are you using?
I was trying Suse 10.2 but the results were worst than WinXP.
You wrote that you can simulate up to 15 routers using Linux OS.
Is it possible to run a full scenario from a workbook like IEWB using this 15-routers configuration?
Thanks in advance for your help.
Nikos

Anonymous said...

Just wondering after you bring up 10 routers with BGP/ISIS/OSPF/MPLS, what is your CPU usage ? Hard to find idle pc value with those full config on...

Thanks
Anthony

Anonymous said...

Such a marvellous topic..keep it up

Unknown said...

Hi Guys ,

Is there any way I can simulate a switch 3650 on dynagen ,I have tried 7200 and it seeems to working fine ,Does any one know the configuration file to be edited for 3650.

Anonymous said...

Hi!
As far as I am aware to simulate switch You have to use NM-16ESW mods, but there are some issues with them - if You use 2 mods in one chassi - it won't work...

Anonymous said...

Yehp - that's coz the 2 NM-16ESW's in one chassis don't share a common CAM table. You could do some trickery by trunking them and disabling STP but that makes things too complicated. None of the vendor labs I've seen require more that 16 switch ports anyhow!

Muhammad Zeeshan Mazhar said...

Hi

well, i dont have this 2 GB thing
but i have plenty of machines wih following specs.

2 x Intel(R) Pentium(R) 4 CPU 3.00GHz
L2 Cache Size 2048

with 512

Anyone tried dynagen + dynamipis on multiple pcs.
I mean how would it behave when routers are on differnt computers e. 15 router on 7 machine. any sample configurations of any scenario somewhats similar to this.

Unknown said...

Hi Himawan, your site is truly marvelous, based on your guidelines i'm able to build a home lab with core 2 dual 1.86 and 2 gb ram. will soon start my preparation. Thanks a lot .

Srini

Amit Singh said...

Hi,

Has anyone got a sample .net file for running dynamips on two PC's.

I have a windows XP PC and an IBM T43 WinXP laptop. I want to run the routers on my desktop and the switches and backbone routers on my Laptop. Please guide me how can I achieve this.

1. Do I have to run dynamips on both the PC with respective .net file.

2. Do I have to connect my PC's using cross-over cable.

3. Do I have to run Termserver on both the PC's or I can have termserver running on one PC and control the other routers as well.

Please let me know if anyone has got any idea on this. It will be really appreciated. Please send the suggestions on amisin@gmail.com

regards,
Amit Singh

Devender Rawat said...

Hi All,

I am very new to this blog and also just recently has started my preparation for the CCIE R&S, can somebody help me how may I install and work with the dyanmips and also how much configuration I need in my notebook to install and run.

A big thanks in advance to all.

Regards,
Devender Rawat

sammy said...

Hi Everybody,
i m pursuing CCNP-BSCI i.e. Routing Paper, i hav heard that just by completing Routing & Switching Paper, u can look forward to CCIE R&S,as it covers almost 70% of CCIE. Then u just need to practice & master ur troubleshooting skills by renting racks.Is it true ? i will be glad to know ur valuable suggestions.

Thanks in Advance
Sameer Kadu

Anonymous said...

Bro minta reference laptop yg tangguh buat mainkan simulator donk

Thanks.
your Blog is good :)

Anonymous said...

*********




visit http://networkingwithcisco.blogspot.com/ for all the cisco ios files.

http://rapidshare.com/users/IAFGR7


Thanks


Sri





*******

Anonymous said...

will this simulator work using l3 switches? eg 3750, 4948, etc?

Anonymous said...

hi himawan,

may i ask a little bit about BGP?

Store said...

Amazon Cisco Books CCNA , CCNP ,CCIE
http://astore.amazon.com/amazonbooksale-20

ronruel said...

I salute you sir for your achievements.. U

Anonymous said...

"And also if you have less experience with Cisco IOS behaviour, when you face some issues in your lab you may not be able to distinguish the cause of the problem whether it's because of wrong configuration or Dynamips bugs or IOS bugs or lack of faith."

"lack of faith"..thats funny

Sabeer A said...

Thanks for the nice tutorial.Cheers

Anonymous said...

Hello,

congratulations MY FRIEND

i want ask you direct question please

is dynamips and gns3 enough to get ccie r&s

please give solution for that

that was very helpful for me

here there is no sheeeeep rack and there is very difficult to pay that

thanks a lot

Unknown said...

Nice post and really intelligent thought.
I appreciate your post ….
Thanking you
Cisco Training