Cisco Ios Linux

I recently read that it is possible to experience ios cisco on a simple linux box. So, I gave it try. Really nice if someone decide to try a CCNA, CCIE or any other cisco certification.
You can try a lot of configuration with only linux, not any real cisco router, but of course you won't gain the same performance of a real router.
I'll try here to share what I learn, not still really much, but a few things to test it myself.

You need to install some software to emulate the ios. This can be find on internet, but you also need the ios.

When the software "dynamips" is installed.
Try first to unzip your iso image, as I get some error due that it was zipped :

# unzip -p ios.bin > unzipped-ios-image.bin

Then you can launch your ios with dynamips, but don't forget to tell to dynamips from which router came from your ios.
By instance, my ios came from a 2600, so the command that I launched was :

# dynamips -P 2600 unzipped-ios-image.bin

If I did not specify the router that it came from, I always get an error and lost control of the terminal, infinite loop on somethingā€¦
Now, you can start configuring your virtual cisco router. But what can be more interresting is to let communicate this virtual cisco router to the external world.
I suppose here that there already one module on the cisco router with only 1 ethernet port.
So, in the example above, I decide to add to this cisco router, one module with 4 ethernet port :


and to bind this module to my nic :


on my linux box, like that the cisco router can join any other boxes, and any others boxes can ping the cisco router.
This was done with :

# dynamips -p 1:NM-4E -P 2600 -s 1:0:linux_eth:eth0 image-cisco-2600-extracted-with-unzip.bin

Whats does the bold things means ?


means that I want to give to the physical slot number :


a network module named :


which correspond to 4 ethernet port.
Next :


means that I wanted to bind the physical slot number :


and ethernet port :


to my nic :


on my linux box. Like that the virtual cisco router can join other boxe accros my nic eth0.
If it doesn't seems clear, don't hesitate to send me a noteā€¦

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License