SNMP::...ecurity(3pm)
π NAME π
SNMP::Info::CiscoPortSecurity β bestie, it's the SNMP interface that goes and grabs all the data from CISCO-PORT-SECURITY-MIB, CISCO-PAE-MIB and CISCO-ERR-DISABLE-MIB. That's the whole vibe. β¨
(Also for the record: this is a 3pm page from the User Contributed Perl Documentation collection, and yes the module name is right there in the title, SNMP::Info::CiscoPortSecurity(3pm) β iykyk π
)
βοΈ AUTHOR βοΈ
Eric Miller wrote this. Give them their flowers. πΈ
β¨ SYNOPSIS β¨
Okay so here's the lil intro move β let SNMP::Info figure out the correct subclass for you, no cap:
# Let SNMP::Info determine the correct subclass for you.
my $cps = new SNMP::Info(
AutoSpecify => 1,
Debug => 1,
DestHost => 'myswitch',
Community => 'public',
Version => 2
)
or die "Can't connect to DestHost.\n";
my $class = $cps->class();
print "SNMP::Info determined this device to fall under subclass : $class\n";
That's it, that's the whole flex. π«Ά
πΈ DESCRIPTION πΈ
SNMP::Info::CiscoPortSecurity is a subclass of SNMP::Info that provides an interface to CISCO-PORT-SECURITY-MIB, CISCO-PAE-MIB and CISCO-ERR-DISABLE-MIB. These MIBs are used across the Catalyst family under CatOS and IOS. β¨
Use or create in a subclass of SNMP::Info. Do not use directly. fr fr, not a drill π
π¦ Inherited Classes π¦
None. She's an original. Periodt.
π Required MIBs π
CISCO-PORT-SECURITY-MIBCISCO-PAE-MIBIEEE8021-PAE-MIBCISCO-ERR-DISABLE-MIB
π GLOBALS π
These are methods that return scalar values from SNMP. Little single-value girls, one and done. π«
CISCO-PORT-SECURITY-MIB globals π
$cps->cps_clear()β pulls("cpsGlobalClearSecureMacAddresses")$cps->cps_notify()β pulls("cpsGlobalSNMPNotifControl")$cps->cps_rate()β pulls("cpsGlobalSNMPNotifRate")$cps->cps_enable()β pulls("cpsGlobalPortSecurityEnable")$cps->cps_mac_count()β pulls("cpsGlobalTotalSecureAddress")$cps->cps_mac_max()β pulls("cpsGlobalMaxSecureAddress")
π₯ TABLE METHODS π₯
"CISCO-PORT-SECURITY-MIB" - Interface Config Table π
$cps->cps_i_limit_val()β pulls("cpsIfInvalidSrcRateLimitValue")$cps->cps_i_limit()β pulls("cpsIfInvalidSrcRateLimitEnable")$cps->cps_i_sticky()β pulls("cpsIfStickyEnable")$cps->cps_i_clear_type()β pulls("cpsIfClearSecureMacAddresses")$cps->cps_i_shutdown()β pulls("cpsIfShutdownTimeout")$cps->cps_i_flood()β pulls("cpsIfUnicastFloodingEnable")$cps->cps_i_clear()β pulls("cpsIfClearSecureAddresses")$cps->cps_i_mac()β pulls("cpsIfSecureLastMacAddress")$cps->cps_i_count()β pulls("cpsIfViolationCount")$cps->cps_i_action()β pulls("cpsIfViolationAction")$cps->cps_i_mac_static()β pulls("cpsIfStaticMacAddrAgingEnable")$cps->cps_i_mac_type()β pulls("cpsIfSecureMacAddrAgingType")$cps->cps_i_mac_age()β pulls("cpsIfSecureMacAddrAgingTime")$cps->cps_i_mac_count()β pulls("cpsIfCurrentSecureMacAddrCount")$cps->cps_i_mac_max()β pulls("cpsIfMaxSecureMacAddr")$cps->cps_i_status()β pulls("cpsIfPortSecurityStatus")$cps->cps_i_enable()β pulls("cpsIfPortSecurityEnable")
"CISCO-PORT-SECURITY-MIB::cpsIfVlanTable" π§
$cps->cps_i_v_mac_count()β pulls("cpsIfVlanCurSecureMacAddrCount")$cps->cps_i_v_mac_max()β pulls("cpsIfVlanMaxSecureMacAddr")
"CISCO-PORT-SECURITY-MIB::cpsIfVlanSecureMacAddrTable" π
$cps->cps_i_v_mac_status()β pulls("cpsIfVlanSecureMacAddrRowStatus")$cps->cps_i_v_mac_age()β pulls("cpsIfVlanSecureMacAddrRemainAge")$cps->cps_i_v_mac_type()β pulls("cpsIfVlanSecureMacAddrType")
"CISCO-PORT-SECURITY-MIB::cpsSecureMacAddressTable" π
$cps->cps_m_status()β pulls("cpsSecureMacAddrRowStatus")$cps->cps_m_age()β pulls("cpsSecureMacAddrRemainingAge")$cps->cps_m_type()β pulls("cpsSecureMacAddrType")
"IEEE8021-PAE-MIB::dot1xPaePortEntry" π
$cps->pae_i_capabilities()β pulls"dot1xPaePortCapabilities"
Indicates the PAE functionality that this Port supports and that may be managed through this MIB, munged to return either 'dot1xPaePortAuthCapable' or 'dot1xPaePortSuppCapable'. She picks a side. π
$cps->pae_i_last_eapol_frame_source()β pulls"dot1xAuthLastEapolFrameSource"
The source MAC address carried in the most recently received EAPOL frame.
"CISCO-ERR-DISABLE-MIB::cErrDisableIfStatusEntry" π
$cps->cerr_i_cause()β pulls"cErrDisableIfStatusCause"
Indicates the feature/event that caused the {interface, vlan} (or the entire interface) to be error-disabled. Like, the whole reason for the drama. π
π METHODS π
"i_err_disable_cause"β Returns a HASH reference mapping ifIndex to err-disabled cause. The returned data is sparse, so if the ifIndex is not present in the return value, the port is not err-disabled. No ifIndex, no problem, she's fine. β¨
Data Munging Callback Subroutines π
$cps->munge_pae_capabilities()β Return either'dot1xPaePortAuthCapable'or'dot1xPaePortSuppCapable'based upon bit value. Bit-by-bit detective work, obsessed. π
And that's a wrap on SNMP::Info::CiscoPortSecurity(3pm), girlies β this page was brought to you by perl v5.40.1, dated 2026-02-28, and it's the SNMP::...ecurity(3pm) manual page. Slay, hydrate, and always read your MIBs. ππ
π¦ 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