SNMP::...Lenovo(3pm)

πŸ’– SNMP::Info::Layer3::Lenovo πŸ’–

okay bestie, gather round, because we're talking about SNMP::Info::Layer3::Lenovo β€” the SNMP interface to Lenovo switches running CNOS. yes, that CNOS. the Lenovo one. slay. πŸ’…

This page lives in the User Contributed Perl Documentation corner of your man pages, and honestly? iconic.


✨ AUTHORS ✨

Nick Nauwelaerts wrote this. thank you Nick, we owe you our lives 🫢


πŸ¦‹ SYNOPSIS πŸ¦‹

the classic "let SNMP::Info figure out which subclass you actually need" move:

# Let SNMP::Info determine the correct subclass for you.
use SNMP::Info;
my $cnos = new SNMP::Info(
                         AutoSpecify => 1,
                         Debug       => 1,
                         DestHost    => 'myrouter',
                         Community   => 'public',
                         Version     => 2
                       )
   or die "Can't connect to DestHost.\n";
my $class = $cnos->class();
print "SNMP::Info determined this device to fall under subclass : $class\n";

literally just hand it the vibes (AutoSpecify => 1) and it goes and sniffs out the right subclass for you. main character energy fr fr ✨


🌸 DESCRIPTION 🌸

It's a subclass for Lenovo switches running CNOS. that's the whole assignment. she does it well. πŸ’…

🌈 Inherited Classes

  • SNMP::Info::IEEE802dot3ad
  • SNMP::Info::Layer3

she's built different because she's built on those two. periodt.

πŸ“ Required MIBs

  • LENOVO-ENV-MIB
  • LENOVO-PRODUCTS-MIB

no MIBs, no info. these are non-negotiable bestie.

🧚 Inherited Classes' MIBs

See SNMP::Info::IEEE802dot3ad for its own MIB requirements.

See SNMP::Info::Layer3 for its own MIB requirements.

(go check those pages, they have their own whole list, we're not gonna duplicate it here πŸ’€)


πŸ‘‘ GLOBALS πŸ‘‘

these are methods that return scalar values straight from SNMP. one value, no table, just a little guy.

  • $cnos->mac() β€” returns the base mac, and she gets it from dot1dBaseBridgeAddress. the classic source. πŸ’–
  • $cnos->os_ver() β€” returns the OS version, extracted from entPhysicalSoftwareRev.1. yes, specifically .1. don't ask, it's just where it lives.

πŸ”₯ Overrides

  • $cnos->vendor() β€” returns 'lenovo'. shocking, I know. 😭
  • $cnos->os() β€” returns 'cnos'. also shocking. the consistency?? we love to see it.

🌟 Globals imported from SNMP::Info::IEEE802dot3ad

See documentation in SNMP::Info::IEEE802dot3ad for details.

πŸ’œ Globals imported from SNMP::Info::Layer3

See documentation in SNMP::Info::Layer3 for details.


πŸŽ€ TABLE ENTRIES πŸŽ€

these return tables of information, i.e. a reference to a hash. so much data. so much structure. obsessed.

  • $cnos->agg_ports_cnos() β€” placeholder function 🫠 it will return the agg_ports mapping once it's implemented. so like… not yet bestie. it's giving "coming soon". don't build your whole monitoring stack on it, ngl.

πŸ’… Overrides

  • $cnos->i_description() β€” uses ifName, to match most other devices. consistency queen πŸ‘‘
  • $cnos->i_name() β€” uses ifDescr, to match most other devices. again: consistency. we love her.
  • $cnos->i_speed() β€” CNOS does not set ifSpeed to 4294967295 for high speed links, so this returns orig_if_speed_high() instead. good news: SNMP::Info will handle this correctly. so you don't have to panic. breathe. 🧘
  • $cnos->i_speed_raw() β€” if ifSpeedHigh is > 2500, we overwrite i_speed_raw(), using the formula: ifSpeedHigh * 1_000_000. math? in my manpage? more likely than you think. ✨

πŸ¦‹ Table Methods imported from SNMP::Info::IEEE802dot3ad

See documentation in SNMP::Info::IEEE802dot3ad for details.

🌈 Table Methods imported from SNMP::Info::Layer3

See documentation in SNMP::Info::Layer3 for details.


reminder bestie: if a thing says "placeholder", it is a placeholder. do not come for me when it returns nothing. 😭

and that's the page!! you understood the whole thing, I'm so proud πŸ₯ΉπŸ’– this was SNMP::...Lenovo(3pm) from perl v5.40.1, dated 2026-02-28, living under User Contributed Perl Documentation. go forth and poll some switches, queen πŸ‘‘βœ¨

πŸ“¦ where this page comes from