Cisco CME and C7200 Router Testing and Learning Environment on Ubuntu 20+ Setup Tutorial Guide

Since newer versions of Ubuntu like 20, you will find there is no longer dynagen and that the dynamips provided is faulty and will segfault each time:

Cisco Router Simulation Platform (version 0.2.14-amd64/Linux stable)
Copyright (c) 2005-2011 Christophe Fillot.
Build date: Apr  3 2018 12:20:29

Local UUID: 3c1c0b7f-2fab-4fda-b40b-74841d1bcfe0

Instance ID set to 1.
netio_tap_create: unable to open TAP device tap1 (No such file or directory)
C7200 'default': unable to create NETIO descriptor for slot 0
IOS image file: c7200-adventerprisek9-mz.151-4.M.bin

ILT: loaded table "mips64j" from cache.
ILT: loaded table "mips64e" from cache.
ILT: loaded table "ppc32j" from cache.
ILT: loaded table "ppc32e" from cache.
CPU0: carved JIT exec zone of 64 Mb into 2048 pages of 32 Kb.
C7200 instance 'default' (id 1):
  VM Status  : 0
  RAM size   : 256 Mb
  IOMEM size : 0 Mb
  NVRAM size : 128 Kb
  NPE model  : npe-400
  Midplane   : vxr
  IOS image  : c7200-adventerprisek9-mz.151-4.M.bin

Loading ELF file 'c7200-adventerprisek9-mz.151-4.M.bin'...
ELF entry point: 0x80008000

C7200 'default': starting simulation (CPU0 PC=0xffffffffbfc00000), JIT enabled.

Segmentation fault (core dumped)

 

 

Solution - Compile The Newer Version of dynamips

As you can see from the output, the newest version in the repo is 0.2.14 which was built in 2018.  The versioning numbers themselves, without being a whole number, are understandly "alpha" sounding versions.

Clearly, something has to be fixed and there is no newer version in the repos, so we'll have to compile our own.

Fortunately the project was picked up and lives on here: https://github.com/GNS3/dynamips

Step 1 - Get Required Packages

apt install git libpcap0.8-dev libelf-dev cmake

Step 2 - Get Source Code:

git clone https://github.com/GNS3/dynamips

Cloning into 'dynamips'...
remote: Enumerating objects: 4195, done.
remote: Counting objects: 100% (775/775), done.
remote: Compressing objects: 100% (134/134), done.
remote: Total 4195 (delta 694), reused 641 (delta 641), pack-reused 3420 (from 1)
Receiving objects: 100% (4195/4195), 2.63 MiB | 20.39 MiB/s, done.
Resolving deltas: 100% (3019/3019), done.

 

Step 3 - Prepare Environment and Compile

cd dynamips

mkdir build

cd build

cmake .. -DDYNAMIPS_CODE=stable

You should see this at the end of successful compilation:

-- DYNAMIPS_FLAGS=-m64;-Wall;-O2;-fomit-frame-pointer
-- DYNAMIPS_DEFINITIONS=-DHAS_POSIX_MEMALIGN=1;-DDYNAMIPS_VERSION="0.2.23";-DJIT_ARCH="amd64";-DJIT_CPU=CPU_amd64;-DMIPS64_ARCH_INC_FILE="mips64_amd64_trans.h";-DPPC32_ARCH_INC_FILE="ppc32_amd64_trans.h";-D_FILE_OFFSET_BITS=64;-D_LARGEFILE_SOURCE;-D_LARGEFILE64_SOURCE;-DLINUX_ETH;-DGEN_ETH;-DHAS_RFC2553=1;-DOSNAME=Linux
-- DYNAMIPS_INCLUDES=/usr/include
-- DYNAMIPS_LIBRARIES=dl;rt;nsl;/usr/lib/x86_64-linux-gnu/libelf.so;-lpthread;/usr/lib/x86_64-linux-gnu/libpcap.so
-- configure - END
Summary:
  CMAKE_INSTALL_PREFIX               : /usr/local
  DYNAMIPS_ARCH                      : amd64
  DYNAMIPS_CODE                      : stable
  DYNAMIPS_RENAME                    : dynamips_amd64_stable -> dynamips  (auto)
  BUILD_NVRAM_EXPORT                 : ON
  BUILD_UDP_SEND                     : OFF
  BUILD_UDP_RECV                     : OFF
  Large File support                 : ENABLE_LARGEFILE=ON
  Linux Ethernet (RAW sockets)       : ENABLE_LINUX_ETH=ON  (linux_eth)
  Generic Ethernet (libpcap/WinPcap) : ENABLE_GEN_ETH=ON  (gen_eth)
  IPv6 support (RFC 2553)            : ENABLE_IPV6=ON
