First of all, let me say that I know this is not specifically related to Cacti - but, I think it could be useful to others. The Cacti community has been great to me and it has been a while since I contributed anything, so I hope this script makes someone happy . At the least, people could make use of parts of the code, at best, someone could add to it (maybe even make it a plugin and make it better.
The user interface is pretty primitive, and it is written in Perl. It currently only works on Cisco APs. The perl modules/software required are as follows:
Net-SNMP (used for collecting statistics from the APs - not the perl module, the actual software).
The purpose of the script is to find a wireless client (based on MAC address) and follow that client throughout the wireless network - reporting various statistics on the clients connection along the way. I wrote it to help trouble shoot wireless connectivity issues at the place I work.
It runs well in a UNIX shell, and I have not tried it in Windows(though I suspect there will be issues). I run it in Ubuntu(Edgy) and Freebsd(6.1).
It requires a pretty large terminal screen dimension, and does not resize auto matically(Term::Screen). Here is the usage:
USAGE: wifitrace.pl [AP IP list] [mac address to trace] [time to trace
for in seconds] [options]
--help(-h) produces a brief help message
--version(-v) produces version information
--ips(-f) List of AP IP addresses(,)read SNMP community name (REQUIRED)
--mac(-m) MAC address of client you are searching for (REQUIRED)
--runtime(-t) Amount of time in seconds you want to trace the client (REQUIRED)
--log(-l) Specify a file to log to for this session
The AP IP List must be the first argument on the command line.
The MAC address and Runtime arguments are also required, but can
be given either in order ([MAC] [Runtime]), or by using the
switch, you can place them in whatever order you wish. If you
specify a logfile, the program will write statistics to it every
second that the client is connected to an AP. You do not need to
specify a file name extension, as WIFItrace will make it a .csv
Send all bugs, questions or comments to chadd.
Basically, you feed it a comma delimited list of AP IP address(example: all the APs at a location), where the list is as follows: IP,SNMP Read Community String. The program checks each IP for connectivity, then reads the valid ones into memory. It then scans the CAM tables of the APs, searching for the client MAC address you specified. When it finds the client, it begins to report statistics on that clients connection (from the APs point of view) until that client is no longer attached to that AP. Then the search begins again. There is an audit trail(per say) created, showing you a list of APs the client has visited.
This program was written as a proof of concept, and I am too busy to write it in a compiled language to make it more widely usable. It is hosted on a server here where I work, and is used as intended. I only have Cisco 1200 series APs to test with, because that is all we have, so if you need support for other vendors... You know the rest..
Like I said, I hope this is useful in whole, or in part by someone. Attached are a couple of screen shots of the program in action.
Templates, scripts for templates, scripts and requests for templates.
3 posts • Page 1 of 1
- I removed one of the screen shots. Here is the script.
- (21.4 KiB) Downloaded 810 times
- WifiTrace-Searching.png (480.52 KiB) Viewed 8451 times
- WifiTrace-Client-Found.png (466.03 KiB) Viewed 8451 times
Last edited by chadd on Mon Apr 16, 2007 3:21 pm, edited 2 times in total.
Might be better to post the cacti related screenshots of the end results instead of wifitrace in action...