SNMP::...talyst(3pm)
πΈ SNMP::Info::Layer2::Catalyst π
okay bestie, so this is a User Contributed Perl Documentation page for the SNMP::Info::Layer2::Catalyst module β aka the SNMP Interface to Cisco Catalyst devices running Catalyst OS. she's a real one. π«Ά
β¨ NAME β¨
SNMP::Info::Layer2::Catalyst β the SNMP Interface to Cisco Catalyst devices running Catalyst OS. periodt. π
π AUTHOR π
Max Baker π
β¨ SYNOPSIS β¨
ngl, here's the whole vibe β let SNMP::Info figure out the right subclass for you, no cap:
# 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";
π¦ DESCRIPTION π¦
okay so SNMP::Info subclass whose whole job is providing info for Cisco Catalyst series switches running CatOS. slay. π
This class includes the Catalyst 2920, 4000, 5000, 6000 (hybrid mode) families. iconic lineup fr fr.
β οΈ but bestie listen β this subclass is not for every device that has the name Catalyst. Not me having to be the bearer of bad news π
Some Catalyst switches run IOS, like the 2900 and 3550 families. And the Cisco Catalyst 1900 switches use their own MIB and have a separate subclass. So before you use this class directly, use the method above and let SNMP::Info determine the appropriate subclass. pls. π
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. so... pick your struggle, i guess π
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(...);
π Inherited Classes
SNMP::Info::Layer2::CiscoSNMP::Info::CiscoStack
πΈ Required MIBs
π Inherited Classes' MIBs
- See "Required MIBs" in
SNMP::Info::Layer2::Ciscofor its own MIB requirements. - See "Required MIBs" in
SNMP::Info::CiscoStackfor its own MIB requirements.
These MIBs are found in the standard v2 MIBs from Cisco. π
β¨ GLOBALS β¨
These are methods that return scalar value from SNMP. simple as that bestie.
$cat->os()β Returns'catalyst'π¦$cat->os_ver()β Tries to use the value fromSNMP::Info::CiscoStats->os_ver()and if it fails it grabs$cat->m_swver()->{1}and uses that. backup plan queen π$cat->vendor()β Returns'cisco'$cat->cisco_comm_indexing()β Returns1. Use vlan indexing. π«Ά
π Global Methods imported from SNMP::Info::Layer2::Cisco
See documentation in "GLOBALS" in SNMP::Info::Layer2::Cisco for details.
π Global Methods imported from SNMP::Info::CiscoStack
See documentation in "GLOBALS" in SNMP::Info::CiscoStack for details.
π₯ TABLE METHODS π₯
These are methods that return tables of information in the form of a reference to a hash. yes, hashes. we love her. π
β Overrides
$cat->interfaces()β Returns the map between SNMP Interface Identifier (iid) and physical port name.$cat->i_name()β Returns reference to hash of iid to human set name. Uses"portName"β¨$cat->i_physical()β Returns a map to IID for ports that are physical ports, not vlans, etc. no fake ones allowed π«$cat->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. dramatic much π
π Table Methods imported from SNMP::Info::Layer2::Cisco
See documentation in "TABLE METHODS" in SNMP::Info::Layer2::Cisco for details.
π Table Methods imported from SNMP::Info::CiscoStack
See documentation in "TABLE METHODS" in SNMP::Info::CiscoStack for details.
and that's the whole page bestie, you ate that. mwah π
this lil masterpiece is riding with perl v5.40.1, dated 2026-02-28 β so if you're reading it, yes, the future is now and she's still serving. πβ¨
π¦ where this page comes from
- ubuntu stonking: libsnmp-info-perl 3.975000-1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms