How To Setup a Cisco CME (Cisco Manager Express) Virtual Router under Linux using dynamips and dynagen

1.) Install dynagen and dynamips

2.)Also configure your bridge or br0

If you don't have a br0 on your Linux machine then follow this guide or video for Debian:

Alternatively you can use NIO_linux_eth:eth0 for f0/0 below but remember the host machine cannot talk to the router then.

3.)Create your dynagen config

Save the file below to something.conf

#Example config:

autostart = False
workingdir = /home/mint/router
udp = 10100
image = c7200-adventerprisek9-mz.151-4.M.bin
disk0 = 256
#idlepc = 0x60be916c
[[ROUTER r1]]
model = 7200
console = 2521
aux = 2119
#wic0/0 = WIC-1T
#wic0/1 = WIC-1T
#wic0/2 = WIC-1T

#instead youcould use f0/0=NIO_linux_eth:eth0 but your host would not have communication with the router

f0/0 = nio_tap:tap1
x = 22.0
y = -351.0

4.) Start dynamips

sudo dynamips -H 2000&

5.) Start your router

dynagen yourconffromstep3.conf

6.) Connect to your router and configure

telnet localhost 2521

conf t
int fa0/0
ip address
no shut

7.) Test connectivity

Make sure you put your tap1 on the bridge and put up tap1. After this you should be able to ping your router but remember your host's br0:0 should be created and be on the same subnet to work.

sudo brctl addif br0 tap1

sudo ifconfig tap1 up

Performance Tuning

I recommend you set calculate and set idlepc, as a wrong value or no value will guarantee it will use at least ~100% of the CPUcore dynamips is on. Check this guide here to set idlepc for dynamips with dynagen

Helpful Dynagen and Dynamips Startup Script

This script as it is will get your r1 and r2 router up without typing any commands. All you have to do is change the .conf file name to your own and make sure to save the contents of the script to an "", chmod +x and then ./ and it will automatically get you going. It also kills any other instances of dynamips or dynagen to avoid conflicts. The only thing it does need is sudo so it will ask for your sudo password.

Remember that you need "expect" installed or this script will not work (use apt install expect or yum install expect).

The script makes a few assumptions but you can of course change it.

1.) Dynamips is to be started on port 2000 if not change it!

2.) That you want to create two tap devices "tap1" and "tap2" and add them to your bridge br0

3.)It also assumes you are in the directory of "yourconffile.conf" in bold in the script below. Change that name to the name of yours

4.) Finally it also assumes that you have routers r1 and r2 that you want to be started automatically in the send "start r1\n" area. You can add more lines for more routers or change the names according to your needs.

sudo killall dynamips dynagen
sudo dynamips -H 2000 &

sudo ip tuntap add tap1 mode tap
sudo ip tuntap add tap2 mode tap
sudo brctl addif br0 tap1
sudo brctl addif br0 tap2

sudo ifconfig tap1 up
sudo ifconfig tap2 up

expect <(cat <<'EOD'
spawn dynagen yourconffile.conf
expect "Dynagen management console for Dynamips"
send "start r1\n"
send "start r2\n"


cisco, cme, virtual, router, linux, dynamips, dynagenexample, config, autostart, workingdir, mint, udp, adventerprisek, mz, bin, disk, idlepc, console, aux, wic, nio_tap,

Latest Articles

  • qemu 4 compilation options
  • CentOS 7 8 PXEBoot Netinstall Not Working Solution "Pane is dead "new value non-exisetnt xfs filesystem is not valid as a default fs type"
  • CentOS 6 EOL yum repo won't work Error: Cannot find a valid baseurl for repo: base Solution
  • CentOS 7 8 How To Disable SELinux
  • Wordpress How To Add Featured Image To Post in Hueman Theme
  • kdenlive full reset how to erase all config files
  • CentOS 7 8 yum error Trying other mirror. To address this issue please refer to the below wiki article
  • Microsoft Teams Linux - Calendar Doesn't Work Missed Meetings!
  • Scanner not working in Linux Ubuntu Fedora Mint Debian over the network? Use sane-airscan!
  • How To Boot, Install and Run Windows 2000 on QEMU-KVM
  • bash cannot execute permission denied
  • Huion and Wacom Tablets How To Install in Linux Mint / Ubuntu and make the stylus work properly
  • ffmpeg how to cut certain parts of video out
  • ffmpeg how to concat and join two video clips
  • mencoder instead of ffmpeg to join or concatenate video files with different audio streams
  • Linux How To Stop Missing Drive from Halting Boot Process in fstab
  • How To Replace Audio Track of Video using ffmpeg
  • qemu-img convert formats vdi vmdk raw qcow2
  • Linux and Windows Dual Boot Crazy Time Issues
  • dynagen / dynamips 100% high CPU usage solution - how to set the idlepc value