Tips for Dynamips / Dynagen on Leopard OS X

I downloaded the most recent Interim relase from the dynagen.org interim builds web site and then got to work in getting it setup.

To help with the scripting and updates I put everything into a directory under my documents folder called
dynalab
. Then I copied the Dynagen directory from the mounted DMG directly to its own directory.

Then I located some IOS code that I liked the look of, and dropped that into its own directory that I call
dyncode
Then I created a directory called
firstlab
and this is where I have created my lab. The directory looks like this:

Get Dynagen and locate it on your system

I downloaded the most recent Interim relase from the dynagen.org interim builds web site and then got to work in getting it setup.

To help with the scripting and updates I put everything into a directory under my Documents folder called dynalab. Then I copied the Dynagen directory from the mounted DMG directly to its own directory.

Then I located some IOS code that I liked the look of, and dropped that into its own directory so I can use the same IOS images in all of my dynamips confguration. I call the directory dynacode

Then I created a directory called firstlab and this is where I have created my lab. The directory look slike this:

dynalab.jpg

Uncompress IOS file

I downloaded the Zipeg software from Zipeg which is able to uncompress IOS images into the dyncode directory. This means that your dynagen starts a whole lot faster, which suits my style. Also check here for more detail on how to do this.

Startup scripts

I found that I needed two scripts to get things going. Once script to start dynamips and another to run dynagen.

Startmips

#!/bin/sh
nice /Users/gregferro/Documents/dynalab/Dynagen/dynamips -H 7200 &

Note the use of “nice” to leave lots of CPU for other functions. I will spend some time lowering the niceness to see if it works OK with less CPU resource (another post)

first1
#!/bin/sh
/Users/gregferro/Documents/dynalab/Dynagen/Dynagen.app/Contents/MacOS/
Dynagen /Users/gregferro/Documents/dynalab/firstlab/first.net

I found saving these in my firstlab directory worked for me. Note that this is a single line command.

Starting Dynamips

Dynamips has to run as root, (I think that if you install it in your Applications Folder, then it is owned by root and will run without sudo, but I haven’t tested this idea).

to do this on OS X just use sudo:

gf:~ gregferro$ cd Documents/dynalab/firstlab/
gf:firstlab gregferro$ sudo ./startmips
Password: ******* enter your login password here

gf:firstlab gregferro$ Cisco Router Simulation Platform (version 0.2.8-RC2-x86)
Copyright (c) 2005-2007 Christophe Fillot.
Build date: Nov 11 2007 11:11:35

ILT: loaded table “mips64j” from cache.
ILT: loaded table “mips64e” from cache.
ILT: loaded table “ppc32j” from cache.
ILT: loaded table “ppc32e” from cache.
Hypervisor TCP control server started (port 7200).

gf:firstlab gregferro$

Starting your lab

You will need to create a lab config file. This is covered well enough in the dynagen documentation, you should read it thoroughly to obtain maximum enjoyment.

gf:firstlab gregferro$ .
You do not need to be root to start the dynagen loader.

If you got the config file syntax right, you should get an OSX terminal window that looks like this:

Dynagen ó Python ó 80◊24.jpg

Making it a bit more usable

I prefer to use iTerm instead of terminal, so I have created a TAB that allow me to open all routers. You can download iTerm from Sourceforge for free. Highly recommended.

Create a big list of router consoles in the iTerm bookmarks

Bookmarks.jpg

then you can open them all at once

Default.jpg

Edit – See my other post on how to make input to every session at the same time

About Greg Ferro

Greg Ferro is a Network Engineer/Architect, mostly focussed on Data Centre, Security Infrastructure, and recently Virtualization. He has over 20 years in IT, in wide range of employers working as a freelance consultant including Finance, Service Providers and Online Companies. He is CCIE#6920 and has a few ideas about the world, but not enough to really count.

He is a host on the Packet Pushers Podcast, blogger at EtherealMind.com and on Twitter @etherealmind and Google Plus

  • Jacques van Jaarsveld

    Hi there,

    Although I find it helpful, I have to mention that I am new to the whole MAC world. I donít know anywathing about OSX to be honest but really need to get dyngen/dynamips working.

    I installed on Tiger and it worked like a charm, but on Leopard with this Super User, etcÖI am lost

    Could you please assist

    Installed Dynagen/Dynamips in Standard folder.
    Applications/Dynagen

    Could you please assist to get this puppy going as I get the Password Prompt every time I try and execute the Dynamips Server

    Cheers

    Jacques

  • John Field

    Jacques van Jaarsveld

    Did you ever get it working? I’m in the same boat and need help!

  • http://thropos.com Greg Ferro

    John

    Would it help if I posted my files for you to download ? Which part can’t you get working ?

    Greg

  • John Field

    Greg,

    I’m able to get everything loaded to the point where it shows the network loaded successfully, but I get an error message of :

    C3600 ‘R1′: starting simulation (CPU0 PC=0xffffffffbfc00000), JIT enabled.
    % No memory map for code execution at 0xffffffff88000000
    % Unable to create instruction block for vaddr=0xffffffff88000000
    insn_page_compile: unable to create JIT block.
    VM ‘R1′: unable to compile block for CPU0 PC=0xffffffff88000000

    can you please help. I just bought this new Mac Pro for use with Dynamips and I’m stuck. Also, I made this a dual boot machine with Vista and I get the same error when I run Dynamips on the Win side as well. Any thoughts?

  • lew

    can you post the scripts for me please

  • James Jackson

    Very interested to see you have got this program running successfully, it seems to give a lot of people trouble!

    I am just trying to install it but am stuck on installing SIPS so I can use GNS3 – but do I need GNS3 to run dynamips?? Or is it just an extra that I can do without?

    I plan to follow your lead and just install Dynamips/Dynagen, will post back with how i get on.

    James

  • http://etherealmind.com Greg Ferro

    I am not sure what GNS3 or SIPS is so I suppose that I don’t use it. I will have a read in the forums and see if it works on MAC.

    Ah, I see that GNS3 is windows only. Hopefully someone might be able to compile it for the MAC from the source code.

    I see from the forums that you have a PPC MAC, so you will have to compile the code your self as per the post in the forum. You won’t be able to use the dynamips version I show in my post since they are for an Intel MAC platform.

  • Pingback: Caring for your Dynamips install?ó?delet≠ing unwanted files | My Etherealmind

  • stefan

    Hi,

    Thanks for this interesting post…I have been able to install Dynamips on my MacOS 10.6 but I run into a limitation of only beeing able to use 1 tapx device.

    I have created a single cloud with 2 tap devices (tap0 and tap1) but I can only ping 1 tap device from macOS….tried with multiple clouds…tried using different tap devices..always teh same result..only 1 tap device that can be reached

    Any idea ?

    Thanks
    Stefan

  • Diego

    Hi! I have this problem, the console die!

    Last login: Sat Apr 9 16:37:07 on ttys001
    telnet 127.0.0.1 2000 ; exit
    MacBook-Pro-de-Diego-Moronta:~ dem$ telnet 127.0.0.1 2000 ; exit
    Trying 127.0.0.1…
    Connected to localhost.
    Escape character is ‘^]’.
    Connected to Dynamips VM “R1″ (ID 0, type c7200) – Console port

    and nothing more. Why don’t start the image of ios???
    Really thanks!!

    • http://etherealmind.com Greg Ferro

      Try port 2001.