NAME
SNMP::Info::Layer2::HP - SNMP Interface to HP Procurve Switches
DESCRIPTION
Provides abstraction to the configuration information obtainable from a HP device through SNMP. Information is stored in a number of MIB's such as IF-MIB, ENTITY-MIB, RFC1271-MIB, HP-ICF-OID, MAU-MIB
MIBs required:
HP MIBs can be found at http://www.hp.com/rnd/software
AUTHOR
Max Baker (max@warped.org
)
SYNOPSIS
my $hp = new SNMP::Info::Layer2::HP(DestHost => 'router' ,
Community => 'public' );
CREATING AN OBJECT
- new SNMP::Info::Layer2::HP()
-
Arguments passed to new() are passed on to SNMP::Session::new()
my $hp = new SNMP::Info::Layer2::HP( DestHost => $host, Community => 'public', Version => 3,... ) die "Couldn't connect.\n" unless defined $hp;
- $hp->session()
-
Sets or returns the SNMP::Session object
# Get my $sess = $hp->session(); # Set my $newsession = new SNMP::Session(...); $hp->session($newsession);
- $hp->all(), $hp->load_all()
-
Runs each of the HP List methods and returns a hash reference.
$hp->all() will call $hp->load_all() once and then return cahced valued. Use $hp->load_all() to reload from the device.
HP Global Configuration Values
- $hp->name() (sysName)
- $hp->ip() (sysIpAddr)
- $hp->netmask() (sysNetMask)
- $hp->broadcast() (sysBroadcast)
- $hp->location() (sysLocation)
- $hp->contact() (sysContact)
- $hp->description() (sysDescr)
- $hp->layers() (sysServices)
- $hp->serial() (chassisSerialNumberString)
- $hp->model() (chassisModel)
- $hp->ps1_type() (chassisPs1Type)
- $hp->ps2_type() (chassisPs2Type)
- $hp->ps1_status() (chassisPs1Status)
- $hp->ps2_status() (chassisPs2Status)
- $hp->slots() (chassisNumSlots)
- $hp->fan() (chassisFanStatus)
CATALYST TABLE ENTRIES
Module table
- $hp->m_type(), $hp->load_m_type() (moduleType)
- $hp->m_model(), $hp->load_m_model() (moduleModel)
- $hp->m_serial(), $hp->load_m_serial() (moduleSerialNumber)
- $hp->m_status(), $hp->load_m_status() (moduleStatus)
- $hp->m_name(), $hp->load_m_name() (moduleName)
- $hp->m_ports(), $hp->load_m_ports() (moduleNumPorts)
- $hp->m_ports_status(), $hp->load_m_ports_status() Returns a list of space separated status strings for the ports. To see the status of port 4 : @ports_status = split(' ', $hp->m_ports_status() ); $port4 = $ports_status[3];
-
(modulePortStatus)
- $hp->m_ports_hwver(), $hp->load_m_ports_hwver() (moduleHwVersion)
- $hp->m_ports_fwver(), $hp->load_m_ports_fwver() (moduleFwVersion)
- $hp->m_ports_swver(), $hp->load_m_ports_swver() (moduleSwVersion)
- $hp->m_ports_ip(), $hp->load_m_ports_ip() (moduleIPAddress)
- $hp->m_ports_sub1(), $hp->load_m_ports_sub1() (moduleSubType)
- $hp->m_ports_sub2(), $hp->load_m_ports_sub2() (moduleSubType2)
Port Entry Table
- $hp->p_name(), $hp->load_p_name() (portName)
- $hp->p_type(), $hp->load_p_type() (portType)
- $hp->p_status(), $hp->load_p_status() (portOperStatus)
- $hp->p_status2(), $hp->load_p_status2() (portAdditionalStatus)
- $hp->p_speed(), $hp->load_p_speed() (portAdminSpeed)
- $hp->p_duplex(), $hp->load_p_duplex() (portDuplex)
- $hp->p_port(), $hp->load_p_port() (portIfIndex)
VLAN Entry Table
ftp://ftp.cisco.com/pub/mibs/supportlists/wsc5000/wsc5000-communityIndexing.html