NAME
SNMP::Info::Layer3 - Perl5 Interface to network devices using Layer3
DESCRIPTION
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
AUTHOR
Max Baker (max@warped.org
)
SYNOPSIS
my $l3 = new SNMP::Info::Layer3(DestHost => 'router' ,
Community => 'public' );
CREATING AN OBJECT
- new SNMP::Info::Layer3()
-
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;
- $l3->session()
-
Sets or returns the SNMP::Session object
# Get my $sess = $l3->session(); # Set my $newsession = new SNMP::Session(...); $l3->session($newsession);
GLOBALS
- $l3->mac()
-
Returns root port mac address
(ifPhysAddress.1)
- $l3->chassis()
-
Returns Chassis type (model).
(entPhysicalDescr.1)
- $l3->serial()
-
Trys to cull a serial number from $l3->chassis()
- $l3->model()
-
Trys to reference $l3->id() to one of the product MIBs listed above
Removes 'cisco' from cisco devices for readability.
- $l3->vendor()
-
Trys to cull a Vendor name from sysDescr
TABLE ENTRIES
Overrides
- $l3->interfaces()
-
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()
- $l3->i_ignore()
-
Returns reference to hash. Creates a key for each IID that should be ignored.
Currently looks for tunnel,loopback,lo,null from $l3->interfaces()
- $l3->i_name()
-
Returns reference to hash of iid to human set name.
Defaults to ifName, but checks for an ifAlias
- $l3->i_duplex()
-
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.