SNMP::Info
SNMP::Info is a Perl5 Module that provides an object-oriented interface to Network Devices and data stored in SNMP MIBs.Links
Download Device Compatibility Matrix Support Synopsis DocumentationSource Forge Project Page Netdisco CVS Repository CPAN FreshMeat Entry
Credits

Currently being maintained by team of Open Source authors headed by Eric Miller (jeneric) and Bill Fenner (fenner)
Synopsis
use SNMP::Info;
my $info = new SNMP::Info(
# Auto Discover more specific Device Class
AutoSpecify => 1,
Debug => 1,
# The rest is passed to SNMP::Session
DestHost => 'router',
Community => 'public',
Version => 2
) or die "Can't connect to device.\n";
my $err = $info->error();
die "SNMP Community or Version probably wrong connecting to device. $err\n" if defined $err;
$name = $info->name();
$class = $info->class();
print "SNMP::Info is using this device class : $class\n";
# Find out the Duplex status for the ports
my $interfaces = $info->interfaces();
my $i_duplex = $info->i_duplex();
# Get CDP Neighbor info
my $c_if = $info->c_if();
my $c_ip = $info->c_ip();
my $c_port = $info->c_port();
# Print out data per port
foreach my $iid (keys %$interfaces){
my $duplex = $i_duplex->{$iid};
# Print out physical port name, not snmp iid
my $port = $interfaces->{$iid};
print "$port: ";
print "$duplex duplex" if defined $duplex;
# The CDP Table has table entries different than the interface tables.
# So we use c_if to get the map from cdp table to interface table.
my %c_map = reverse %$c_if;
my $c_key = $c_map{$iid};
unless (defined $c_key) {
print "\n\n";
next;
}
my $neighbor_ip = $c_ip->{$c_key};
my $neighbor_port = $c_port->{$c_key};
print " connected to $neighbor_ip / $neighbor_port\n" if defined $neighbor_ip;
print "\n";
}
Support
Please direct all support, help, and bug requests to the SNMP::Info Mailling List
Documentation and SubClasses
See the README for starters.Class Documentation:
-
- SNMP::Info - Object Oriented Perl5 Interface to Network devices and MIBs through SNMP.
- Info/
- SNMP::Info::Airespace - SNMP Interface to data from AIRESPACE-WIRELESS-MIBand AIRESPACE-SWITCHING-MIB
- SNMP::Info::Bridge - SNMP Interface to SNMP data available through theBRIDGE-MIB
- SNMP::Info::CDP - SNMP Interface to Cisco Discovery Protocol using SNMP
- SNMP::Info::CiscoConfig - SNMP Interface to Cisco Configuration Files
- SNMP::Info::CiscoImage - SNMP Interface to image strings for Cisco Devices
- SNMP::Info::CiscoPortSecurity - SNMP Interface to data fromCISCO-PORT-SECURITY-MIB and CISCO-PAE-MIB
- SNMP::Info::CiscoPower - SNMP Interface to data stored inCISCO-POWER-ETHERNET-EXT-MIB.
- SNMP::Info::CiscoQOS - SNMP Interface to Cisco's Quality of Service MIBs
- SNMP::Info::CiscoRTT - SNMP Interface to Cisco's Round Trip Time MIBs
- SNMP::Info::CiscoStack - SNMP Interface to data from CISCO-STACK-MIB andCISCO-PORT-SECURITY-MIB
- SNMP::Info::CiscoStats - Perl5 Interface to CPU and Memory stats for CiscoDevices
- SNMP::Info::CiscoStpExtensions - SNMP Interface to C<CISCO-STP-EXTENSIONS-MIB
- SNMP::Info::CiscoVTP - SNMP Interface to Cisco's VLAN Management MIBs
- SNMP::Info::Entity - SNMP Interface to data stored in ENTITY-MIB. RFC 2737
- SNMP::Info::EtherLike - SNMP Interface to SNMP ETHERLIKE-MIB RFC 1398
- SNMP::Info::FDP - SNMP Interface to Foundry Discovery Protocol usingSNMP
- SNMP::Info::IEEE802dot11 - SNMP Interface to data from IEEE802dot11-MIB
- SNMP::Info::LLDP - SNMP Interface to the Link Layer Discovery Protocol
- SNMP::Info::Layer1 - SNMP Interface to network devices serving Layer1 only.
- SNMP::Info::Layer2 - SNMP Interface to network devices serving Layer2 only.
- SNMP::Info::Layer3 - SNMP Interface to network devices serving Layer3 orLayers 2 & 3
- SNMP::Info::MAU - SNMP Interface to Medium Access Unitvia SNMP
- SNMP::Info::NortelStack - SNMP Interface to the Nortel S5-AGENT-MIB andS5-CHASSIS-MIB
- SNMP::Info::PowerEthernet - SNMP Interface to data stored inPOWER-ETHERNET-MIB.
- SNMP::Info::RapidCity - SNMP Interface to the Nortel RapidCity MIB
- SNMP::Info::SONMP - SNMP Interface to SynOptics Network Management Protocol
- Info/Layer1/
- SNMP::Info::Layer1::Allied - SNMP Interface to old Allied Hubs
- SNMP::Info::Layer1::Asante - SNMP Interface to old Asante 1012 Hubs
- SNMP::Info::Layer1::Bayhub - SNMP Interface to Bay / Nortel Hubs
- SNMP::Info::Layer1::Cyclades - SNMP Interface to Cyclades terminal servers
- SNMP::Info::Layer1::S3000 - SNMP Interface to Synoptics / Nortel Hubs
- Info/Layer2/
- SNMP::Info::Layer2::Airespace - SNMP Interface to Cisco WirelessControllers
- SNMP::Info::Layer2::Aironet - SNMP Interface to Cisco Aironet devices runningIOS.
- SNMP::Info::Layer2::Allied - SNMP Interface to Allied Telesyn switches
- SNMP::Info::Layer2::Aruba - SNMP Interface to Aruba wireless switches
- SNMP::Info::Layer2::Bay - SNMP Interface to old Bay Network BayStack Switches
- SNMP::Info::Layer2::Baystack - SNMP Interface to Nortel EthernetSwitches
- SNMP::Info::Layer2::C1900 - SNMP Interface to data from Cisco Catalyst 1900Network Switches running CatOS
- SNMP::Info::Layer2::C2900 - SNMP Interface to Cisco Catalyst 2900 Switchesrunning IOS
- SNMP::Info::Layer2::Catalyst - SNMP Interface to Cisco Catalyst devicesrunning Catalyst OS.
- SNMP::Info::Layer2::Centillion - SNMP Interface to Nortel Centillion basedATM Switches
- SNMP::Info::Layer2::Cisco - SNMP Interface to L3 and L2+L3 IOS Cisco Devicethat are not covered in other classes.
- SNMP::Info::Layer2::Foundry - SNMP Interface to Foundry FastIron NetworkDevices
- SNMP::Info::Layer2::HP - SNMP Interface to HP Procurve Switches
- SNMP::Info::Layer2::N2270 - SNMP Interface to Nortel 2270 Series WirelessSwitch
- SNMP::Info::Layer2::NAP222x - SNMP Interface to Nortel 2220 Series AccessPoints
- SNMP::Info::Layer2::Netgear - SNMP Interface to Netgear switches
- SNMP::Info::Layer2::Orinoco - SNMP Interface to Orinoco Series Access Points
- SNMP::Info::Layer2::ZyXEL_DSLAM - SNMP Interface to ZyXEL DSLAM
- Info/Layer3/
- SNMP::Info::Layer3::Aironet - Perl5 Interface to Cisco Aironet WirelessDevices running Aironet software, not IOS
- SNMP::Info::Layer3::AlcatelLucent - SNMP Interface to Alcatel-Lucent OmniSwitch
- SNMP::Info::Layer3::AlteonAD - SNMP Interface to Nortel Alteon Layer 2-7Switches.
- SNMP::Info::Layer3::Altiga - SNMP Interface to Cisco VPN concentrators
- SNMP::Info::Layer3::Arista - SNMP Interface to Arista Networks EOS
- SNMP::Info::Layer3::BayRS - SNMP Interface to Nortel routers running BayRS.
- SNMP::Info::Layer3::C3550 - SNMP Interface to Cisco Catalyst 3550 Layer 2/3Switches running IOS
- SNMP::Info::Layer3::C4000 - SNMP Interface to Cisco Catalyst 4000 Layer 2/3Switches running IOS
- SNMP::Info::Layer3::C6500 - SNMP Interface to Cisco Catalyst 6500 Layer 2/3Switches running IOS and/or CatOS
- SNMP::Info::Layer3::Cisco - SNMP Interface to L3 and L2+L3 IOS Cisco Devicethat are not covered in other classes.
- SNMP::Info::Layer3::Contivity - SNMP Interface to Nortel VPN Routers.
- SNMP::Info::Layer3::Dell - SNMP Interface to Dell Power Connect NetworkDevices
- SNMP::Info::Layer3::Enterasys - SNMP Interface to Enterasys Network Devices
- SNMP::Info::Layer3::Extreme - Perl5 Interface to Extreme Network Devices
- SNMP::Info::Layer3::Foundry - SNMP Interface to Foundry Network Devices
- SNMP::Info::Layer3::HP9300 - SNMP Interface to HP Foundry OEM Network Devices
- SNMP::Info::Layer3::Juniper - SNMP Interface to L3 Juniper Devices
- SNMP::Info::Layer3::Microsoft - SNMP Interface to L3 Microsoft Windows router
- SNMP::Info::Layer3::N1600 - SNMP Interface to Nortel 16XX Network Devices
- SNMP::Info::Layer3::NetSNMP - SNMP Interface to L3 Net-SNMP Devices
- SNMP::Info::Layer3::Netscreen - SNMP Interface to Juniper Netscreen Devices
- SNMP::Info::Layer3::Passport - SNMP Interface to modular Nortel Ethernet RoutingSwitches
- SNMP::Info::Layer3::Sun - SNMP Interface to L3 Sun Solaris
- SNMP::Info::Layer3::Timetra - SNMP Interface to Alcatel-Lucent SR
Generated by tree.pl
on 2009-06-13.