Cisco Aironet RSSI Values

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Phobos182
Cacti User
Posts: 65
Joined: Tue Sep 21, 2004 2:22 pm
Location: Madison, WI

Cisco Aironet RSSI Values

Post by Phobos182 »

My goal was to produce a graph to display on average what the clients were recieving. Since we have a 20% overlap on our wireless deployment, I should not see very low numbers, or I have 'dead' spots within the wireless network. This graph will not tell me where the 'dead' spots are, but helps me determine the quality of the network. My goal is to have excellent signal strength everywhere (SNR >= ~25).

I have wrote a script to query the Cisco 1200 Series Access Points SNMP OID values for Signal Strength. I had to choose a the maximum number of clients that I would graph for, and chose 10. The only problem with this is the SNMP OID is based on the MAC address of the client, therefore I do not know how to chart the values for addresses I do not know for. The base OID for the values is

.1.3.6.1.4.1.9.9.273.1.3.1.1.3

If anybody has a way to do this without scripting, please let me know. Since I am a Windows System Engineer, I wrote a quick script in VBScript to grab the Signal Strength values of the device, and organize them in the fashion that RRDTool wants for Graphing. I have included screenshots of the finished graph. Since this is not linux friendly, if anybody wants to convert my script to Perl, that would be fantastic. Or perhaps lend a hand in getting the SNMP values through a Cacti SNMP Indexed query if possible?

At this time, if you would like said graph, please send me a private message. I'm not comfortable releasing this graph in it's current state unless there is popular demand.

First I will explain the graph. Cisco has it's own charts for RSSI values. I have used the following references. Cisco recommends for high quality traffic that the SNR not fall below 25.

Cisco RSSI Chart
http://www.cisco.com/en/US/products/hw/ ... #wp1041684

WildPackets RSSI Guide
http://www.wildpackets.com/elements/whi ... rength.pdf

Synopsis
Receiver sensitivity is the minimum signal level allowable for a receiver to be able to decode received RF. For radios, 0 is equal to 1mW. A negative dBm reading such as -10dBm gives a value of .1mW. Different modulation types have different receive sensitivity requirements, i.e. receive sensitivity is data-rate dependent. So, while a radio may provide a receive sensitivity of -85dBm at 11Mbps, it could also successfully demodulate a weaker signal, -94dBm, at 1Mbps.

RSSI is received signal strength indicator and is a value proportional to the strength of the received RF signal. Sometimes this is viewed as a percentage (which can be very confusing); usually you'd want to display it in dBm.

If your receiver noise floor (the amount of RF interference in an environment) is -95dBm ( -100dBm is less noise than -95dBm) and the signal strength is -85dBm then the Signal to Noise Ratio (SNR) is 10dB. This would be your RSSI. Typical decent RSSIs in a WLAN environment are commonly found between 10 to 20dB.

Take a look at the receive sensitivity ratings for a Cisco Aironet PCM352 wireless PC card:

1 Mbps: -94 dBm
2 Mbps: -91 dBm
5.5 Mbps: -89 dBm
11 Mbps: -85 dBm

Compare that to a Lucent/Agere/Proxim Orinoco Gold card that has:

1 Mbps: -94 dBm
2 Mbps: -91 dBm
5.5 Mbps: -87 dBm
11 Mbps: -82 dBm

Not a lot of difference in those numbers however dBm math can be deceiving. The 3dBm difference between the 11Mbps rates means the Orinoco will have half the power of the Cisco card. Plus, the Orinoco can only go up to 32mW while the Cisco can do up to 100mW. This allows for much greater range and throughput at the higher datarates.
Attachments
get_rssi.txt
RSSI Script (.vbs)
(1.05 KiB) Downloaded 1297 times
rssi1.png
rssi1.png (31.53 KiB) Viewed 43297 times
rssi2.png
rssi2.png (38.88 KiB) Viewed 43297 times
bei01
Posts: 3
Joined: Thu Apr 20, 2006 11:54 am

Post by bei01 »

Is there a perl version, or can anybody translate this to perl so we can use it on a unix platform?
jimq
Posts: 1
Joined: Thu Apr 20, 2006 3:33 pm
Location: Chicago

