SNMP::Info::Layer2::C1900 - Perl5 Interface to SNMP data from Cisco Catlyst 1900 Network Switches running CatOS
Max Baker (max@warped.org)
# Let SNMP::Info determine the correct subclass for you.
my $c1900 = new SNMP::Info(
AutoSpecify => 1,
Debug => 1,
# These arguments are passed directly on to SNMP::Session
DestHost => 'myswitch',
Community => 'public',
Version => 1
)
or die "Can't connect to DestHost.\n";
my $class = $c1900->class(); print "SNMP::Info determined this device to fall under subclass : $class\n";
Provides abstraction to the configuration information obtainable from a Catalyst 1900 device through SNMP. See SNMP::Info for full documentation
Note that most of these devices only talk SNMP version 1, but not all.
For speed or debugging purposes you can call the subclass directly, but not after determining a more specific class using the method above.
my $c1900 = new SNMP::Info::Layer2::C1900(...);
They can be found at ftp://ftp.cisco.com/pub/mibs/v1/v1.tar.gz
These are methods that return scalar value from SNMP
c1900_flash_status()os_ver()
STAND-ALONE-ETHERNET-SWITCH-MIB::upgradeFlashBankStatus
os()os_ver()os_ver() . If that fails then it
checks for the presence of $c1900->c1900_flash_status() and culls
the version from there.
vendor()
See documentation in SNMP::Info::Layer2 for details.
i_duplex()Crosses $c1900->c1900_p_index() with $c1900->c1900_p_duplex;
i_duplex_admin()Crosses $c1900->c1900_p_index() with $c1900->c1900_p_duplex_admin;
i_name()c1900_p_name() and returns the human set port name if exists.
i_type()Takes the default ifType and overrides it with
c1900_p_type() and c1900_p_media() if they exist.
c1900_p_index()swPortIfIndex
c1900_p_duplex()swPortDuplexStatus
c1900_p_duplex_admin()swPortFullDuplex
c1900_p_name()swPortName
c1900_p_up_admin()swPortAdminStatus
c1900_p_type()swPortMediaCapability
c1900_p_media()swPortConnectorType
See documentation in SNMP::Info::Layer2 for details.