NAME
SNMP::Info::Layer2 - Perl5 Interface to Layer2 network devices.
DESCRIPTION
Provides abstraction to the configuration information obtainable from a Layer2 device through SNMP. Information is stored in a number of MIBs.
See super classes for descriptions of other available methods.
Inherits from:
SNMP::Info
SNMP::Info::Bridge
SNMP::Info::CDP
MIBS:
CISCO-PRODUCTS-MIB - Needed for ID of Cisco Products
CISCO-STACK-MIB - Needed for ID of Cisco Products
##HP-ICF-OID - Needed for ID of HP Products
MIBS listed in SNMP::Info::Bridge and SNMP::Info::CDP
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 $l2 = new SNMP::Info::Layer2(DestHost => 'mybridge' ,
Community => 'public' );
CREATING AN OBJECT
- new SNMP::Info::Layer2()
-
Arguments passed to new() are passed on to SNMP::Session::new()
my $l2 = new SNMP::Info::Layer2( DestHost => $host, Community => 'public', Version => 3,... ) die "Couldn't connect.\n" unless defined $l2;
- $l2->session()
-
Sets or returns the SNMP::Session object
# Get my $sess = $l2->session(); # Set my $newsession = new SNMP::Session(...); $l2->session($newsession);
GLOBALS
- $l2->model()
-
Cross references $l2->id() with product IDs in the Cisco and HP specific MIBs.
For HP devices, removes 'hpswitch' from the name
For Cisco devices, removes 'sysid' from the name
- $l2->vendor()
-
Trys to discover the vendor from $l2->model() and $l2->vendor()
TABLE ENTRIES
Overrides
- $l2->interfaces()
-
Creates a map between the interface identifier (iid) and the physical port name.
Defaults to ifDescr but checks and overrides with ifName
- $l2->i_ignore()
-
Returns reference to hash. Increments value of IID if port is to be ignored.
Ignores ports with ifType of loopback,propvirtual,other, and cpu