Install-dyna
How to install Dynamips/Dynagen
Note: tested over Ubuntu 7.04 (Feisty fawn)
Dynamips/Dynagen Installation
Download and install dynamips (CISCO emulator) from http://www.ipflow.utc.fr/blog/. For example, for x86 platfoms:
wget http://www.ipflow.utc.fr/dynamips/dynamips-0.2.8-RC2-x86.bin chmod +x dynamips-0.2.8-RC2-x86.bin mv dynamips-0.2.8-RC2-x86.bin /usr/local/bin ln -s /usr/local/bin/dynamips-0.2.8-RC2-x86.bin /usr/local/bin/dynamips
Download and install dynagen (the network configuration generator for Dynamips) from http://dynagen.org/. For example:
wget http://ovh.dl.sourceforge.net/sourceforge/dyna-gen/dynagen-0.10.1.tar.gz tar xfvz dynagen-0.10.1.tar.gz mv dynagen-0.10.1 /usr/local/ ln -s /usr/local/dynagen-0.10.1/dynagen /usr/local/bin/
Get a cisco iso image for a router supported by dynamips and copy it to a directory, for example, to vnuml filesystems directory:
cd /usr/share/vnuml/filesystems wget ..../c3640-ik9o3s-mz.124-13a.bin
Unzip the image to accelerate start up:
unzip -p c3640-ik9o3s-mz.124-13a.bin > c3640-ik9o3s-mz.124-13a.image
And create a simple link for the cisco image:
ln -s c3640-ik9o3s-mz.124-13a.image c3640
Testing Dynamips/dynagen installation
Start dynamips daemon:
dynamips -H 7200&
Create a simple escenario, for example, copy the following on to a file named test.net:
[localhost] [[3640]] image = /usr/share/vnuml/filesystems/c3640 ram = 96 [[ROUTER R1]] model = 3640
Start the scenario with:
dynagen simple1.net
Open the router console and wait till the router has started completely:
console R1
Once started, you have to calculate the best Idle-PC values for your computer, to avoid dynamips consuming all the CPU (if you have a look at your CPU, you will probably see it is 100% occupied).
To estimate the optimum idle pc value for your case, execute:
idlepc get R1
and choose one of the values marked with an "*". If you see that the CPU usage is not reduced considerably, then execute:
idlepc show R1
and chose the next value marked with "*".
Repeat the procedure till you find a good value. Then save it with:
idlepc save R1
The value is copied to the "test.net" file (a line similar to "idlepc = 0x605d32a4"). Remember to add that line to all your routers in your scenarios.
References
- Dynamips: http://www.ipflow.utc.fr/index.php/Cisco_7200_Simulator
- Dynagen: http://dyna-gen.sourceforge.net/
- Hacki's Forum: http://7200emu.hacki.at/
- Using Dynamips for CCIE Lab Preparation (How To Run Cisco IOS On Your PC). http://www.internetworkexpert.com/resources/iosonpc.htm
- [SOLVED] bridging interfaces - strange behaviour. http://7200emu.hacki.at/viewtopic.php?t=6