1 Network lab virtualization with dynamips

1.1 Dynamips

Dynamips1 is an emulator (hypervisor) for Cisco hardware (2600, 3600, 3700, 7200)

It emulates all the hardware modules Cisco IOS expects

Dynamips can emulate most of the hardware available on these platforms, including switch modules, but it cannot emulate standalone switches (for example, 2960 or 3560 or any other "Catalyst"-type equipment)

2 Dynamips

2.1 Running dynamips

However, unlike KVM which can run emulated OS at nearly the same speed they would run on the physical host (we are using the same x86/x64 instructions), dynamips isn't very fast.

3 Dynagen

3.1 Dynagen

Dynagen is a front-end for managing dynamips. It controls dynamips, much in the same way that virsh/libvirtd controls KVM. Dynagen uses a configuration file (your_project_name.net) where you can define routers, switches, and connections between the devices.

Dynamips and dynagen

Dynamips and dynagen

You can define even very complex topologies using a single text file.

You will see in the lab how to start dynamips and run dynagen.

4 Dynagen - sample config

    [[router R1]]
        console = 2001
        aux = 3001
        g1/0 = CORE1 1
        model = 7200

    [[router R2]]
        console = 2002
        aux = 3002
        g1/0 = CORE1 2
        model = 7200

    [[ETHSW CORE1]]
        1 = access 1
        2 = access 1

5 Dynamips and the real world

By default, the routers and switches cannot talk to the rest of the world. They are in a closed environment, talking to each other.

But it is possible to "attach" the ethernet interfaces from the routers, to so-called "tap" interfaces on the HOST.

    [[ROUTER r3]]
        console = 2103
        aux = 2023
        fa0/1 = NIO_tap:tap3
        fa0/0 = NIO_tap:tap13
        model = 7200

6 Dynamips and the real world

One would then connect these "tap" interfaces coming from the routers, to a virtual switch (called bridge) - we'll see this on the next slide.

7 Dynamips and the real world

Dynamips and dynagen

Dynamips and dynagen

8 Dynamips and the real world

We can use the brctl command to see which ports are attached to which tap interfces:

$ brctl show br-lan
br-lan      8000.5e56f142f66e   no      tap11
                                        tap12
                                        tap13
                                        eth0

9 A graphical front-end: GNS3

Another tool, which you will see later, is GNS32. It wraps dynagen, and provides a complete Graphical Interface to design, build, run and debug dynagen/dynamips architectures.

tap interfaces

tap interfaces

10 GNS3

GNS3

GNS3


  1. http://www.ipflow.utc.fr/index.php/Cisco_7200_Simulator

  2. http://www.gns3.net/dynamips/