Sunday, July 19, 2009

Install Dynagen/Dynamips in Linux

Dynagen has been known for the best emulator for Cisco Devices. It uses dynamips for the server. We can practice the configuration using dynamips for Cisco router, switch, etc, just like we configure the real Cisco devices.
I used Ubuntu 9.04 Jaunty for the operating system. You can use other Linux distro that you like.

  • dynagen version 0.9.2 (you can check for the newest version in
  • dynamips version 0.27 (you can check for the newest version in
  • Cisco IOS image C7200 (you can google for it)

1. Open terminal and log in as a root. Make a new folder/directory and move those files which you had downloaded to this folder (dynagen, dynamips, and image).

$ mkdir /opt/dynamips
$ cp / /opt/dynamips

2. Extract dynagen file to folder dynamips

$ tar zxvf dynagen-0.9.2.tar.gz

3. Change the permission for dynamips

$ chmod 755 /opt/dynamips/dynamips-0.2.7-RC3-x86.bin

4. Make link in sbin folder so we can execute dynagen and dynamips for the console window

$ ln -s /opt/dynamips/dynamips-0.2.7-RC3-x86.bin /usr/sbin/dynamips
$ ln -s /opt/dynamips/dynagen-0.9.2/dynagen /usr/sbin/dynagen

5. Make a lab config and put the image location file into it. For example, I use example lab that come with dynagen

$ nano /opt/dynamips/dynagen-0.9.2/sample_labs/simple1/

Match the image with the one you'd downloaded

#image = \Program Files\Dynamips\images\c7200-jk9o3s-mz.124-7a.image
# On Linux / Unix use forward slashes:
image = /opt/dynamips/c7200-xxx.bin

6. Run dynamips first

$ dynamips -H 7200 &

There should be a display like this:

Cisco Router Simulation Platform (version 0.2.7-RC2-x86)
Copyright (c) 2005-2007 Christophe Fillot.
Build date: Apr 27 2007 14:59:57

7. Open new console window, and run dynagen with the example lab before

$ dynagen /opt/dynamips/dynagen-0.9.2/sample_labs/simple1/

If it is successful, there should be prompt sign: =>

8. Now, telnet the router or you can use putty (with IP address, assigned port in dynagen, and telnet protocol)

=> telnet R1

Now you can do some configuration to your router.

  1. some configurations might not work with dynagen.
  2. Find your idle PC in each router to lower your PC performance
  3. Don't start all your router simultaneously. Start them one by one