1SNMP::Info::Layer2::HP(U3s)er Contributed Perl DocumentatSiNoMnP::Info::Layer2::HP(3)
2
3
4
6 SNMP::Info::Layer2::HP - SNMP Interface to HP Procurve Switches
7
9 Max Baker
10
12 # Let SNMP::Info determine the correct subclass for you.
13 my $hp = new SNMP::Info(
14 AutoSpecify => 1,
15 Debug => 1,
16 DestHost => 'myswitch',
17 Community => 'public',
18 Version => 2
19 )
20 or die "Can't connect to DestHost.\n";
21
22 my $class = $hp->class();
23 print "SNMP::Info determined this device to fall under subclass : $class\n";
24
26 Provides abstraction to the configuration information obtainable from a
27 HP ProCurve Switch via SNMP.
28
29 Note: Some HP Switches will connect via SNMP version 1, but a lot of
30 config data will not be available. Make sure you try and connect with
31 Version 2 first, and then fail back to version 1.
32
33 For speed or debugging purposes you can call the subclass directly, but
34 not after determining a more specific class using the method above.
35
36 my $hp = new SNMP::Info::Layer2::HP(...);
37
38 Inherited Classes
39 SNMP::Info::Layer2
40 SNMP::Info::MAU
41
42 Required MIBs
43 RFC1271-MIB
44 Included in V2 mibs from Cisco
45
46 HP-ICF-OID
47 (this MIB new with SNMP::Info 0.8)
48
49 STATISTICS-MIB
50 NETSWITCH-MIB
51 CONFIG-MIB
52 HP-ICF-BRIDGE
53 HP-ICF-POE-MIB
54 HP-ICF-CHASSIS
55 SEMI-MIB
56 HP-SWITCH-PL-MIB
57 BLADETYPE4-NETWORK-MIB
58
59 The last four MIBs listed are from HP and can be found at
60 <http://www.hp.com/rnd/software> or
61 <http://www.hp.com/rnd/software/MIBs.htm>
62
64 Version 0.4 - Removed ENTITY-MIB e_*() methods to separate sub-class -
65 SNMP::Info::Entity
66
68 These are methods that return scalar value from SNMP
69
70 $hp->cpu()
71 Returns CPU Utilization in percentage.
72
73 $hp->log()
74 Returns all the log entries from the switch's log that are not Link
75 up or down messages.
76
77 $hp->mem_free()
78 Returns bytes of free memory
79
80 $hp->mem_total()
81 Return bytes of total memory
82
83 $hp->mem_used()
84 Returns bytes of used memory
85
86 $hp->model()
87 Returns the model number of the HP Switch. Will translate between
88 the HP Part number and the common model number with this map :
89
90 %MODEL_MAP = (
91 'J8131A' => 'WAP-420-WW',
92 'J8130A' => 'WAP-420-NA',
93 'J8133A' => 'AP520WL',
94 'J8680A' => '9408sl',
95 'J9091A' => '8212zl',
96 'J9475A' => '8206zl',
97 'J9265A' => '6600ml-24XG',
98 'J9264A' => '6600ml-24G-4XG',
99 'J9263A' => '6600ml-24G',
100 'J9452A' => '6600-48G-4XG',
101 'J9451A' => '6600-48G',
102 'J8474A' => '6410cl-6XG',
103 'J8433A' => '6400cl-6XG',
104 'J8992A' => '6200yl-24G',
105 'J4902A' => '6108',
106 'J8698A' => '5412zl',
107 'J8719A' => '5408yl',
108 'J8697A' => '5406zl',
109 'J8718A' => '5404yl',
110 'J4819A' => '5308XL',
111 'J4850A' => '5304XL',
112 'J8773A' => '4208vl',
113 'J8770A' => '4204vl',
114 'J8772A' => '4202vl-72',
115 'J9032A' => '4202vl-68G',
116 'J9031A' => '4202vl-68',
117 'J8771A' => '4202vl-48G',
118 'J4865A' => '4108GL',
119 'J4887A' => '4104GL',
120 'J9588A' => '3800-48G-PoE+-4XG',
121 'J9574A' => '3800-48G-PoE+-4SFP+',
122 'J9586A' => '3800-48G-4XG',
123 'J9576A' => '3800-48G-4SFP+',
124 'J9584A' => '3800-24SFP-2SFP+',
125 'J9587A' => '3800-24G-PoE+-2XG',
126 'J9573A' => '3800-24G-PoE+-2SFP+',
127 'J9585A' => '3800-24G-2XG',
128 'J9575A' => '3800-24G-2SFP+',
129 'J8693A' => '3500yl-48G-PWR',
130 'J8692A' => '3500yl-24G-PWR',
131 'J9473A' => '3500-48-PoE',
132 'J9472A' => '3500-48',
133 'J9471A' => '3500-24-PoE',
134 'J9470A' => '3500-24',
135 'J4906A' => '3400cl-48G',
136 'J4905A' => '3400cl-24G',
137 'J4815A' => '3324XL',
138 'J4851A' => '3124',
139 'J9562A' => '2915-8G-PoE',
140 'J9148A' => '2910al-48G-PoE+',
141 'J9147A' => '2910al-48G',
142 'J9146A' => '2910al-24G-PoE+',
143 'J9145A' => '2910al-24G',
144 'J9050A' => '2900-48G',
145 'J9049A' => '2900-24G',
146 'J4904A' => '2848',
147 'J4903A' => '2824',
148 'J9022A' => '2810-48G',
149 'J9021A' => '2810-24G',
150 'J8165A' => '2650-PWR',
151 'J4899B' => '2650-CR',
152 'J4899C' => '2650C',
153 'J4899A' => '2650',
154 'J8164A' => '2626-PWR',
155 'J4900B' => '2626-CR',
156 'J4900C' => '2626C',
157 'J4900A' => '2626',
158 'J9627A' => '2620-48-PoE+',
159 'J9626A' => '2620-48',
160 'J9624A' => '2620-24-PPoE+',
161 'J9625A' => '2620-24-PoE+',
162 'J9623A' => '2620-24',
163 'J9565A' => '2615-8-PoE',
164 'J9089A' => '2610-48-PWR',
165 'J9088A' => '2610-48',
166 'J9087A' => '2610-24-PWR',
167 'J9086A' => '2610-24/12PWR',
168 'J9085A' => '2610-24',
169 'J8762A' => '2600-8-PWR',
170 'J4813A' => '2524',
171 'J9298A' => '2520G-8-PoE',
172 'J9299A' => '2520G-24-PoE',
173 'J9137A' => '2520-8-PoE',
174 'J9138A' => '2520-24-PoE',
175 'J4812A' => '2512',
176 'J9280A' => '2510G-48',
177 'J9279A' => '2510G-24',
178 'J9020A' => '2510-48A',
179 'J9019B' => '2510-24B',
180 'J9019A' => '2510-24A',
181 'J4818A' => '2324',
182 'J4817A' => '2312',
183 'J9449A' => '1810G-8',
184 'J9450A' => '1810G-24',
185 'J9029A' => '1800-8G',
186 'J9028A' => '1800-24G',
187 );
188
189 $hp->os()
190 Returns hp
191
192 $hp->os_bin()
193 "hpSwitchRomVersion.0"
194
195 $hp->os_ver()
196 Tries to use os_version() and if that fails will try and cull the
197 version from the description field.
198
199 $hp->os_version()
200 "hpSwitchOsVersion.0"
201
202 $hp->serial()
203 Returns serial number if available through SNMP
204
205 $hp->slots()
206 Returns number of entries in $hp->e_name that have 'slot' in them.
207
208 $hp->vendor()
209 hp
210
211 $hp->fan()
212 Returns fan status
213
214 $hp->ps1_status()
215 Power supply 1 status
216
217 $hp->ps2_status()
218 Power supply 2 status
219
220 $hp->peth_port_power()
221 Power supplied by PoE ports, in milliwatts
222 ("hpicfPoePethPsePortPower")
223
224 $hp->stp_ver()
225 Returns what version of STP the device is running.
226 ("hpicfBridgeRstpForceVersion" with fallback to inherited
227 stp_ver())
228
229 Globals imported from SNMP::Info::Layer2
230 See documentation in "GLOBALS" in SNMP::Info::Layer2 for details.
231
232 Globals imported from SNMP::Info::MAU
233 See documentation in "GLOBALS" in SNMP::Info::MAU for details.
234
236 These are methods that return tables of information in the form of a
237 reference to a hash.
238
239 Overrides
240 $hp->interfaces()
241 Uses $hp->i_description()
242
243 $hp->i_duplex()
244 Returns reference to map of IIDs to current link duplex.
245
246 $hp->i_duplex_admin()
247 Returns reference to hash of IIDs to admin duplex setting.
248
249 $hp->vendor_i_type()
250 Returns reference to hash of IIDs to HP specific port type
251 ("hpSwitchPortType").
252
253 $hp->i_name()
254 Crosses i_name() with $hp->e_name() using $hp->e_port() and
255 i_alias()
256
257 $hp->peth_port_ifindex()
258 Returns reference to hash of power Ethernet port table entries map
259 back to interface index (c<ifIndex>)
260
261 "agg_ports"
262 Returns a HASH reference mapping from slave to master port for each
263 member of a port bundle on the device. Keys are ifIndex of the
264 slave ports, Values are ifIndex of the corresponding master ports.
265
266 Table Methods imported from SNMP::Info::Layer2
267 See documentation in "TABLE METHODS" in SNMP::Info::Layer2 for details.
268
269 Table Methods imported from SNMP::Info::MAU
270 See documentation in "TABLE METHODS" in SNMP::Info::MAU for details.
271
273 munge_hp_c_id()
274 Munge for c_id which handles CDP and LLDP.
275
277 These are methods that provide SNMP set functionality for overridden
278 methods or provide a simpler interface to complex set operations. See
279 "SETTING DATA VIA SNMP" in SNMP::Info for general information on set
280 operations.
281
282 set_i_vlan()
283 set_i_vlan_tagged()
284
285
286
287perl v5.32.0 2020-07-28 SNMP::Info::Layer2::HP(3)