Archive for category Technology

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.

No Comments

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.

,

No Comments

WordPress Permalink Issue when migrating to Bluehost.

Check this out for the answer.

http://mediaforministry.org/768/bluehost-permalinks/

No Comments

Migrating from GoDaddy to Bluehost == Less than painless

So my hosting plan and domain were about to expire with GoDaddy, so I decided it was time to move to a different hosting provider. GoDaddy was starting to cost more and was getting more and more annoying to use… It could take up to an hour just to change a simple setting, so I found Bluehost and signed up for the one year hosting plan. Once I figured out the process of transferring my domains, I realized that would be the easy part.

Once I got the domain’s transferred, I downloaded all of my SQL databases and files from GoDaddy and wen’t through and uploaded what I thought I needed. I had to do some reconfiguration of the wordpress config file as I wasn’t able to use the same database name as GoDaddy had assigned. Once I was able to access my home page, I didn’t really bother looking at any of the other pages on the wordpress site and decided that it was a success. I was WRONG, it ends up, none of the Permalinks were working, so if I tried to click on one of my posts or any of the other pages in the site (excluding the site admin) I would get a 404 error or something similar. I have managed to find a solution and will post the link in a separate post as well.

If you’re having the permalink issue on Bluehost, follow these instructions.
http://mediaforministry.org/768/bluehost-permalinks/

No Comments

Firefox freezes up after upgrading to Ubuntu 10.04

Every time someone would attempt to send me an IM on facebook, Firefox would go gray and stop responding for a moment. I have discovered the quickest way to solve this problem, is to delete the .mozilla folder in my user profile.

CAUTION: This will remove all settings, extensions, and bookmarks in firefox.

No Comments