SNMP::Info::Layer2::Catalyst - SNMP Interface to Cisco Catalyst devices running Catalyst OS.
Max Baker
# Let SNMP::Info determine the correct subclass for you. my $cat = new SNMP::Info( AutoSpecify => 1, Debug => 1, DestHost => 'myswitch', Community => 'public', Version => 2 ) or die "Can't connect to DestHost.\n";
my $class = $cat->class(); print "SNMP::Info determined this device to fall under subclass : $class\n";
SNMP::Info subclass to provide information for Cisco Catalyst series switches running CatOS.
This class includes the Catalyst 2920, 4000, 5000, 6000 (hybrid mode) families.
This subclass is not for all devices that have the name Catalyst. Note that some Catalyst switches run IOS, like the 2900 and 3550 families. Cisco Catalyst 1900 switches use their own MIB and have a separate subclass. Use the method above to have SNMP::Info determine the appropriate subclass before using this class directly.
See SNMP::Info::device_type() for specifics.
Note: Some older Catalyst switches will only talk SNMP version 1. Some newer ones will not return all their data if connected via Version 1.
For speed or debugging purposes you can call the subclass directly, but not after determining a more specific class using the method above.
my $cat = new SNMP::Info::Layer2::Catalyst(...);
See Required MIBs in the SNMP::Info::CiscoStack manpage for its own MIB requirements.
See Required MIBs in the SNMP::Info::CiscoVTP manpage for its own MIB requirements.
See Required MIBs in the SNMP::Info::CDP manpage for its own MIB requirements.
See Required MIBs in the SNMP::Info::CiscoStats manpage for its own MIB requirements.
See Required MIBs in the SNMP::Info::CiscoPortSecurity manpage for its own MIB requirements.
See Required MIBs in the SNMP::Info::Layer2 manpage for its own MIB requirements.
These MIBs are found in the standard v2 MIBs from Cisco.
These are methods that return scalar value from SNMP
os()
Returns 'catalyst'
os_ver()
Tries to use the value from SNMP::Info::CiscoStats->os_ver()
and if it fails
it grabs $cat->m_swver()->{1} and uses that.
vendor()
Returns 'cisco'
cisco_comm_indexing()
Returns 1. Use vlan indexing.
See documentation in GLOBALS in the SNMP::Info::CiscoStack manpage for details.
See documentation in GLOBALS in the SNMP::Info::CiscoVTP manpage for details.
See documentation in GLOBALS in the SNMP::Info::CDP manpage for details.
See documentation in GLOBALS in the SNMP::Info::CiscoStats manpage for details.
See documentation in GLOBALS in the SNMP::Info::CiscoPortSecurity manpage for details.
See documentation in GLOBALS in the SNMP::Info::Layer2 manpage for details.
These are methods that return tables of information in the form of a reference to a hash.
interfaces()
Returns the map between SNMP Interface Identifier (iid) and physical port name.
i_name()
Returns reference to hash of iid to human set name.
portName
i_physical()
Returns a map to IID for ports that are physical ports, not vlans, etc.
bp_index()
Returns reference to hash of bridge port table entries map back to interface identifier (iid)
Crosses (portCrossIndex
) to (portIfIndex
) since some devices seem to
have problems with BRIDGE-MIB
See documentation in TABLE METHODS in the SNMP::Info::CiscoStack manpage for details.
See documentation in TABLE METHODS in the SNMP::Info::CiscoVTP manpage for details.
See documentation in TABLE METHODS in the SNMP::Info::CDP manpage for details.
See documentation in TABLE METHODS in the SNMP::Info::CiscoStats manpage for details.
See documentation in TABLE METHODS in the SNMP::Info::CiscoPortSecurity manpage for details.
See documentation in TABLE METHODS in the SNMP::Info::Layer2 manpage for details.