When experimenting with Cisco routers, it’s very nice to have a (small) lab environment to test things. Unfortunately, Cisco routers tend to be fairly expensive and noisy, especially if you need 5 or more of them. So I was looking for a cheaper and more flexible solution.

Dynamips is a Cisco router emulator which loads an official Cisco IOS-image and runs it on emulated hardware. It started out as an emulation of 7200 routers only, but now supports 3600 and 2600 series as well.

When you want more than a single router, you’ll need dynagen as well. Dynagen connects to a running dynamips instance and does some magic to get the (emulated) ethernet-ports connected to wherever you specify. The network-topology is created using plain text files. While this seems scary at first, the excellent tutorial covers every frequently used scenario.

Both tools are Open Source software and run on Linux and Windows (although it needs cygwin and doesn’t run as stable). The only catch is that you need real Cisco IOS images. The cisco.com site provides downloads only to selected users. Another way to get them is to copy them from a real router.

I usually use 36×0 routers in my experiments. I have three variants defined in my default .net-file:

[[3620]]
     image = /opt/dynamips/c3620-i-m.122-46a.bin
     ram = 32
     idlepc = 0x606f4000
     # ports available: e0/0, e0/1
[[3640]]
    image = /opt/dynamips/c3640-i-m.124-18.bin
    ram = 64
    idlepc = 0x60593578
    # ports available: e0/0, e0/1
[[3660]]
    image = /opt/dynamips/c3660-jk9s-m.124-18.bin
    ram = 128
    idlepc = 0x60559ee0
    # ports available: fa0/0, fa0/1

The 3620 has a fairly old IOS, but is happy to run on 32MB of RAM. This is the router I usually use as endpoint to emulate something pingable. The 3640 uses a recent IOS, requires 64MB of RAM to do its thing and is my main router to play with. For advanced stuff, I use the 3660, which has the advanced features in its IOS but requires twice the amount of RAM.

One Comment

  1. Long-term Memory » Blog Archive » Terminating an IPsec-GRE tunnel behind NAT says:

    […] verified this setup to work in dynamips. I pinged from 10.0.1.1 to 10.0.4.4. Here are the packet dumps for the ICMP packet on its way from […]

Leave a Reply

Anti-Spam Quiz: