Skip to Main Content
Essential SNMP, 2nd Edition
book

Essential SNMP, 2nd Edition

by Douglas Mauro, Kevin Schmidt
September 2005
Beginner content levelBeginner
462 pages
12h 56m
English
O'Reilly Media, Inc.
Content preview from Essential SNMP, 2nd Edition

Wireless Networking

This section will show how to gather management statistics from wireless access points using the 802.11 MIB. The IEEE 802.11 MIB is freely available from many sites, including http://www.cs.ucla.edu/~hywong1/doc/IEEE802dot11-MIB.my. The MIB itself is pretty dense. A detailed discussion of this MIB is beyond the scope of this chapter. Instead, we will present a script that can gather certain data points from your WAP. Consider the following script.

 #!/usr/bin/perl use SNMP; $SNMP::use_sprint_value = 1; &SNMP::loadModules('IEEE802dot11-MIB'); my $host = "192.168.1.4"; my $sess = new SNMP::Session(DestHost => $host, Version => 2, Community => "public"); my %wapStats; my $var = new SNMP::Varbind(['dot11CurrentChannel']); do { $val = $sess->getnext($var); my $channel = $var->[$SNMP::Varbind::val_f]; my $ifIndex = $var->[$SNMP::Varbind::iid_f]; my($ssid, $mac, $manufacturer, $model, $rtsFailureCount, $ackFailureCount, $fcsErrorCount) = $sess->get([ ['dot11DesiredSSID',$ifIndex], ['dot11MACAddress',$ifIndex], ['dot11ManufacturerID',$ifIndex], ['dot11ProductID',$ifIndex], ['dot11RTSFailureCount',$ifIndex], ['dot11ACKFailureCount',$ifIndex], ['dot11FCSErrorCount',$ifIndex] ]); $wapStats{$ifIndex} = "$channel,$ssid,$mac,$manufacturer," $wapStats{$ifIndex} .= "$model,$rtsFailureCount,$ackFailureCount,$fcs ErrorCount"; }unless($sess->{ErrorNum}); foreach my $key (sort keys %wapStats){ my($channel, $ssid, $mac, $manufacturer, $model, $rtsFailureCount, $ackFailureCount, $fcsErrorCount) ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Essential SNMP

Essential SNMP

Douglas Mauro, Kevin Schmidt
UNIX and Linux System Administration Handbook, 5th Edition

UNIX and Linux System Administration Handbook, 5th Edition

Trent R. Hein, Evi Nemeth, Garth Snyder, Ben Whaley, Dan Mackin

Publisher Resources

ISBN: 0596008406Supplemental ContentErrata Page