Cisco aironet RSSI values from perl

Post by jimq »

Here is the same thing in Perl.

Just set your /path/to/snmpwalk and set $maxclients to the proper value which is the maximum number of clients to graph. Too high and it might not work.

Code: Select all


#!/usr/bin/perl

die "Usage: $0 community IP\n"
    if  @ARGV !=2;

$maxclients=20;
$loop=0;

@results=`/path/to/snmpwalk -v2c -c $ARGV[0] $ARGV[1] .1.3.6.1.4.1.9.9.273.1.3.1.1.3`;

foreach my $strength (@results) {
   $strength =~ s/.*-(\d\d$)/$1/;
   print "Client $loop: $strength";
   $loop++;
   }

for ($loop .. $maxclients) {
   print "Client $loop: 0\n";                                 
   $loop++
   }


-jim
bei01
Posts: 3
Joined: Thu Apr 20, 2006 11:54 am

Post by bei01 »

Thank you jimq :)
axelilly
Posts: 27
Joined: Thu Aug 04, 2005 12:23 pm

Post by axelilly »

Has anyone gotten this graph to work yet on linux? How does one set up this graph? I'm not sure how you get cacti to graph the several outputs from the script at the same time.
mek1
Cacti User
Posts: 55
Joined: Tue Mar 21, 2006 11:31 am

Post by mek1 »

bump...

has anyone gotten this to run in linux? Just aquired a Cisco Aironet :D
Voiper99
Cacti User
Posts: 276
Joined: Thu Mar 01, 2007 5:43 pm
Location: Melbourne, Australia

Re: Cisco aironet RSSI values from perl

Post by Voiper99 »

jimq wrote:Here is the same thing in Perl.

Just set your /path/to/snmpwalk and set $maxclients to the proper value which is the maximum number of clients to graph. Too high and it might not work.

Code: Select all


#!/usr/bin/perl

die "Usage: $0 community IP\n"
    if  @ARGV !=2;

$maxclients=20;
$loop=0;

@results=`/path/to/snmpwalk -v2c -c $ARGV[0] $ARGV[1] .1.3.6.1.4.1.9.9.273.1.3.1.1.3`;

foreach my $strength (@results) {
   $strength =~ s/.*-(\d\d$)/$1/;
   print "Client $loop: $strength";
   $loop++;
   }

for ($loop .. $maxclients) {
   print "Client $loop: 0\n";                                 
   $loop++
   }


-jim
Thanks for the script translation Jim, it works like a charm. I am curious to know, how does the script keep track of each client? (I am no programmer but would love to know how the script works).
napoleon41
Posts: 4
Joined: Wed Sep 05, 2007 5:42 pm

Post by napoleon41 »

I would like to echo a previous commend about how you graph multiple outputs. . . .

I've been trying for several days to find a way. Anyone who knows the key, some of us would love to be pointed in the right direction.
Voiper99
Cacti User
Posts: 276
Joined: Thu Mar 01, 2007 5:43 pm
Location: Melbourne, Australia

Post by Voiper99 »

I found the answer a while ago and created my own script that does the same thing but in PHP rather than Perl.

The way in which the script works is very simple. The OID is as follows:

.1.3.6.1.4.1.9.9.273.1.3.1.1.3

If you download/look at the Cisco 1100 ap MIB called "CISCO-DOT11-ASSOCIATION-MIB.my" you will see that that OID's description is as follows:

" This is a device-dependent measure of the signal
strength of the most recently received packet from
this client. It may be normalized or unnormalized."

However, this is not entirely true. Personally speaking, with that definition I thought that they meant only one client will be monitored (because of the "most recently received packet" comment). However, this is not true. If you Walk that OID you will see the results for multiple wireless clients (see below) so then all the script needs to do is loop as many times as you want to monitor clients (i.e the max client variable above). Then it stores each of the results into a variable and then graphs it in Cacti.

