Archive for November, 2008

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:

/opt/local/bin/port -d selfupdate

Step 3 – libpcap/dynamips

This is pretty straight forward and easy to do. Run the following:

/opt/local/bin/port install libpcap
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:

curl ‘http://www.mr511.de/software/libelf-0.8.9.tar.gz’ -o libelf-0.8.9.tar.gz
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:

curl ‘http://www.ipflow.utc.fr/dynamips/dynamips-0.2.8-RC2.tar.gz’ -o dynamips-0.2.8-RC2.tar.gz
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.

http://www.gns3.net/download

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.

unzip -p c1700-adventerprisek9-mz.124-15.T7.bin > c1700-adventerprisek9-mz.124-15.T7.image

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.


CUCM AXL Phone Scanner

Anyone that decided to renew SmartNet on Cisco IP Phones has discovered that unfortunately there is no easy way to get the serial numbers of all the Cisco IP Phones that are registered to the CUCM cluster. What you can get is the IP address of the phones. If you pull the webpage up for the phones you can find the serial number for the phone. While this isn’t that big of a deal for small phone deployments if you have a medium or large deployment this simply becomes an unrealistic approach.

This is where the CUCM AXL Phone Scanner comes into play. This is a small application I wrote that polls the CUCM cluster via AXL for a list of all phones registered with the cluster and their IPs. Once it has this information it goes through the phones and extracts the serial numbers from their web pages. Obviously for this to work you need to have the web pages turned on and have access to the phone’s webpage from where you can scanning it.

I have released this application for free via my blog. Please give it a whirl and let me know if you run into bugs or have some general feedback. You can find it’s page at the link below:

http://blog.crimsonsilo.com/cucm-axl-phone-scanner/


Distributing Only Odd Network Routes

Last week was a slow week at work and I had some time to spend on lab gear.  I playing around with IPSec/GRE tunnels and routing protocols when our principle engineer saw what I was doing and decided to challenge me with a strange question he had on his CCIE lab.  The question was:

Configure a router with 10 loopback adapters.  The first loopback should be on network 192.168.1.0/24 with the other loopbacks incrementing their networks by one (192.168.2.0/24, 192.168.3.0/24, etc).  Once configured ensure that only the odd numbered routes were injected into EIGRP by adding only a single line to the EIGRP block and a single line ACL.

I first laughed at how off the wall the question was and then I spent a little bit thinking about it.  Obviously the single line in the EIGRP block is a distrubution list but a single line ACL For only odd networks that took me a bit to figure out.

With ACLs you classify traffic using wildcards which are bit based selections.  Normally you use wildcards in the subnet portion of the ACL statement.  Wanting to distribute only odd routes means the routes need to be classified into a single bit statement.  That is when I remembered that wild cards are not restricted to just the subnet portion but can be used in the network portion as well.  I popped the following configuration into the router and it worked like a charm.

ip access-list standard ODDROUTES
 permit 0.0.1.0 255.255.254.255
!
router eigrp 1
 network 10.0.0.0
 network 192.168.0.0
 distribute-list ODDROUTES out
 no auto-summary
!

All in all it was a very simple question but it was exactly the kind of questions I like the best.  Simple answer but something that you don’t typically do everyday.