SNMP::...::Nexus(3pm)
π SNMP::...::Nexus π
okay bestie, sit down, we're doing SNMP::...::Nexus β like, the SNMP Interface to Cisco Nexus Switches running NX-OS. yes that's the whole NAME. it's giving Perl documentation, user contributed, and honestly? iconic.
It's the SNMP::Info glue for Cisco Nexus Switches running NX-OS. π
β¨ AUTHOR β¨
Eric Miller π«Ά
πΈ SYNOPSIS πΈ
so here's the vibe. literally just let SNMP::Info figure out the right subclass for you, no cap:
# Let SNMP::Info determine the correct subclass for you.
my $nexus = 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 = $nexus->class();
print "SNMP::Info determined this device to fall under subclass : $class\n";
like, it just tells you what class your switch is. main character energy fr fr. π
π¦ DESCRIPTION π¦
It's an abstraction subclass for Cisco Nexus Switches running NX-OS. that's the whole personality and she serves. π
If you're doing it for speed or for debugging, you can call the subclass directly β but not after you've already determined a more specific class with the method up above. don't do that. it's not the move. π
my $nexus = new SNMP::Info::Layer3::Nexus(...);
π Inherited Classes
SNMP::Info::Layer3::CiscoSwitch
π Required MIBs
CISCO-ENTITY-VENDORTYPE-OID-MIBCISCO-CONTEXT-MAPPING-MIB
π Inherited Classes' MIBs
See "Required MIBs" in SNMP::Info::Layer3::CiscoSwitch for its own MIB requirements. yes queen, go read her page too. π
β GLOBALS β
These are methods that return a scalar value from SNMP. one little value, one little vibe. π
$nexus->os()β Returns'nx-os'. that's it. that's the answer.$nexus->os_ver()β Returns the operating system version extracted from"sysDescr". π$nexus->serial()β Returns the serial number of the chassis fromENTITY-MIB. yes, the chassis. the whole girl. π$nexus->model()β Tries to reference$nexus->id()toCISCO-ENTITY-VENDORTYPE-OID-MIB. Removes'cevChassis'for readability. she said clean it up. β¨$nexus->mac()β"dot1dBaseBridgeAddress"π«Ά
πΈ Overrides πΈ
IP Address Table
Each entry in this table is an IP address in use on this device. Some versions do not index the table with the IPv4 address in accordance with the MIB definition β and these overrides correct that behavior. periodt. π
Also?? the table gets augmented with IP addresses in use by UDP sockets on the device, as determined by checking RFC1213-MIB::udpLocalAddress. Valid addresses from this table β that's any IPv4 that is not localhost, not 0.0.0.0, not Class D (multicast), and not Class E (experimental) β are added as a /32 on interface ID 0. π§
bestie this is a workaround to determine possible VPC Keepalive IP addresses on the device, which are probably advertised by CDP/LLDP to neighbors. it's not magic, it's just clever. iykyk. π₯
$nexus->ip_index()β Maps the IP Table to the IID ("ipAdEntIfIndex") π$nexus->ip_table()β Maps the Table to the IP address ("ipAdEntAddr") π$nexus->ip_netmask()β Gives netmask setting for IP table entry. ("ipAdEntNetMask") πΈ$nexus->ip_broadcast()β Gives broadcast address for IP table entry. ("ipAdEntBcastAddr") π£$nexus->lldp_lport_desc()β Onnx-os6 only, this will return data from"lldpLocPortId"instead of the expected"lldpLocPortDesc". For all othernx-osversions it uses the function fromSNMP::Info::LLDP. okay so that's a weird little quirk but we love her anyway. π
π Globals imported from SNMP::Info::Layer3::CiscoSwitch
See documentation in "GLOBALS" in SNMP::Info::Layer3::CiscoSwitch for details. go look, the receipts are all there. π«Ά
π₯ TABLE METHODS π₯
These are methods that return tables of information in the form of a reference to a hash. hash refs, we're obsessed. π
π 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 bestie, no notes, you ate this. π
signed off with love from perl v5.40.1, dated 2026-02-28, under the SNMP::...::Nexus(3pm) header β the user contributed Perl documentation girlies. 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