How to add Cisco Dynamips Images (Cisco IOS) to Eve-ng

This guide will walk you through the process of adding Cisco Dynamips Images (Cisco IOS) to the EVE-NG CLI. Dynamips is an emulator for Cisco routers and switches, which allows you to test and experiment with IOS features in a lab environment. EVE-NG is a popular network emulator that can run various network devices, including Cisco IOS.

Please note that using Cisco IOS images is subject to licensing and may require permission from Cisco.

Follow the below steps to add Cisco dynamips image (Cisco IOS) to eve-ng-

  1. Download and Prepare Cisco IOS Images
  2. Create a Directory for the Cisco IOS Image.
  3. Upload Cisco IOS Images to EVE-NG
  4. Verify and Fix the Cisco IOS Image.
  5. calculating IDLE PC of cisco ios image.
  6. Add the Cisco IOS Image to EVE-NG

if you want to practice Cisco ASA / IOU/ IOL on eve-ng for your certification or knowledge then check below posts-

How to add Cisco IOU/IOL to Eve-ng

How to add Cisco ASAv to Eve-ng

SUPPORTED DYNAMIPS IMAGES

EVE Image NameDownloaded FilenameVersionvRAMIdle PC
c7200-adventerprisek9-mz.152-4.S6.imagec7200-adventerprisek9-mz.152-4.S6.binC7200-ADVENTERPRISEK9-M 15.2(4)S65120x62f224ac

Download and prepare Cisco IOS (Dynamips images) Eve-ng

Images provided below are strictly for education purpose and are not hosted on networkhunt.com server. We are just indexing the links find on internet for education purpose only.

You can download Cisco IOS (dynamips images) from below links.
1. Cisco Website (Cisco Access required to download images from cisco website.
2. Mega
https://mega.nz/#F!fpxnXIKB!twpa-jzH4ReWZFq5uZENZg

Create a Directory for the Cisco IOS Image

  1. Navigate to the Dynamips folder: Enter the following command in the EVE-NG CLI:
    cd /opt/unetlab/addons/dynamips/
  2. Create a new directory: Make a directory for the specific Cisco IOS image using the following command, replacing ‘IMAGE_NAME’ with the desired name:
    mkdir IMAGE_NAME

Upload Cisco IOS Images to EVE-NG

  1. Connect to the EVE-NG CLI: Access the EVE-NG CLI using an SSH client or the web-based console.
  2. Transfer Cisco IOS images: Use a file transfer tool such as SCP or FileZilla to upload the Cisco IOS image files to the EVE-NG server. Place the images in the /opt/unetlab/addons/dynamips/IMAGE_NAME.

If you are uploading the zip file then install the required package-

Install required packages:
apt-get -y install unzip

Upload the downloaded image to the Eve-ng master node using for example FileZilla or WinSCP. Then login as root using SSH protocol and uncompress it:

Using EVE CLI, uncompress original image. Output file extension must be .image. Be sure you are using properly your source and output filenames.

cd IMAGE_NAME
unzip -p c1710-bk9no3r2sy-mz.124-23.bin > c1710-bk9no3r2sy-mz.124-23.image

delete the file:
rm -rf c1710-bk9no3r2sy-mz.124-23.bin


Verify and Fix the Cisco IOS Image

Navigate to the image directory: Change to the image directory using the following command:

cd IMAGE_NAME
  1. Verify and fix the image: Run the following command to check and fix the image if needed:
    /opt/unetlab/wrappers/unl_wrapper -a fixpermissions

4. CALCULATING IDLE PC

If an unsupported image is added to the UNetLab platform, an Idle PC value must be identified. Start a Dynamips instance with basic configuration:

dynamips -P 1700 -t 1710 /opt/unetlab/addons/dynamips/c1710-bk9no3r2sy-mz.124-23.image

CPU usage is very high, a whole CPU for each instance:

  PID USER      PR  NI    VIRT    RES    SHR S %CPU %MEM     TIME+ COMMAND
 3521 root      20   0  412236 125408 109904 S 99.5 25.4   3:27.82 dynamips

Wait for the following line on the console:

Would you like to enter the initial configuration dialog? [yes/no]:

Exit from initial configuration dialog, and quit to get the con0 prompt:

Router con0 is now available

Press RETURN to get started.

After few more seconds press CTRL + ] then i. Dynamips will show suggested Idle PC values:

Please wait while gathering statistics...
Done. Suggested idling PC:
   0x80369ac4 (count=35)
   0x8023afac (count=51)
   0x8023b008 (count=30)
   0x8023b050 (count=27)
   0x803637a0 (count=38)
   0x80363984 (count=20)
   0x80363ccc (count=28)
   0x80363d48 (count=28)
   0x80363d78 (count=74)
   0x803645d0 (count=76)
Restart the emulator with "--idle-pc=0x80369ac4" (for example)

Select one and restart dynamips with the IDle PC value:

dynamips -P 1700 -t 1710 --idle-pc 0x80369ac4 /opt/unetlab/addons/dynamips/c1710-bk9no3r2sy-mz.124-23.image

If CPU usage is lower, then a good Idle PC value has been found:

  PID USER      PR  NI    VIRT    RES    SHR S %CPU %MEM     TIME+ COMMAND
 3598 root      20   0  346700 125328 109828 S  5.3 25.3   0:03.98 dynamips

Usually the highest value of IDLE PC will best for your CPU. In the calculation above it is 76. Copy value of IDLE PC to the notepad and we can start test best value fit for your Dynamips node.

To stop dynamips router calculation mode use:

Key combo CTRL and ] then q

 

Cisco IOS image to eve-ng

Go to EVE WEB GUI, add your Dynamips node and change IDLE PC value to calculated, save and start node.

Check your CPU with top command (cpu check section above)

If CPU usage is lower, then a good IDLE PC value has been found:

  PID USER      PR  NI    VIRT    RES    SHR S %CPU %MEM     TIME+ COMMAND
 3598 root      20   0  346700 125328 109828 S  5.3 25.3   0:03.98 dynamips

If CPU is still high, then another value must be tested.

2 thoughts on “How to add Cisco Dynamips Images (Cisco IOS) to Eve-ng”

  1. It is not wokring. this is what i get with two different 7200 images

    load_elf_image: open: No such file or directory
    C7200 ‘default’ : failed to load Cisco IOS image ‘ /opt/unetlab/addons/dynamips/C7200-adventerprisek9-mz.152-4.s6.image

    Reply
  2. Hi,

    I facing this “ERROR: Unlicensed” right after i enter this command “/opt/unetlab/wrappers/unl_wrapper -a fixpermissions”. Can you please assist me? thank you. =)

    Reply

Leave a Comment