-- Configuring done
-- Generating done
-- Build files have been written to: /root/dynamips/build
root@d038b4fbf6e1:~/dynamips/build#

 

Now make and install

make

make install

ln -s /usr/local/bin/dynamips /bin

Confirm it is the right version:

You should as below that it is version 0.2.23 and the compilation date should be the date and time you did this.

dynamips|head
Please specify an IOS image filename
Cisco Router Simulation Platform (version 0.2.23-amd64/Linux stable)
Copyright (c) 2005-2011 Christophe Fillot.
Build date: Sep 16 2024 21:09:39

 

 

 


Tags:

cisco, cme, router, ubuntu, tutorial, guidesince, newer, versions, dynagen, dynamips, provided, faulty, segfault, simulation, platform, amd, linux, copyright, christophe, fillot, apr, uuid, fab, fda, bcfe, netio_tap_create, unable, directory, default, netio, descriptor, slot, ios, adventerprisek, mz, bin, ilt, quot, mips, cache, ppc, cpu, carved, jit, exec, mb, kb, vm, ram, iomem, nvram, npe, midplane, vxr, loading, elf, entry, pc, xffffffffbfc, enabled, segmentation, compile, output, newest, repo, versioning, understandly, alpha, sounding, repos, ll, fortunately, https, github, gns, packages, apt, install, git, libpcap, dev, libelf, cmake, clone, cloning, enumerating, objects, compressing, delta, reused, receiving, mib, resolving, deltas, mkdir, ddynamips_code, compilation, dynamips_flags, fomit, pointer, dynamips_definitions, dhas_posix_memalign, ddynamips_version, djit_arch, djit_cpu, cpu_amd, dmips, _arch_inc_file, _amd, _trans, dppc, d_file_offset_bits, d_largefile_source, d_largefile, _source, dlinux_eth, dgen_eth, dhas_rfc, dosname, dynamips_includes, usr, dynamips_libraries, dl, rt, nsl, lib, _, gnu, lpthread, configure, summary, cmake_install_prefix, dynamips_arch, dynamips_code, dynamips_rename, dynamips_amd, _stable, auto, build_nvram_export, build_udp_send, build_udp_recv, enable_largefile, ethernet, sockets, enable_linux_eth, linux_eth, generic, winpcap, enable_gen_eth, gen_eth, ipv, rfc, enable_ipv, configuring, generating, fbf, ln, specify, filename, sep,

Latest Articles

  • How to combine .txt ACLs without breaking things
  • How to ping all of Googlebot's IPs script
  • 'virtio0' uses a qcow2 feature which is not supported by this qemu version: QCOW version 3
  • Linux bash script to get the IP of a list of hostnames
  • How To Use Camera Webcam in Docker for OBS Studio etc...
  • Computer Server Won't Post Boot Or Enter BIOS Setup After Installing RAID SAS or GPU Card etc..
  • How To Test PHP Scripts from CLI with GET variables/query string
  • apt-cache how to see all available versions of a package in Debian Ubuntu Mint
  • Virtualbox VBox Guest-utils drag and drop files stops working with Windows VMs
  • How To Remove Ubuntu Netplan and Go Back to /etc/network/interfaces
  • How To Force Flash an AMD Instinct GPU To Another Model Using Debian Ubuntu Mint Linux
  • How To compile ollama from source to use unsupported AMD GPU with rocm in Ubuntu Debian
  • QEMU KVM Virtio GPU Windows Cannot Select 1080P
  • Linux Gnome Desktop Ubuntu Mint Debian Gets Slower After Weeks
  • Firefox How to Save Full Page As Screenshot/PDF
  • Nvidia Datacenter Driver Tesla Slow nvidia-smi response and high utilization with 0 usage
  • ffmpeg how to normalize / increase the volume of your audio
  • kdenlive audio blips pops cracks artifacts solution fix
  • haproxy / nginx certbot SSL issues
  • nginx how to see the real IP when behind a CDN