NAME
SNMP::Info::Layer3::ArubaCX - SNMP Interface to L3 Devices running ArubaOS-CX
AUTHORS
Jeroen van Ingen, SNMP::Info Developers
SYNOPSIS
# Let SNMP::Info determine the correct subclass for you.
my $cx = new SNMP::Info(
AutoSpecify => 1,
Debug => 1,
DestHost => 'myrouter',
Community => 'public',
Version => 2
)
or die "Can't connect to DestHost.\n";
my $class = $cx->class();
print "SNMP::Info determined this device to fall under subclass : $class\n";
DESCRIPTION
Subclass for devices running ArubaOS-CX
Spanning Tree
AOS-CX runs MSTP or RPVST. It serves ieee8021SpanningTreeVersion 3 in both modes, so this class reads the mode from ieee8021MstpCistPortRole in the lowest component:
MSTP: any row has a role defined in the MIB. Link-down ports read 6, which is outside the MIB's enumeration.
RPVST: every row reads 6, and at least one of those ports is up. A link aggregation counts as up when any member is up (
i_up(),agg_ports()), since AOS-CX reports itsifOperStatusas down while its members are up.BRIDGE-MIB only: no row at all, as on a switch that does not serve the IEEE MIBs.
Unknown: any other case, such as every row 6 with every port down, or 6 mixed with an undefined role.
Under MSTP the tree methods return the SNMP::Info::IEEE802_STP results, with measured 1. Under RPVST they read ARUBAWIRED-RPVST-MIB. With BRIDGE-MIB only they return the SNMP::Info::Bridge tree, dot1d with measured 0. When the mode is unknown they report nothing. AOS-CX offers no plain STP or RSTP mode, so hasSTP() and hasRSTP() always return 0, and hasMSTP() returns 1 only under MSTP.
VLANs
AOS-CX serves VLAN data in two standard MIBs, IEEE8021-Q-BRIDGE-MIB and Q-BRIDGE-MIB. The IEEE MIB can describe several bridges in one device, so each of its indexes starts with a bridge number. A switch has one bridge, numbered 1. v_name(), qb_i_vlan() and i_vlan_type() read the IEEE MIB rows of bridge 1 and drop that number, so their keys match Q-BRIDGE-MIB. The port list methods keep the IEEE keys. Each VLAN method falls back to Q-BRIDGE-MIB on its own when the IEEE MIB has no rows for it, since a switch can serve a column in one MIB and not the other.
AOS-CX serves a native VLAN (PVID) of 0, which both MIBs forbid, on ports with no native VLAN in effect, such as routed ports and trunks that do not carry their configured native VLAN. A 0 does not mean VLAN 1. qb_i_vlan() returns it as served; i_vlan() leaves those ports out.
Inherited Classes
Required MIBs
- ARUBAWIRED-CIPT-MIB
- ARUBAWIRED-FAN-MIB
- ARUBAWIRED-VSF-MIB
- ARUBAWIRED-POE-MIB
- ARUBAWIRED-POWERSUPPLY-MIB
- ARUBAWIRED-PM-MIB
- ARUBAWIRED-RPVST-MIB
- Inherited Classes' MIBs
-
See SNMP::Info::IEEE802_STP for its own MIB requirements.
See SNMP::Info::Layer3 for its own MIB requirements.
See SNMP::Info::IEEE802_Bridge for its own MIB requirements.
See SNMP::Info::IEEE802dot3ad for its own MIB requirements.
GLOBALS
These are methods that return scalar value from SNMP
- $cx->stack_info()
-
If the device supports VSF stacking and is not in standalone mode, returns a string describing the switch family and the number of stack members. Example return value: '6300M (stack of 2)'. Will return undef when VSF is not supported or when the device is VSF standalone.
- $cx->model()
-
Known product codes are translated to readable model names.
Returns stack_info() if defined, otherwise will fall back to returning the model from
entPhysicalModelName.1; if that's also not set, will usesysObjectIDas a last resort, stripping 'arubaWiredSwitch' from the value. - $cx->vendor()
-
Returns (lowercased) value for
entPhysicalMfgName.1, or 'aruba'. - $cx->mac()
-
Returns the system MAC address from
dot1dBaseBridgeAddress. Interface 1 is a front panel port with its own MAC address. Falls back toifPhysAddress.1when the bridge address is missing or all zeros. - $cx->os()
-
Returns 'arubaos-cx'.
- $cx->os_ver()
-
Returns the software version. Either
entPhysicalSoftwareRev.1or extracted fromsysDescr. - $cx->fan()
-
Returns a string with status information for all fans listed in
ARUBAWIRED-FAN-MIB. - $cx->ps1_type()
-
Product name of the power supply in group 1, slot 1. (
arubaWiredPSUProductName.1.1) - $cx->ps2_type()
-
Product name of the power supply in group 1, slot 2. (
arubaWiredPSUProductName.1.2) - $cx->ps1_status()
-
Status of the power supply in group 1, slot 1, as served. (
arubaWiredPSUState.1.1) - $cx->ps2_status()
-
Status of the power supply in group 1, slot 2, as served. (
arubaWiredPSUState.1.2) - $cx->vsf_topology()
-
The physical topology of the VSF stack:
standalone,chainorring. Used bystack_info(). (arubaWiredVsfTopology) - $cx->rpvst_ext_sysid()
-
Returns
trueorfalse: whether this switch puts the VLAN in the system ID extension of its RPVST bridge IDs. (arubaWiredRpvstExtendedSystemID) - $cx->vsx_role()
-
The switch's VSX role:
primary,secondaryornotConfigured. (arubaWiredVsxDeviceRole) - $cx->vsx_system_mac()
-
The system ID the VSX pair presents to LACP partners, colon separated hex. Read from text or raw octets; undef when neither parses. (
arubaWiredVsxDeviceOperSystemID) - $cx->vsx_isl_port()
-
The name of the inter-switch link (ISL) interface, such as
lag256.0or empty when no ISL is configured. (arubaWiredVsxIslPort) - $cx->vsx_isl_state()
-
The state of the ISL session with the VSX peer:
init,outSyncorinSync. (arubaWiredVsxIslOperState) - $cx->vsx_keepalive_peer()
-
The VSX keepalive peer's address. AOS-CX can serve it as text rather than an InetAddress; either form is read and returned in the same form. Undef when unset or not an address. (
arubaWiredVsxKeepAlivePeerIPAddr) - $cx->vsx_keepalive_state()
-
The state of the keepalive session:
init,configured,inSyncEstablished,outofSyncEstablished,initEstablished,failedorstopped. (arubaWiredVsxKeepAliveOperState) - $cx->hasRapidPVST()
-
Returns 1 when the mode is RPVST, as "Spanning Tree" describes, else 0. (
ieee8021MstpCistPortRole)
Globals imported from SNMP::Info::IEEE802_STP
See documentation in SNMP::Info::IEEE802_STP for details.
Globals imported from SNMP::Info::Layer3
See documentation in SNMP::Info::Layer3 for details.
Globals imported from SNMP::Info::IEEE802_Bridge
See documentation in SNMP::Info::IEEE802_Bridge for details.
Globals imported from SNMP::Info::IEEE802dot3ad
See documentation in SNMP::Info::IEEE802dot3ad for details.
Client IP tracking
These methods add rows from arubaWiredCiptClientTable to the inherited ARP and IPv6 neighbor tables. Client tracking must already be enabled on the switch; these methods only read its data. Each added row is keyed cipt. followed by the table's MAC, VLAN and IP index, so a client with several addresses keeps one row for each. Rows with a malformed index, a multicast or zero MAC, a VLAN outside 1 to 4094, an address of the wrong length or no port are omitted. With no usable tracking rows, each method returns the inherited result.
- $cx->at_paddr()
-
Returns reference to hash. The inherited
at_paddr()rows, plus the client MAC address of each IPv4 tracking row, colon separated hex. - $cx->at_netaddr()
-
Returns reference to hash. The inherited
at_netaddr()rows, plus the client IPv4 address of each IPv4 tracking row. - $cx->ipv6_n2p_mac()
-
Returns reference to hash. The inherited
ipv6_n2p_mac()rows, plus the client MAC address of each IPv6 tracking row, colon separated hex. - $cx->ipv6_n2p_addr()
-
Returns reference to hash. The inherited
ipv6_n2p_addr()rows, plus the client IPv6 address of each IPv6 tracking row. - $cx->ipv6_n2p_if()
-
Returns reference to hash. The inherited
ipv6_n2p_if()rows, plus theifIndexof the port where each IPv6 tracking row's client was seen.
TABLE ENTRIES
These are methods that return tables of information in the form of a reference to a hash.
- $cx->peth_port_power()
-
Power supplied by PoE ports, in milliwatts. (
arubaWiredPoePethPsePortAveragePower)
Transceivers
Columns of ARUBAWIRED-PM-MIB::arubaWiredPmXcvrTable, indexed by ifIndex.
- $cx->pm_xcvr_port()
-
Returns reference to hash. The name of the port the transceiver is in. (
arubaWiredPmXcvrPortDesc) - $cx->pm_xcvr_descr()
-
Returns reference to hash. The transceiver description. (
arubaWiredPmXcvrDescription) - $cx->pm_xcvr_product()
-
Returns reference to hash. The transceiver product number. (
arubaWiredPmXcvrProductNum) - $cx->pm_xcvr_serial()
-
Returns reference to hash. The transceiver serial number. (
arubaWiredPmXcvrSerialNum) - $cx->pm_xcvr_type()
-
Returns reference to hash. The transceiver type. (
arubaWiredPmXcvrType)
Aruba Fan Table (arubaWiredFanTable)
Indexed by group, tray and slot. Read by fan().
- $cx->fan_names()
-
Returns reference to hash. The fan name. (
arubaWiredFanName) - $cx->fan_states()
-
Returns reference to hash. The fan status, as served. (
arubaWiredFanState)
Aruba Power Supply Table (arubaWiredPowerSupplyTable)
Indexed by group and slot.
- $cx->psu_names()
-
Returns reference to hash. The power supply name. (
arubaWiredPSUName) - $cx->psu_types()
-
Returns reference to hash. The power supply product name. (
arubaWiredPSUProductName) - $cx->psu_states()
-
Returns reference to hash. The power supply status, as served. (
arubaWiredPSUState)
Aruba VSF Member Table (arubaWiredVsfMemberTable)
Indexed by VSF member.
- $cx->vsf_prod_names()
-
Returns reference to hash. The product name of each VSF stack member. Used by
stack_info(). (arubaWiredVsfMemberProductName)
Aruba Client IP Tracking Table (arubaWiredCiptClientTable)
Indexed by client MAC, VLAN and IP index. Read by the client IP tracking methods.
- $cx->cipt_addr_type()
-
Returns reference to hash. The address type of
cipt_addr(). (arubaWiredCiptClientIpAddrType) - $cx->cipt_addr()
-
Returns reference to hash. The tracked client IP address, as served. (
arubaWiredCiptClientIpAddress) - $cx->cipt_ifindex()
-
Returns reference to hash. The
ifIndexof the port where the client is tracked. (arubaWiredCiptClientPortIfIndex)
Aruba RPVST VLAN Table (arubaWiredRpvstVlanTable)
Indexed by VLAN.
- $cx->rpvst_v_admin()
-
Returns reference to hash.
enabledordisabled: whether RPVST runs on the VLAN. (arubaWiredRpvstVlanRpvstAdminStatus) - $cx->rpvst_v_priority()
-
Returns reference to hash. This switch's bridge priority on the VLAN, an integer. (
arubaWiredRpvstVlanPriority) - $cx->rpvst_v_root_priority()
-
Returns reference to hash. The root bridge priority on the VLAN, an integer. (
arubaWiredRpvstVlanRootPriority) - $cx->rpvst_v_root_mac()
-
Returns reference to hash. The root bridge MAC address on the VLAN, colon separated hex. (
arubaWiredRpvstVlanRootMacAddress)
Aruba RPVST Port VLAN Table (arubaWiredRpvstPortVlanTable)
Indexed by VLAN and ifIndex.
- $cx->rpvst_pv_state()
-
Returns reference to hash. The port's state on the VLAN:
disabled,blocking,listening,learning,forwarding,broken,bpduError,loopInconsistent,pvidInconsistentorrootGuard. (arubaWiredRpvstPortVlanState) - $cx->rpvst_pv_role()
-
Returns reference to hash. The port's role on the VLAN:
root,alternate,designated,backup,masterordisabled. (arubaWiredRpvstPortVlanRole) - $cx->rpvst_pv_bridge()
-
Returns reference to hash. The MAC address of the designated bridge on the port's segment, colon separated hex. (
arubaWiredRpvstPortVlanDesigBridge) - $cx->rpvst_pv_edge_oper()
-
Returns reference to hash.
trueorfalse: whether the port is operating as an edge port on the VLAN. (arubaWiredRpvstPortVlanOperEdge)
Aruba VSX Aggregator Table (arubaWiredVsxAggregatorTable)
Indexed by the aggregation's ifIndex.
- $cx->vsx_agg_type()
-
Returns reference to hash.
multiChassisfor a link aggregation split across the VSX pair, elsepoint2Point. (arubaWiredVsxAggregatorType)
Overrides
- $cx->lag_groups()
-
As described in "METHODS" in SNMP::Info::IEEE802dot3ad, with, while the
vsxdomain ofmlag_domains()is served:A link aggregation that
vsx_agg_type()lists asmultiChassisgetsmc:kindvsx,groupthe LAG number from its interface name (10 forlag10, or the name when it is notlagN),domainvsx, andstateundef, since no per-LAG state is served. A LAG that IEEE8023-LAG-MIB does not list still gets a record.The ISL that
vsx_isl_port()names getspeer_link.
lag_groups_complete()also checks thevsx_agg_type()walk. - $cx->mlag_domains()
-
As described in "METHODS" in SNMP::Info::IEEE802dot3ad, with one domain, keyed
vsx, when the switch runs VSX:vsx_role()isprimaryorsecondary, orvsx_isl_port()names an interface. Its fields:kind:vsx.system_mac:vsx_system_mac().role:vsx_role().peer:vsx_keepalive_peer().status: the ISL state,vsx_isl_state().peer_link: the ifIndex of the interfacevsx_isl_port()names. Absent when no interface has that name.
- $cx->e_index()
-
Returns reference to hash. The inherited
entPhysicalIndexrows, plus one row per transceiver inarubaWiredPmXcvrTable, indexed 1000000000 plus the portifIndex. A transceiver whose index is already a realentPhysicalIndexis skipped. The othere_*overrides return the same added rows. A partial fetch, or a device without transceiver rows, returns the inherited result. - $cx->e_class()
-
Returns reference to hash. The inherited rows, plus
modulefor each transceiver row. - $cx->e_descr()
-
Returns reference to hash. The inherited rows, plus the transceiver description from
pm_xcvr_descr(). - $cx->e_name()
-
Returns reference to hash. The inherited rows, plus
Transceiverfollowed by the port name frompm_xcvr_port(). - $cx->e_model()
-
Returns reference to hash. The inherited rows, plus the transceiver product number from
pm_xcvr_product(). - $cx->e_serial()
-
Returns reference to hash. The inherited rows, plus the transceiver serial number from
pm_xcvr_serial(). - $cx->e_type()
-
Returns reference to hash. The inherited rows, plus the transceiver type from
pm_xcvr_type(). - $cx->e_fru()
-
Returns reference to hash. The inherited rows, plus
truefor each transceiver row. - $cx->e_parent()
-
Returns reference to hash. The inherited rows, plus each transceiver's parent: the
portentity whose name matchespm_xcvr_port(), else the first chassis, else 0. - $cx->stp_protocols()
-
Returns
['mstp']under MSTP,['rapid-pvst']under RPVST, the inherited result with BRIDGE-MIB only, and nothing when the mode is unknown. - $cx->stp_trees()
-
Under RPVST, returns one
vlan.Ntree for each VLAN whererpvst_v_admin()isenabled. No eight-octet bridge ID is served, so each bridge ID is built from its parts:priority:
rpvst_v_priority()for this switch,rpvst_v_root_priority()for the root.mac: this switch's MAC is the MAC part of
ieee8021MstpCistBridgeIdentifier, the VSX system MAC on a VSX pair. The root's MAC isrpvst_v_root_mac().sys_id_ext: the VLAN, when the bridge is this switch and
rpvst_ext_sysid()istrue. Otherwise undef.
ports_completeis 1, since the port rows are keyed byifIndex. Returns an empty hash when the mode is unknown. - $cx->stp_trees_complete()
-
Under RPVST, returns 1 when
stp_trees()holds trees and therpvst_v_admin()walk completed, else 0. Returns 0 when the mode is unknown. - $cx->stp_vlan_map()
-
Under RPVST, maps each VLAN with RPVST enabled to its
vlan.Ntree. Returns nothing when the mode is unknown. - $cx->stp_tree_ports($tree_key)
-
Under RPVST, returns port rows from
arubaWiredRpvstPortVlanTable.stateisrpvst_pv_state()as served.roleisrpvst_pv_role().enabledanddesignated_portare undef. The designated bridge is served as a MAC only, so its priority andsys_id_extare those of the root or this switch when the MAC is theirs, else undef. Setserror()and returns nothing when the mode is unknown. - $cx->i_stp_state()
-
Returns an empty hash under RPVST, where
dot1dStpPortStatekeeps MSTP's last values. Otherwise the inherited result. - $cx->i_edgeport_oper()
-
Returns reference to hash of ifIndex to 1 or 0. Under MSTP and with BRIDGE-MIB only, the inherited result. Under RPVST,
arubaWiredRpvstPortVlanOperEdgeon the row for the port's native VLAN (i_vlan()); a port with no such row is absent. A port with no native VLAN in effect, which AOS-CX reports as 0, is absent ("VLANs"). Returns an empty hash when the mode is unknown.i_edgeport_admin()is the inherited method in every mode. Whether this value reports an operational edge port as true has not been verified. - $cx->agg_ports()
-
Returns reference to hash of member
ifIndexto aggregationifIndex. AOS-CX servesdot3adAggPortListPortsas a comma separated list of interface names, not a PortList, so each name is matched againstinterfaces(). - $cx->raw_ad_lag_ports()
-
Returns reference to hash. The member interface names of each aggregation, as served. (
dot3adAggPortListPorts) - $cx->v_name()
-
Returns reference to hash of VLAN to VLAN name. (
ieee8021QBridgeVlanStaticName, elsedot1qVlanStaticName) - $cx->qb_i_vlan()
-
Returns reference to hash of bridge port to native VLAN (PVID). See "VLANs" for the value 0. (
ieee8021QBridgePvid, elsedot1qPvid) - $cx->i_vlan()
-
Returns reference to hash of ifIndex to native VLAN (PVID): the inherited result without the ports AOS-CX reports as 0, which have no native VLAN in effect ("VLANs").
- $cx->i_untagged()
-
An alias for
i_vlan(). - $cx->i_vlan_type()
-
Returns reference to hash of bridge port to the frame types the port accepts. (
ieee8021QBridgePortAcceptableFrameTypes, elsedot1qPortAcceptableFrameTypes) - $cx->qb_v_egress()
-
Returns reference to hash of VLAN to its configured member ports, an array of bits. Keys are
1.VLANfrom the IEEE MIB, orVLANfrom Q-BRIDGE-MIB. (ieee8021QBridgeVlanStaticEgressPorts, elsedot1qVlanStaticEgressPorts) - $cx->qb_cv_egress()
-
Returns reference to hash of VLAN to its current member ports, an array of bits. Keys are
0.1.VLANfrom the IEEE MIB, or0.VLANfrom Q-BRIDGE-MIB; the leading 0 is the time filter. (ieee8021QBridgeVlanCurrentEgressPorts, elsedot1qVlanCurrentEgressPorts) - $cx->qb_v_untagged()
-
Returns reference to hash of VLAN to its configured untagged ports, an array of bits. Keys as
qb_v_egress(). (ieee8021QBridgeVlanStaticUntaggedPorts, elsedot1qVlanStaticUntaggedPorts) - $cx->qb_cv_untagged()
-
Returns reference to hash of VLAN to its current untagged ports, an array of bits. Keys as
qb_cv_egress(). (ieee8021QBridgeVlanCurrentUntaggedPorts, elsedot1qVlanCurrentUntaggedPorts)
Table Methods imported from SNMP::Info::IEEE802_STP
See documentation in SNMP::Info::IEEE802_STP for details.
Table Methods imported from SNMP::Info::Layer3
See documentation in SNMP::Info::Layer3 for details.
Table Methods imported from SNMP::Info::IEEE802_Bridge
See documentation in SNMP::Info::IEEE802_Bridge for details.
Table Methods imported from SNMP::Info::IEEE802dot3ad
See documentation in SNMP::Info::IEEE802dot3ad for details.