SNMP::Info::Layer3 - Perl5 Interface to network devices using Layer3
Provides generic methods for accessing SNMP data for Layer 3 network devices. Includes support for Layer2+3 devices. See super classes for other inherited methods.
Inherits from:
SNMP::Info SNMP::Info::Bridge SNMP::Info::CDP SNMP::Info::EtherLike
Required MIBs:
ENTITY-MIB - For model identification CISCO-PRODUCTS-MIB - For model identification HP-ICF-OID - For model identification MIBS listed in SNMP::Info::CDP, SNMP::Info::Bridge, and SNMP::Info::Etherlike
Cisco MIBs can be found at ftp://ftp.cisco.com/pub/mibs/v2/v2.tar.gz
HP MIBs can be found at http://www.hp.com/rnd/software
Max Baker (max@warped.org)
max@warped.org
my $l3 = new SNMP::Info::Layer3(DestHost => 'router' , Community => 'public' );
Arguments passed to new() are passed on to SNMP::Session::new()
my $l3 = new SNMP::Info::Layer3( DestHost => $host, Community => 'public', Version => 3,... ) die "Couldn't connect.\n" unless defined $l3;
Sets or returns the SNMP::Session object
# Get my $sess = $l3->session(); # Set my $newsession = new SNMP::Session(...); $l3->session($newsession);
Returns root port mac address
(ifPhysAddress.1)
Returns Chassis type (model).
(entPhysicalDescr.1)
Trys to cull a serial number from $l3->chassis()
Trys to reference $l3->id() to one of the product MIBs listed above
Removes 'cisco' from cisco devices for readability.
Trys to cull a Vendor name from sysDescr
Returns the map between SNMP Interface Identifier (iid) and physical port name.
Only returns those iids that have a description listed in $l3->i_description()
Returns reference to hash. Creates a key for each IID that should be ignored.
Currently looks for tunnel,loopback,lo,null from $l3->interfaces()
Returns reference to hash of iid to human set name.
Defaults to ifName, but checks for an ifAlias
Returns reference to hash of iid to current link duplex setting.
Maps $l3->el_index() to $l3->el_duplex, then culls out full,half, or auto and sets the map to that value.
see SNMP::Info::Etherlike for the el_index() and el_duplex() methods.
Returns reference to map of IID to Arp Cache Entry
(atIfIndex)
Returns reference to hash of Arp Cache Entries to MAC address
(atPhysAddress)
Returns reference to hash of Arp Cache Entries to IP Address
(atNetAddress)
To install SNMP::Info, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SNMP::Info
CPAN shell
perl -MCPAN -e shell install SNMP::Info
For more information on module installation, please visit the detailed CPAN module installation guide.