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.