snmpwalk -v 3 -A <pass> -a MD5 -u <user> -l authnopriv <client_ip> .1.3.6.1.4.1.9.9.273.1.3.1.1.3
SNMPv2-SMI::enterprises.9.9.273.1.3.1.1.3.1.9.84.82.83.45.83.84.79.82.69.0.4.35.96.162.87 = INTEGER: -51
SNMPv2-SMI::enterprises.9.9.273.1.3.1.1.3.1.9.84.82.83.45.83.84.79.82.69.0.160.248.235.243.228 = INTEGER: -61
SNMPv2-SMI::enterprises.9.9.273.1.3.1.1.3.1.9.84.82.83.45.83.84.79.82.69.0.160.248.235.245.65 = INTEGER: -62

As you can see there are only three clients associated to this access point so if I were to set the max clients to 5, two of the results would be 0 until other clients associated to the AP.

Below I have pasted my PHP code. I am no PHP genius but it seems to do the job. The reason for that weired $c = $b - $b - $b; line is to change the result from a negative value to a positive value.

I haven't actually tried my script out yet because my colleague has already implemented the script above but if anyone tries mine out please do let me know how you go.

Code: Select all

#!/usr/bin/php

<?

$a = snmpwalk("$IP", "$community", ".1.3.6.1.4.1.9.9.273.1.3.1.1.3");

$maxclients = 5;
$client = 1;

for ($i = 0; $i < $maxclients; $i++)
{


$b = strstr($a[$i], '-');

if($a[$i] == "")
{
$b = 0;
}

$c = $b - $b - $b;


echo "Client $client: $c";


$client++;
}


?>
napoleon41
Posts: 4
Joined: Wed Sep 05, 2007 5:42 pm

Post by napoleon41 »

Regardless of the script used, I cannot get the script to output onto a graph. I believe I have my datasources setup correctly . . . .

I must just be missing a tiny step somewhere.

Would you mind if I posted screen shots so someone could tell me where I am going wrong?
napoleon41
Posts: 4
Joined: Wed Sep 05, 2007 5:42 pm

Post by napoleon41 »

I decided to post the screen shots anyway. :D
Attachments
Graph Input Item
Graph Input Item
graphtemplateitem.JPG (55.47 KiB) Viewed 37235 times
Graph Template
Graph Template
GraphTemplate.JPG (110.17 KiB) Viewed 37235 times
Data Template
Data Template
DataTemplate.JPG (94.33 KiB) Viewed 37235 times
Date Input Method
Date Input Method
DataInputMethod.JPG (76.69 KiB) Viewed 37235 times
Script Output
Script Output
script output.JPG (7.32 KiB) Viewed 37235 times
Voiper99
Cacti User
Posts: 276
Joined: Thu Mar 01, 2007 5:43 pm
Location: Melbourne, Australia

Post by Voiper99 »

Unfortunately when it comes to graphing the results I cannot help you there. I am still trying to get my head around Cacti's basics. The good news is that judging by your screenshots the script(s) are retrieving your RSSI values.
ibarrere
Posts: 12
Joined: Wed Sep 19, 2007 3:26 pm
Location: Seattle

Post by ibarrere »

This is kind of a bump...

Props to everyone who worked on this, very powerful little script.

Has anybody gotten it to graph properly? The script works, and returns the correct information, but I can't seem to build a graph from that.
shull
Cacti User
Posts: 54
Joined: Thu Aug 24, 2006 1:20 am
Location: South Texas
Contact:

Post by shull »

I could be wrong, but I think you need to eliminate the spaces after the ":" in your output. Make it so the output looks like:

client1:11
client2:3
...

Try that and see if it works. It may not make any difference, but its worth a try.

-Stephen
Voiper99
Cacti User
Posts: 276
Joined: Thu Mar 01, 2007 5:43 pm
Location: Melbourne, Australia

Post by Voiper99 »

shull wrote:I could be wrong, but I think you need to eliminate the spaces after the ":" in your output. Make it so the output looks like:

client1:11
client2:3
...

Try that and see if it works. It may not make any difference, but its worth a try.

-Stephen
If this is correct just replace this line:
echo "Client $client: $c";

With this:
echo "Client $client:$c";
Post Reply

Who is online

Users browsing this forum: No registered users and 23 guests