SNMP::...::C3550(3pm)
π SNMP::...::C3550 β bestie's guide to teaching Perl about Cisco Catalyst 3550s π
okay so. this is SNMP::Info::Layer3::C3550, girlie. that's the SNMP Interface to Cisco Catalyst 3550 Layer 2/3 Switches running IOS. yes it lives in the SNMP::...::C3550(3pm) perl manual section, and yes we're gonna get through all of it together. grab a snack π
π AUTHOR
Max Baker
(we stan. the icon who did this.)
β¨ SYNOPSIS β¨
the whole vibe here is: don't hardcode the subclass, let the module figure it out for you. main character energy fr.
# Let SNMP::Info determine the correct subclass for you.
my $c3550 = new SNMP::Info(
AutoSpecify => 1,
Debug => 1,
# These arguments are passed directly to SNMP::Session
DestHost => 'myswitch',
Community => 'public',
Version => 2
)
or die "Can't connect to DestHost.\n";
my $class = $c3550->class();
print "SNMP::Info determined this device to fall under subclass : $class\n";
so like, AutoSpecify => 1 and Debug => 1 are chilling up there, and then the rest β DestHost, Community, Version β get passed directly to SNMP::Session. and if the connect flops, we die "Can't connect to DestHost.\n" no cap, that's literally the message. π
πΈ DESCRIPTION πΈ
It's the abstraction subclass for Cisco Catalyst 3550 Layer 2/3 Switches. periodt.
here's the tea though β these devices run IOS, but they lowkey share some DNA with the Catalyst WS-C family (5xxx, 6xxx). like, forwarding tables live inside VLANs, and the extended interface info gets gleaned from CISCO-SWITCH-MIB. it's giving "IOS but also catalyst-coded" π
𧬠Inherited Classes
SNMP::Info::CiscoStackSNMP::Info::Layer3::CiscoSwitch
π Required MIBs
Inherited Classes' MIBs
- See "Required MIBs" in
SNMP::Info::CiscoStackfor its own MIB requirements. - See "Required MIBs" in
SNMP::Info::Layer3::CiscoSwitchfor its own MIB requirements.
like, both of your parents have their own MIB needs, you gotta go read theirs too. π«Ά
β GLOBALS β
these are methods that return a scalar value from SNMP. one value, one vibe, no tables here.
$c3550->vendor()β Returns'cisco'. that's it. that's the answer. π$c3550->model()β Will take the translated model number and try to format it better. so like:
355048 -> 3550-48
355012G -> 3550-12G
she's just adding a lil hyphen, makeup on, iconic. β¨
$c3550->ports()β Tries to cull the number of ports from the model number. detective work ngl π
π Globals imported from SNMP::Info::CiscoStack
See documentation in "GLOBALS" in SNMP::Info::CiscoStack for details.
π Globals imported from SNMP::Info::Layer3::CiscoSwitch
See documentation in "GLOBALS" in SNMP::Info::Layer3::CiscoSwitch for details.
π TABLE METHODS π
these ones return tables of info, in the form of a reference to a hash. so much data, so organized, obsessed.
π₯ Overrides
$c3550->i_duplex()β Returns reference to hash ofiidto current link duplex setting.
Here's the situation: software version 12.1(22)EA1a or greater returns duplex based upon the result of $c3550->el_duplex(). Otherwise it uses the result of the call to CiscoStack::i_duplex().
See SNMP::Info::EtherLike for el_duplex() method and SNMP::Info::CiscoStack for its i_duplex() method.
$c3550->i_duplex_admin()β Returns reference to hash ofiidto administrative duplex setting.
Same energy, different flag: software version 12.1(22)EA1a or greater returns duplex based upon the result of $c3550->p_duplex(). Otherwise it uses the result of the call to CiscoStack::i_duplex().
See SNMP::Info::CiscoStack for its i_duplex() and p_duplex() methods.
$c3550->set_i_duplex_admin(duplex, ifIndex)β Sets port duplex, must be supplied with duplex and port"ifIndex".
Speed choices are 'auto', 'half', 'full'. pick your fighter π
Crosses $c3550->p_port() with $c3550->p_duplex() to utilize port "ifIndex".
Example:
my %if_map = reverse %{$c3550->interfaces()};
$c3550->set_i_duplex_admin('auto', $if_map{'FastEthernet0/1'})
or die "Couldn't change port duplex. ",$c3550->error(1);
β οΈ note theor diebestie β if you don't check, you will simply not know it failed.$c3550->error(1)is your safety net, use it. π
π Table Methods imported from SNMP::Info::CiscoStack
See documentation in "TABLE METHODS" in SNMP::Info::CiscoStack for details.
π Table Methods imported from SNMP::Info::Layer3::CiscoSwitch
See documentation in "TABLE METHODS" in SNMP::Info::Layer3::CiscoSwitch for details.
π§ and that's the whole page, you ate it. this doc is from perl v5.40.1, dated 2026-02-28, and it ships as part of the User Contributed Perl Documentation for SNMP::...::C3550(3pm). slay, go configure a switch, mwah π π¦
π¦ 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