Install GNS3 on Mac OSX Leopard

Go to at Sourceforge and download.

Open the GNS3 package and copy it to your Applications folder.


and copying:


Now you can run the GNS3 and it will tell you to install Dynagen. Dynagen is a python wrapper that simplifies the dynamips emulator.

Dynamips is basically a MIPS CPU emulation software with some code to emulate the Cisco hardware. Dynagen extends this to read a text file for the configuration and makes it easier

Copy Dynagen to your Applications Folder.


Configuring GNS3 Preferences


I have created a directory in my Documents folder to store my GNS3 data and IOS images.



The Executable path for dynamips isn’t straightforward because it’s a file. Be default, OS X wants it to be a directory (because all programs are actually directories in OS X) so you will need to manually enter


When dynamips runs, it creates a number of files that are images of the memory etc, that the MIPS CPU emulator needs to reference about the hardware architecture and memory spaces.

Caption Text.

Caption Text.(Click for a full size image)

I would always enable the sparse memory feature to save memory when running multiple images of the same type.


If you have everything correct, you should be able to press the TEST button and get a success message in green as shown:



I haven’t used this feature as yet and may post something on this in the future.


PEMU does not work on MAC OS X (as far as I know and these settings make no difference.). This is becuase the binary that emulates the PIX/ASA has only been compiled for the Windows and Linux platforms.

Working and Unzipping IOS Images

Cisco IOS images are compressed so as to use the least amount of flash memory. Historically, flash memory was expensive and not very large. As a result, IOS was compressed and the first thing IOS usually does these days on startup is to uncompress the image from Flash to RAM. When using GNS3/Dynagen, you can save startup time by uncompressing the IOS images.

Cisco IOS images are compressed using one of three formats, zip, mzip or STAC. The IOS image name will tell you which compression is being used. For the following filename, the letters MZ are the key:


The first letter tells you whether the image runs from flash, memory or ROM. (in the olden days, RAM was also expensive and the image would often run from flash, and only dynamic information was stored in RAM. That is, the program was always executed from Flash, not form memory. Today, RAM is cheap so the flash image is always copied to memory at boot time.)

  • f – flash
  • m – RAM
  • r – ROM
  • l – the image will be relocated at run time

and the second letter tells you what the compression type is:

  • z- zip compression
  • x – mzip compression
  • w – ìSTACî compression

For most images, ZIP compression is used and you can use a standard software package. For those images that use mzip compression, you can download the Zipeg software which supports mzip.

Naming Convention

When unzip the file, it is a convention to rename it with a .image extension. This makes sure you don’t confuse it with a ‘normal’ image.

Which IOS image should you use ?

Because dynagen is an emulator for the MIPS CPU, you can only images that run on Cisco router hardware that uses the MIPS processor. This means most of the older routers, and not many of the new ones. Your best bet is to use 7200 series images, but also the C1700, C2600, C2691, C3600 and C3700 families used MIPS CPU’s. The C3700 is probably your seond best bet.

Configuring the IOS details

We need to tell Dynamips where the IOS image is.


Press Shift-?-I or use the Menu, Edit, IOS Images and Hypervisors to get this screen:

Caption Text.

Configuring the Dynagen parameters.(Click for a full size image)

Point the Image file: to the directory where you IOS images are are stored. I prefer to create a GNS directory in my Documents and a sub-directory for IOS. Thus my directory is:


You must click Save to write the parameters and it will look like:

Caption Text.

(Click for a full size image)

We will set the IDLEPC in the next section but you need to leave it blank for now.

You can have multiple images for a platform, but if you are using sparsemem (as I recommend you should to save memory), then run the same image for every router. In fact, I would typically only use a single router and a single image for all my GNS3/Dynagen use.

Setting the IDLEPC value

Drag the router model that you configured in the previous section onto the screen and click the play button to start the emulator.

Caption Text.

(Click for a full size image)

You need to connect to the router and move out of the of Setup mode. This is because Setup Mode uses all available CPU cycles and will cause your IDLEPC value to be wrong for normal use.


And make you sure you get out of the Automated Setup utility.


This window will pop up while dynamips calculates the unused CPU command that are being repeated (Note the “Please wait while calculating an IDLE PC” text in the corner)


Right click on the router and select the IdlePC from menu:


The system will offer a list of possible IDLEPC values, select one of the values that has a an asterisk next to it.


And now you will have an IDLE PC value configured.


CPU and Memory

