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::CiscoStack
  • SNMP::Info::Layer3::CiscoSwitch

πŸ“š Required MIBs

Inherited Classes' MIBs

  • See "Required MIBs" in SNMP::Info::CiscoStack for its own MIB requirements.
  • See "Required MIBs" in SNMP::Info::Layer3::CiscoSwitch for 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 of iid to 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 of iid to 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 the or die bestie β€” 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