NAME
SNMP::Info::Layer3::H3C - SNMP Interface to L3 Devices, H3C & HP A-series
AUTHORS
Jeroen van Ingen
SYNOPSIS
# Let SNMP::Info determine the correct subclass for you.
my $h3c = new SNMP::Info(
AutoSpecify => 1,
Debug => 1,
DestHost => 'myrouter',
Community => 'public',
Version => 2
)
or die "Can't connect to DestHost.\n";
my $class = $h3c->class();
print "SNMP::Info determined this device to fall under subclass : $class\n";
DESCRIPTION
Subclass for H3C & HP A-series devices
Inherited Classes
Required MIBs
- HH3C-LswDEVM-MIB
- HH3C-LswINF-MIB
- HH3C-LSW-DEV-ADM-MIB
- HH3C-PRODUCT-ID-MIB
- HH3C-ENTITY-VENDORTYPE-OID-MIB
- HH3C-LswMSTP-MIB
- Inherited Classes' MIBs
-
See SNMP::Info::IEEE802dot3ad for its own MIB requirements.
See SNMP::Info::Layer3 for its own MIB requirements.
GLOBALS
These are methods that return scalar value from SNMP
- $h3c->model()
-
Returns the model from
sysObjectIDorentPhysicalClass. - $h3c->vendor()
-
Returns value for
entPhysicalMfgName.1. - $h3c->os()
-
Returns the OS extracted from
sysDescr. - $h3c->os_ver()
-
Returns the software version. Either
entPhysicalSoftwareRev.2or extracted fromsysDescr. - $h3c->qb_fdb_index()
-
overwritten to always return empty hash as implementation on h3c is broken.
- $h3c->h3c_stp_version()
-
(
hh3cdot1sStpForceVersion) - $h3c->hasSTP()
-
Returns 1 when
hh3cdot1sStpForceVersionisstp(0), else 0. - $h3c->hasRSTP()
-
Returns 1 when
hh3cdot1sStpForceVersionisrstp(2), else 0. - $h3c->hasPVST()
-
Returns 1 when the tables show PVST (see "Spanning Tree Trees"), else 0.
- $h3c->hasMSTP()
-
Returns 1 when
hh3cdot1sStpForceVersionismstp(3), else 0.
Globals imported from SNMP::Info::Layer3
See documentation in SNMP::Info::Layer3 for details.
Globals imported from SNMP::Info::IEEE802dot3ad
See documentation in SNMP::Info::IEEE802dot3ad for details.
TABLE ENTRIES
These are methods that return tables of information in the form of a reference to a hash.
Overrides
- $h3c->i_ignore()
-
Returns reference to hash. Increments value of IID if port is to be ignored.
Ignores loopback
- $h3c->i_stp_state()
-
Returns inherited STP states, omitting physical members of confirmed Bridge-Aggregation interfaces. STP applies to the logical aggregate; an omitted member state does not mean that the member or aggregate is forwarding. The aggregate and non-member states are retained. No MSTP instance states are combined into this single per-interface result. Under MSTP the inherited states are the CIST's. Under PVST on Comware 7 returns an empty hash, because
dot1dStpPortStatethere matches no VLAN's tree. - $h3c->ad_port_attached_agg()
-
Returns the raw member ifIndex to attached aggregate ifIndex mapping from
dot3adAggPortAttachedAggID. Zero means no attached aggregate. agg_ports-
Prefers validated
dot3adAggPortAttachedAggIDmappings for Bridge-Aggregation interfaces, falling back to the inherited port-list mapping when none are available.Returns a HASH reference mapping from slave to master port for each member of a port bundle on the device. Keys are ifIndex of the slave ports, Values are ifIndex of the corresponding master ports.
Table Methods
- $h3c->h3c_stp_i_id()
-
(
hh3cdot1sInstanceID) - $h3c->h3c_stp_i_bridge()
-
(
hh3cdot1sMstiBridgeID) - $h3c->h3c_stp_i_root()
-
(
hh3cdot1sMstiDesignedRoot) - $h3c->h3c_stp_p_state()
-
(
hh3cdot1sMstiState) - $h3c->h3c_stp_p_bridge()
-
(
hh3cdot1sMstiDesignatedBridge) - $h3c->h3c_stp_p_port()
-
(
hh3cdot1sMstiDesignatedPort) - $h3c->h3c_stp_vlan_mst()
-
(
hh3cdot1sOperMstID)
Spanning Tree Trees
These override "Spanning Tree Trees" in SNMP::Info::Bridge; records are as described there. The protocol is the one hh3cdot1sStpForceVersion names. Under MSTP the CIST and each MSTI come from the HH3C-LswMSTP-MIB instance and port tables, keyed cist.0 and msti.<instance>; their bridge IDs carry the instance number in the low 12 bits. Under RSTP and STP the one tree comes from BRIDGE-MIB, whose values the instance tables only copy. The MIBs serve no port role, so role and role_raw are undef. Physical members of a Bridge-Aggregation interface are omitted, as in i_stp_state(). measured is 1 on Comware 7 under MSTP, RSTP and PVST. Under PVST, which hh3cdot1sStpForceVersion does not name, the protocol is pvst when the force version is rstp, the instance table lists instances and neither hh3cdot1sMstiBridgeID nor hh3cdot1sMstiState has rows. Each VLAN in the instance table (not 0) becomes a vlan.N tree with no context, no bridge or root, and ports_complete 0, since no port data is served for it. When one of those three walks was incomplete the protocol is unknown and no trees are reported.
- $h3c->stp_protocols()
-
Returns reference to an array holding the protocol, or nothing.
- $h3c->stp_trees()
-
Returns reference to hash of tree records, or an empty hash when no force version is served. Without the force-version object PVST cannot be told from RSTP or MSTP, and
BRIDGE-MIBstates are wrong under PVST, so nodot1dStptree is reported. - $h3c->stp_tree_ports($tree_key)
-
Returns reference to hash of the tree's port records keyed by ifIndex.
- $h3c->stp_trees_complete()
-
Returns 1 when trees were read, 0 otherwise. Under PVST every VLAN tree is listed, so it is 1.
- $h3c->stp_vlan_map()
-
Under MSTP returns reference to hash mapping VLAN id to tree key, from
hh3cdot1sOperMstID. Otherwise nothing; RSTP still serves the unused region map.
Table Methods imported from SNMP::Info::Layer3
See documentation in SNMP::Info::Layer3 for details.
Table Methods imported from SNMP::Info::IEEE802dot3ad
See documentation in SNMP::Info::IEEE802dot3ad for details.