There are many other sites that talk about how much CPU and Memory you need to run GNS3. But using Dynagen V0.11 and GNS3 V3.5 will use 100% of CPU. This is because the configuration file will spawn multiple dynamips hypervisors. I presumse that this allows better use of multicore processors,and is probably best for for MS Windows. For the following network layout:


Here is the Activity Monitor for my modified config. What I did was reduce the number of hypervisors created when GNS3 starts by editing the .net text file that GNS3 creates.


GNS3 will put the following text into the .net file. This text spawns another dynamips instance on the IDP port specified.

workingdir = /Users/gregferro/Documents/GNS/BE-WAN-Emulator-V1.1_working
udp = 10200
image = /Users/gregferro/Documents/GNS/IOS/c7200-advipservicesk9-mz.124-20.T1.image
idlepc = 0x61301b6c
ghostios = True
sparsemem = True

Why did I change it ?

Because each dynamips process seems to burn up 100% of CPU. I have been able to reduce this. Having four dynamips instances trying to grab CPU resources stoped me from using web browsing. By reducing the number of hypervisors to two, it works a lot more efficiently.

Wrap Up

So there are some notes on installing and using GNS3 on Mac OS X Snow Leopard. I expect I will continue to tune and modify parts of the configuration. I have a feeling that V0.11 of dynagen works less good than the previous version I was running. i think I might give that go. However, my previous Dynamips wasn’t using GNS3 as I configured everything from the command line. GNS3 makes setting up the networks a lot easier, so I expect that I will use both the command line and GNS3 for different purposes. GNS3 for quick and dirty testing, and the command line for much larger and more complicated testing (more about how to do this here.

  • Brandon Carroll

    As usual- great post Greg. I like the breakdown of the IOS naming convention in relation to it being ziped or mziped. I use zippeg but have had the last two images that I tried to unzip not load when running dynamips. If I leave them alone they seem to be fine. Another recent issue I have seen has something do do with permissions when I start the app but I think I just has some files that need to be cleaned up.

    • Greg Ferro

      I find that cleaning the TMP directory from time to time is a good idea. But permissions can be a big problem on OS X and can take some troubleshooting to sort out.

  • TAS

    Great Writeup ! I have/had played with GNS3 on MacOSX Leopard and it works pretty good.

  • Giovanni Perteghella

    Excellent post Greg, you write the “exaustive guide” to GNS3 on Mac.
    Great work

  • Fernando

    Great explanation, thank you. I am running into an issue being able to open a terminal window to access the CLI. I get the following error:
    Last login: Wed Dec 9 22:26:45 on ttys000
    Nandos-MacBook-Pro:~ iNando$ telnet localhost 2007 ; exit
    Trying ::1…
    telnet: connect to address ::1: Connection refused
    Trying fe80::1…
    telnet: connect to address fe80::1: Connection refused
    telnet: connect to address Connection refused
    telnet: Unable to connect to remote host

    [Process completed]

    Any ideas, please?

    • Greg Ferro

      Your are trying to connect to port 2007 on the dynamips hypervisor and it isn’t there. Because you also have IPv6 enabled on your network adapter, it then goes and attempts to connect to the other addresses on the loopback address.

      Check that your dynamips hypervisor is running, and that the emulated router is running on port 2007. Or check the port numbers that GNS3 is configured to run the ports on.

  • Chris

    Good info Greg! I configured everything exactly as instructed. I’m using a 1700 IOS, Snow Leopard. I left the IOS files as .bin files instead of changing the extension to .image. Those are the only differences. Here’s what happens when I try to console into the router:

    Last login: Sun Jan 24 13:51:30 on ttys000
    telnet localhost 2000 ; exit
    AlarMacBP:~ a1arc0n$ telnet localhost 2000 ; exit
    Trying ::1…
    telnet: connect to address ::1: Connection refused
    Trying fe80::1…
    telnet: connect to address fe80::1: Connection refused
    Connected to localhost.
    Escape character is ‘^]’.
    Connected to Dynamips VM “R0″ (ID 0, type c1700) – Console port

    It pretty much stops there. I hit ‘enter’ a couple times and nothing. Any ideas?

    • Greg Ferro

      Open a terminal windows and attempt to telnet on port 7201 or port 7200 after you “turn the IOS on”. If you get a connection, then you have the wrong port configured in the terminal script. That’s the most likely cause.

      • Chris

        I made some changes so the 1st 2 telnet attempts are longer made. Here’s what I get now:

        Last login: Sun Jan 24 16:46:41 on ttys001
        AlarMacBP:~ a1arc0n$ telnet 2000
        Connected to localhost.
        Escape character is ‘^]’.
        Connected to Dynamips VM “R0″ (ID 0, type c1700) – Console port

        I tried as you suggested and port 7200 and port 7201 don’t yield a connection. However, port 2000 does. Results are the same as above and still no Router> prompt.

      • Chris

        Here’s my login script also:

        /usr/bin/osascript -e ‘tell application “Terminal” to do script with command “telnet %h %p ; exit”‘ -e ‘tell application “Terminal” to tell window 1 to set custom title to “%d” ‘

      • Chris

        Here’s my terminal script also:

        /usr/bin/osascript -e ‘tell application “Terminal” to do script with command “telnet %h %p ; exit”‘ -e ‘tell application “Terminal” to tell window 1 to set custom title to “%d” ‘

  • Pingback: Cisco IOS on MACOS | SB Blog()

  • Diego

    hi Greg, i’ve used your guide but when I press the TEST button I get an error message in RED:
    “Failed to start Dynamips”

    any suggests??

    • Chrised

      I had the same problem. Then I changed the executable path to:
      /Applications/ and the test worked. I’m a newbie so not sure if this is correct.

      • Greg Ferro

        Yep. that’s how it work.

      • Diego

        Thanks now it works!!!
        But I have another problem: I can’t connect to the port 7200 using telnet..
        here my error

        Macintosh-2:~ dv$ telnet localhost 7200
        Trying ::1…
        telnet: connect to address ::1: Connection refused
        Trying fe80::1…
        telnet: connect to address fe80::1: Connection refused
        telnet: connect to address Connection refused
        telnet: Unable to connect to remote host

        using ssh is the same in fact

        Macintosh-2:~ dv$ ssh dv@localhost -p 7200
        ssh: connect to host localhost port 7200: Connection refused

        I think my 7200 port is locked but my firewall isn’t working and the remote login preferences is allowed to all user without password.

        • Greg Ferro

          Try port 7201.

          • Diego

            I’ve tried ports 7200 7201 2000 2001 but nothing to do.
            Have I to manually open some ports or change some preferences?

  • A Grateful Reader

    Thanks for the tip of changing the working directory for dynamips on one of those screenshots.
    It was failing to start dynamips until I changed it away from the default /tmp setting.

    • Greg Ferro

      Thanks very much. That means it’s a permissions problem I guess.

  • Diego

    I’ve see where is the problem:
    using /Applications/ the dynamips demon won’t start! So that telnet localhost 7200 can’t find the process behind the port.

    I’ve used the directory suggests by Greg /?Applications/?Dynagen/?dynamips in gns3, still the demon won’t start. In fact in this directory there is the script “Dynamips server”. This script starts the demon, so the command telnet localhost 7200 works.

    1. if I launch manually “Dynamips server” I’ve an error in gns3: “service just started on port 7200″ and gns3 try to start the server on the port 7201
    2. obviously even if the server starts on port 7200 i can made a telnet connection but I’ve to configure manually the cisco emulator without the graphic interface of gns3 but using text command to create the router and the link.

  • Kayode


    Really great post.
    Simply put – this is one of the best guides I have seen.
    Really descriptive and puts everything into context.

    I have been able to setup GNS3 on my Mac now.

    Thanks and Great job!

  • dm

    I can’t understand, Were can I download dynagen?!

    • dm

      I found)

  • Battlechasers


    I cant seem to the get the GNS3 running on my MACbook 5.1 aluminum unibody with 2.0 gHz , 2.0GB DDR3 OSX 10.5 . I am getting an error ” GNS has encountered a fatal error, and will now terminate.”

    I’ve checked the console and saw the line ” /library/Frameworks/Python.framework/Versions/2.6/Phyton: No matching architecture in unversal wrapper”

    Do I need to do anything else or did I missed something. I ended reinstalling my OS but I am still getting the same error.

    I used the GNS3 from this site “”

    I also tried to use ”” but I stil cant get it to work.

    Hope someone could help

  • Hale


    I tried this /Applications/
    but still red error “Failed to start Dynamips”

    How can I make it work? I am not able to login as root to my macbook pro, could that be the problem?

    Thanks a lot,


    • Greg Ferro

      You need to run root using the sudo command to start dynamips.

  • Tod


    I’m running OSX 10.6.4
    I’m trying to install the GNS3 v0.7.2 DMG package from

    I get the “Can’t start dynamips on port 7201″ message whenever I try to add a router to the network.
    I get “Failed to start Dynamips” when I try to test Dynamips.

    When I run GNS3 is does not say anything about installing Dynagen (as you state in the procedure, “Now you can run the GNS3 and it will tell you to install Dynagen. Dynagen is a python wrapper that simplifies the dynamips emulator.”)

    Any idea what i’m doing wrong?

    Thank you.


    Same problem here, downloaded the DMG compiled app from website and cannot be the darn thing to work. I also had to download the dynamips.bin file and put it into the under resources, pick the correct directory from the GNS preferences page, click test and get nothing but a BIG OL’d FAILED.

    Can anyone help, I’m new to Mac OS and it’s killing me not to be able to run GNS3

    • OH-MAC-OS

      Figured out what the problem is. The package from the website doesn’t have the dynamips applications. You must download dynamips and place it into the package compiled by

      • Mohit7884


  • carefree

    Who can speak Chinese,I can’t speak English.

  • roco

    wooaaa great post..
    thanks, this post very helpfull for me

    sorry for my bad english

  • Rick


    Thx for the great post!

  • Ali A

    How is that possible to connect routers to real network? or Internet? (on GN3 MAC ver.)

    In windows version that is possible via Loopback Interface. I’ve tried it but no success.

  • Alexmbay

    wonderfully explained. worked great for me

  • bonjing

    Hi, i’m new in GNS3, i’m stuck while trying to console a router, here’s the message:

    telnet 2008 ; exitTrying…Connected to localhost.Escape character is ‘^]’.Connected to Dynamips VM “R1″ (ID 8, type c2600) – Console portPress ENTER to get the prompt.

    i hit ENTER but nothing happened, anyone can help? the dynamips is successfully tested

    • AquaB

      I got the same problem but can’t fix. I had already configured vboxwrapper and dynamips. Both of them are successfully tested. I’m using MacOS X.

      Is there anyone experience the same problem?

  • Kevin

    I can’t get terminal to work!

    I’m running OSX 10.7.2 and installed GNS3 0.7.4. Dynamips can start and the IOS image is loaded.
    But when i want to open a Console session nothing appears. No error and no terminal window?

    I use the standard command:
    /usr/bin/osascript -e ‘tell application “terminal” to do script with command “telnet %h %p ; exit”‘

    Do you have any adea what can be wrong?

    Tank you,


    • Johan Havermans

      I use GNS3 on Lion. DynaMIPS is embedded in GNS3 for OS X. Most stuff that I red for getting it to work at Leopard or Snow didn’t work on Lion. If you want to get it work, please take a look at:

      In that post, I documented what I did to get it work on Lion and also wrote some scripts to get you going with the permissions and so. 

      I am using the same version of GNS3 and Lion as you do and have no problems at all in opening a console window from within GNS3.

      Good luck


  • Kevin

    Now I get a error when i’am trying to make a console connection in GNS3. 

    Cannot start /usr/bin/osascript -e ‘tell application “terminal” to do script with command “telnet localhost 2000 ; exit”‘: No such file or directoryI can Telnet to the virtual router, but access thru GNS3 isn’t working.Any ideas?Thanks,Kevin

  • Adam

    I would add that on the windows version, a lot of the time the idlepc runs on 100%. I have found that you may need to configure the idlepc a number of times until it drops the CPU usage to negligible. I just run a task manager and watch while assigning the idlepc until it hits 1 or 2 %. I don’t own a Mac (yet) but I would imagine that it would be able to do the same kind of thing.

  • Jorgelavelar

    Hi Greg,

    Great post. I am pretty versed with Dynamips and now with GNS3, it makes things a whole lot easier. I have been running GNS3 on my Mac Book Pro with Lion, and memory wise it does a fabulous job. I have the 4 GB of RAM and can run about 10+ routers in a full MPLS SP and Customer configuration, using backup DMVPN links, etc. Its amazing how well Mac OSX Lion handles everything.

    My main issues have been trying to get the ASA simulated using Leopard and now Lion. It’s been a huge ordeal. As I have been reading through many blogs at and other sites, the issue now has gotten worse. Have not been successful in getting the ASA to work. The PIX was working before, but now with all my QEMU tunings, that is no longer working.

    I just curious if anyone on this post has had any success simulating ASA on GNS3 with Mac OSX Leopard or Lion?



    • Aqua

      Hi Jorge,

      Did you experience the following problem?

      telnet 2008 ; exitTrying…Connected to localhost.Escape character is ‘^]’.Connected to Dynamips VM “R1″ (ID 8, type c2600) – Console portPress ENTER to get the prompt.

      It stops response or shows “**** Unknown IRQ ****”. Which IOS version are you using?


  • Pingback: In the Lab: Review a few IPv6 Routing Protocols and Encapsulating v6 in v4()

  • Pingback: Spirent Communications Looks Toward the Enterprise()