GNS3 (Dynamips) on Mac OSX
I have been playing around with GNS3 (Dynamips) on my Windows VMWare image and I decided to get it working natively on my Mac OSX. Unfortunately unlike the Windows installer the Mac OSX distribution does’nt include the necessary applications. After poking around I figured out a way to get all the parts installed and working. This post is an step by step of what I did to make it all work.
Step 1 – Apple Xcode Tools
The first thing you need to do is download and install the Apple Xcode Tools which are freely available from Apple at the following URL.
http://developer.apple.com/technology/xcode.html
Step 2 – Macports
Macports is a port application for Mac OSX. This is needed to install libpcap which is needed. The installation is pretty straight forward. Download the binary package from the following URL and install it.
http://www.macports.org/install.php
Once installed make sure you are updated by running the following command:
Step 3 – libpcap/dynamips
This is pretty straight forward and easy to do. Run the following:
sudo ln -s /opt/usr/local/libpcap.a /usr/local/lib/libpcap.a
/opt/local/bin/port install dynamips
| NOTE: There is a good chance that the dynamips will fail. On top of that it will most likely install a version that is too old for the GNS3 Dynagen version to run. This is ok but we still want to run this step because it will download and install all the other requirements. |
Step 4 – libelf
Most likely the port install dynamips failed with a rom2c error. This package will correct that issue. Go to a temporary directory such as your Downloads and do the following:
tar -zxvf libelf-0.8.9.tar.gz
cd libelf-0.8.9
./configure –prefix=/usr/local
make
sudo make install
Step 5 – dynamips
We are now ready to download a current version of Dynamips. You might want to check to see if a newer version is available. This is an example of the process:
tar -zxvf dynamips-0.2.8-RC2.tar.gz
cd dynamips-0.2.8-RC2
make
mv dynamips /opt/local/bin
Step 6 – Download & Install GNS3
Last but not least GNS3 itself. Simply go to the following URL, download the DMG and copy the application to your Applications folder. Once you are done point it to “/opt/local/bin/dynamips” and click Test. You should be ready to go now.
Optimizations
One of the easy things you can do to speed up booting of the IOS images is unzipping the images. To do this do the following, simply replace the filename with your filename.
Now point GNS3 to that new image and your router will boot significantly faster.
Summary
At this point everything should be working for you. If you run into problems let me know.
Just what I was looking for (just this week started self-learning for the CCENT then CCNA). I linked to here from the GN3 forum.
Thanks.
December 7th, 2008 at 12:53 pmThank you for the excellent writeup and instructions. I was able to get this up and running on OS X 10.5.6.
Thank you again!
December 29th, 2008 at 11:16 pmFirst I want to thank you for your excellent instruction. I went through it step by step and it’s working fine. Wouldn’t made it without your instruction.
Now, I have one more problem… sure it’s simple for you. I want to map the network cloud to my NIC. But there seems to be a problem with the permissions (”206-unable to create generic ethernet NIO”). Found out that I have to run dynmips as root.
Can you help me to do that. I’m a beginner with MAC OS. So I’m little confused. Do I need to undo all the steps above?
Thank you in advance!
December 30th, 2008 at 8:16 amGreetings!
Honestly I have moved on from using GNS3 due to some stability issues and their site is down so I can’t re-download it right now to check but most likely you will run into some issues trying to use GNS3 to do that. You can still use GNS3 to design the networks but you might want to look at dynagen and then launch dynamips yourself via sudo and then dynagen to start the instances.
December 30th, 2008 at 11:47 amThanks for the step by step info on how to get it to work on a mac.
I just got my mac and still learning the ropes on this system, Im unsure on how or where to run the command that you have posted on Step 2.
Can you tell me more on how to go about running it?
January 5th, 2009 at 3:26 amYou need to run the command in Terminal. You can run it from any directory within Terminal.
January 5th, 2009 at 6:15 pmHi,
I get these error
rsync error: some files could not be transferred (code 23) at /SourceCache/rsync/rsync-35.2/rsync/main.c(1400) [generator=2.6.9]
Error: Synchronization of the local ports tree failed doing rsync
DEBUG: Couldn’t sync the ports tree: Synchronization of 1 source(s) failed
while executing
“macports::selfupdate [array get global_options]”
Error: /opt/local/bin/port: port selfupdate failed: Couldn’t sync the ports tree: Synchronization of 1 source(s) failed
after typing /opt/local/bin/port -d selfupdate
I’ve installed
Apple Xcode Tools (step 1)
xcode312_2621_developerdvd.dmg
and Macports (step 2)
MacPorts-1.7.0-10.5-Leopard.dmg
My system requirements are
OS: Mac OS X Leopard 10.5.6
Model Name: MacBook
Model Identifier: MacBook4,1
Processor Name: Intel Core 2 Duo
Processor Speed: 2.4 GHz
Memory: 4 GB
Bus Speed: 800 MHz
Boot ROM Version: MB41.00C1.B00
SMC Version: 1.31f0
Let me know if I am missing something. Looking forward for your expert advices.
Thanks
CV
January 31st, 2009 at 11:22 amThanks for your great documentation. The Window version worked but is very slow. Used your instructions and on the Mac it is much faster.
Thanks
February 1st, 2009 at 1:00 amI unfortunately don’t know much about ports so I can’t offer much for troubleshooting but it sounds like it had a problem download the updated ports tree. I would try it again as there might have been an issue with the remote server. If that doesn’t work I would find a ports support forum and see if they can help.
February 2nd, 2009 at 9:42 amccievirus you must do it as root:
sudo /opt/local/bin/port -v selfupdate
February 13th, 2009 at 12:05 pmWhen I am trying to do step 2;
March 7th, 2009 at 12:09 amthis statement appears:
Unrecognized action “-d”
what should I do?
Guys can you explain again the step 4 and 5 pls. i copied the code into the terminal and i’m getting errors , that the path does not exist
March 12th, 2009 at 12:26 pmIt is working finally, thanks a lot
GNS3 with mac it is relay different then win$,, i should tray it with Fedora,,
Thanks again,
March 18th, 2009 at 8:34 amI was doing great until I got to Step 6. I can’t point the GNS3 preferences to the dynamips at “/opt/local/bin/dynamips”
The file exists as a Unix Executable, but the program won’t let me select it. Any advice?
Thanks in advance!
March 25th, 2009 at 10:00 pmKyle.
Great instructions. Very helpful. For those who might get stuck, I had to use sudo to run most of the commands provided in the steps.
Is anyone aware of how to get a GN3 build for PowerPC? It looks as if the project is only supporting Intel at this point. I just downloaded the pre-built image provided on the site for Intel – without success (worth a try).
I haven’t spent too much time looking around yet. I will try later tonight to build from the source and see if I can get it working.
Thanks for your work on this. Very clean solution you’ve provided.
April 8th, 2009 at 10:59 pmKyle,
change /opt/local/bin/dynamips to /opt/local/bin/dynamips.bin and select it through the GUI. Dont know why this works but it does
April 9th, 2009 at 5:36 pm[...] The following optimization techniques were take from:http://blog.crimsonsilo.com/2008/11/gns3-dynamips-on-mac-osx/ [...]
April 14th, 2009 at 2:26 amHi
Can someone help with my last step? I’m nearly there but it keeps on failing.. see below
Macintosh-3:dynamips-0.2.8-RC2 matthewconran$ mv dynamips /opt/local/bin
mv: rename dynamips to /opt/local/bin/dynamips: Permission denied
Somehow I cant rename this. Any tip please?
April 18th, 2009 at 7:16 pmthanks
Try:
May 7th, 2009 at 11:12 pmsudo mv dynamips /opt/local/bin/dynamips
[...] do not work on the Mac. Update: After writing this article a friend of mine pointed me over to: http://blog.crimsonsilo.com/2008/11/gns3-dynamips-on-mac-osx/ This is an excellent guide. I have updated my guide to follow the guidelines he posted on this [...]
May 21st, 2009 at 5:46 pmhi
June 27th, 2009 at 1:38 pmthanks for this such a nice document…
i have mac pro – 2 gb mem , 2.53 Ghz…
how many devices can i run with this?
It’s tough to say, it really depends on the platform images you are loading but I have run 8 to 10 devices for some Equal Cost Pathing Labs
June 28th, 2009 at 4:23 pm