SNMP::Info::Layer2::C1900 - SNMP Interface to old C1900 Network Switches
Provides abstraction to the configuration information obtainable from a C1900 device through SNMP. See inherited classes' documentation for inherited methods.
Inherits from:
SNMP::Info::Layer2
Required MIBs:
STAND-ALONE-ETHERNET-SWITCH-MIB (ESSWITCH-MIB) MIBs listed in SNMP::Info::Layer2
ESSWITCH-MIB is included in the Version 1 MIBS from Cisco. They can be found at ftp://ftp.cisco.com/pub/mibs/v1/v1.tar.gz
Max Baker (max@warped.org)
max@warped.org
my $c1900 = new SNMP::Info::Layer2::C1900(DestHost => 'mycat1900' , Community => 'public' );
Arguments passed to new() are passed on to SNMP::Session::new()
my $c1900 = new SNMP::Info::Layer2::C1900( DestHost => $host, Community => 'public', Version => 3,... ) die "Couldn't connect.\n" unless defined $c1900;
Sets or returns the SNMP::Session object
# Get my $sess = $c1900->session(); # Set my $newsession = new SNMP::Session(...); $c1900->session($newsession);
Returns 'cisco' :)
Returns reference to map of IIDs to current link duplex
Crosses $c1900->c1900_p_index() with $c1900->c1900_p_duplex;
Returns reference to hash of IIDs to admin duplex setting
Crosses $c1900->c1900_p_index() with $c1900->c1900_p_duplex_admin;
Returns reference to hash of IID to port type
Takes the default ifType and overrides it with
c1900_p_type() and c1900_p_media() if they exist.
Maps the Switch Port Table to the IID
swPortIfIndex
Gives Port Duplex Info
swPortDuplexStatus
Gives admin setting for Duplex Info
swPortFullDuplex
Gives human set name for port
swPortName
Gives Admin status of port enabled.
swPortAdminStatus
Gives Type of port, ie. "general-ethernet"
swPortMediaCapability
Gives the media of the port , ie "fiber-sc"
swPortConnectorType
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.