Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Sat Jul 21, 2018 2:29 am

All times are UTC - 5 hours

Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: WifiTrace
PostPosted: Fri Apr 13, 2007 11:44 am 
Cacti User

Joined: Thu Mar 24, 2005 3:53 pm
Posts: 383
Location: Ocoee, Florida
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:

Data::Validate::IP qw(is_ipv4);
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: [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.

File comment: I removed one of the screen shots. Here is the script. [21.4 KiB]
Downloaded 747 times
WifiTrace-Client-Found.png [ 466.03 KiB | Viewed 8189 times ]
WifiTrace-Searching.png [ 480.52 KiB | Viewed 8189 times ]

Last edited by chadd on Mon Apr 16, 2007 3:21 pm, edited 2 times in total.
 Post subject:
PostPosted: Fri Apr 13, 2007 12:01 pm 
Cacti User

Joined: Thu Mar 24, 2005 3:53 pm
Posts: 383
Location: Ocoee, Florida
Sorry, I can't post the script due to a 2M upload limit.. When I can, I will. Thanks,


 Post subject:
PostPosted: Fri Apr 13, 2007 2:27 pm 
Cacti Moderator
User avatar

Joined: Sat May 08, 2004 12:44 pm
Posts: 12150
Location: USA
Might be better to post the cacti related screenshots of the end results instead of wifitrace in action...


| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours

Who is online

Users browsing this forum: No registered users and 3 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group