Cisco Discovery Protocol and verifying ports on Enterasys K-Series

Over the past several weeks, the university that I work for has been upgrading their residential network. This process has involved pulling out all of the old switching equipment and replacing it with the brand new Enterasys K10 switches. Many days had been spent pulling out patch cables in all of the residence hall’s network closets. After installing the new switching hardware, a lot of time was spent repatching the closets and documenting which ports on the switch were connected to which jacks in each of the dorm rooms.

Documentation is a very important step in any IT project and this particular project was no different. Our first step in the documentation process involved writing down what jack was connected to what port as they were being connected to the switches.  An easy enough process but definitely not a perfect one, so we added a second step to verify the documentation in the first step. To do this I wrote a script and web application that would utilize the Cisco Discovery Protocol that Enterasys so kindly includes in their switches.

The Cisco Discovery Protocol (CDP) is a Data Link Layer protocol developed by, you guessed it, Cisco. If enabled, the CDP packets can be transmitted on every port of the switch. These packets contain useful information including, but not limited to, Device ID, Port ID, IP address, and even Location. By default, the K-Series will transmit those packets once every minute.  For our project we set them to transmit every five seconds, so that the student employees that would be going room to room, would have to spend as little time as possible in each room.

I tried to find a decent Python module to capture the CDP packet but it proved to a major pain to find a module that would work with the version of Python I was using, so I decided to use Tshark, which is the command-line version of Wireshark.  It can be installed when you install Wireshark. I have the Python program open a tshark process with the display filters set to display only CDP packets and dies after 7 seconds.. The script captures the output of that process once it dies and parses it.  From the output, the script pulls out the Device ID, which is the base mac-address of the devices, and the port number. Once the script has collected that data, it opens a web browser and passes the data to the web application.

The web application is a simple set of php scripts with a MySQL back end. When the first page receives the data, it searches the MySQL database for the room where the jack is located for that particular port and chassis. If the room number is in correct, they can hit submit, if its wrong, they simply can change the room number in that field and click submit.  Any ports with incorrect locations were loaded in to a separate database table.

So far the other students have made it through two of the residence halls with no errors in the documentation, except for that of ports that were added after we had visited those closets.  Hopefully this verification process continues to go smoothly.

Posted in Personal, Technology | Leave a comment

A WordPress Plugin that may slow down your site for some users.

Ever since I switched to Bluehost a few months back, I found that my WordPress site had started loading extremely slow.  I would have to wait about 30 seconds before the homepage would load and just as long for any other page within the WordPress application.  At first I thought it was Bluehost, but then it would load a lot faster at the university that I attend.  In January my internet provider had switched us to their Fiber To the Premises service, so even though that service is much faster, I thought maybe it was the cause and since I couldn’t do anything about it I left it alone.

After dealing with this for about 4 -5 months, I decided that it was time to investigate the issue again.  So for starters, I decided that I would blame the WordPress application first and work my way from there.  So for starters, I disabled all of the plugins that I had installed.  Amazingly, that showed some results.  RyChannel.com was loading instantly again!!!  NICE!  Now, the question became, which plugin was causing it?  I went through and activated the plugins that I absolutely “had” to have.  Ok, WP didn’t slowdown again. I started activating the other plugins one by one until the problem started again.

Okay, so which plugin was it?  WP-Ban.  WP-Ban is a WordPress plugin that allows you to block visitors by IP address, IP range, etc.  I’m not quite sure why I had it installed, but now that it is gone, RyChannel.com’s WordPress application works fantastic.

Posted in Technology | Tagged , | Leave a comment

Ubuntu 11.04 to be released soon!

The next version of Ubuntu is coming soon

Posted in Uncategorized | Leave a comment

Professors writing emails from airplanes.

Dear <Class> :

I am writing this from an airplane! Yes! How cool is this? Answer: VERY COOL! I am on an AIRPLANE and writing an email to all of YOU ON THE GROUND! Hoooo Haaa! Do you know what is holding me up right now? Answer: AIR! If YOU tried to climb on some air right now, you would fall, so do not try to duplicate my feat of amazingness. Similarly, if you yelled as loud as you could, I would not be able to hear you, yet I can communicate with YOU, all of you at once, while I am ON A FREAKING PLANE!

Here is a combinatorics question:

How many ways are there to arrange the members of our class who are ON A FREAKING PLANE?

Answer: Only one, for it is I.

I hope you do well in all your ground-based finals next week, and that you study hard, given that you have more than a tray-table to work on, and don’t have a little screen above your head displaying “Eat Pray Love” without sound.

Dr. <censored> , Ph.D.

P.S. I AM SENDING YOU THIS EMAIL FROM AN AIRPLANE!

Posted in Uncategorized | Leave a comment

Authenticating with Active Directory via PHP

Found a nifty script for authenticating with AD via PHP.

Link here.
http://adldap.sourceforge.net/

Posted in Uncategorized | Leave a comment