1SNMP::Info::RapidCity(3U)ser Contributed Perl DocumentatiSoNnMP::Info::RapidCity(3)
2
3
4
6 SNMP::Info::RapidCity - SNMP Interface to the Avaya/Nortel RapidCity
7 MIB
8
10 Eric Miller
11
13 # Let SNMP::Info determine the correct subclass for you.
14 my $rapidcity = new SNMP::Info(
15 AutoSpecify => 1,
16 Debug => 1,
17 # These arguments are passed directly to SNMP::Session
18 DestHost => 'myswitch',
19 Community => 'public',
20 Version => 2
21 )
22 or die "Can't connect to DestHost.\n";
23
24 my $class = $rapidcity->class();
25 print "SNMP::Info determined this device to fall under subclass : $class\n";
26
28 SNMP::Info::RapidCity is a subclass of SNMP::Info that provides an
29 interface to the "RAPID-CITY" MIB. This MIB is used across the
30 Avaya/Nortel Ethernet Routing Switch and Ethernet Switch product lines
31 (Formerly known as Passport, BayStack, and Accelar), as well as, the
32 VSP 9000 and 7000 series.
33
34 Use or create in a subclass of SNMP::Info. Do not use directly.
35
36 Inherited Classes
37 None.
38
39 Required MIBs
40 RAPID-CITY
41
43 These are methods that return scalar values from SNMP
44
45 $rapidcity->rc_base_mac()
46 ("rc2kChassisBaseMacAddr")
47
48 $rapidcity->rc_serial()
49 ("rcChasSerialNumber")
50
51 $rapidcity->rc_ch_rev()
52 ("rcChasHardwareRevision")
53
54 $rapidcity->chassis()
55 ("rcChasType")
56
57 $rapidcity->slots()
58 ("rcChasNumSlots")
59
60 $rapidcity->rc_virt_ip()
61 ("rcSysVirtualIpAddr")
62
63 $rapidcity->rc_virt_mask()
64 ("rcSysVirtualNetMask")
65
66 $rapidcity->tftp_host()
67 ("rcTftpHost")
68
69 $rapidcity->tftp_file()
70 ("rcTftpFile")
71
72 $rapidcity->tftp_action()
73 ("rcTftpAction")
74
75 $rapidcity->tftp_result()
76 ("rcTftpResult")
77
78 Overrides
79 $rapidcity->serial()
80 Returns serial number of the chassis
81
82 $rapidcity->stp_ver()
83 Returns the particular STP version running on this device.
84
85 Values: "nortelStpg", "pvst", "rstp", "mstp", "ieee8021d"
86
87 ("rcSysSpanningTreeOperMode")
88
90 These are methods that return tables of information in the form of a
91 reference to a hash.
92
93 $rapidcity->i_duplex()
94 Returns reference to map of IIDs to current link duplex.
95
96 $rapidcity->i_duplex_admin()
97 Returns reference to hash of IIDs to admin duplex setting.
98
99 $rapidcity->i_vlan()
100 Returns a mapping between "ifIndex" and the PVID or default VLAN.
101
102 $rapidcity->i_vlan_membership()
103 Returns reference to hash of arrays: key = "ifIndex", value = array
104 of VLAN IDs. These are the VLANs which are members of the egress
105 list for the port.
106
107 Example:
108 my $interfaces = $rapidcity->interfaces();
109 my $vlans = $rapidcity->i_vlan_membership();
110
111 foreach my $iid (sort keys %$interfaces) {
112 my $port = $interfaces->{$iid};
113 my $vlan = join(',', sort(@{$vlans->{$iid}}));
114 print "Port: $port VLAN: $vlan\n";
115 }
116
117 $rapidcity->i_vlan_membership_untagged()
118 Returns reference to hash of arrays: key = "ifIndex", value = array
119 of VLAN IDs. These are the VLANs which are members of the untagged
120 egress list for the port.
121
122 $rapidcity->v_index()
123 Returns VLAN IDs
124
125 ("rcVlanId")
126
127 $rapidcity->agg_ports()
128 Returns a HASH reference mapping from slave to master port for each
129 member of a port bundle (MLT) on the device. Keys are ifIndex of
130 the slave ports, Values are ifIndex of the corresponding master
131 ports.
132
133 $rapidcity->i_stp_state()
134 Returns the mapping of ("dot1dStpPortState") to the interface index
135 (iid).
136
137 $rapidcity->mst_vlan2instance()
138 Returns the mapping of VLAN to Spanning Tree Group (STG) instance
139 in the form of a hash reference with key = VLAN id, value = STG
140 instance
141
142 ("rcVlanStgId")
143
144 $rapidcity->i_bpduguard_enabled()
145 Returns true or false depending on whether "BpduGuard" is enabled
146 on a given port. Format is a hash reference with key = "ifIndex",
147 value = [true|false]
148
149 ("rcPortBpduFilteringOperEnabled")
150
151 RAPID-CITY Port Table ("rcPortTable")
152 $rapidcity->rc_index()
153 ("rcPortIndex")
154
155 $rapidcity->rc_duplex()
156 ("rcPortOperDuplex")
157
158 $rapidcity->rc_duplex_admin()
159 ("rcPortAdminDuplex")
160
161 $rapidcity->rc_speed_admin()
162 ("rcPortAdminSpeed")
163
164 $rapidcity->rc_auto()
165 ("rcPortAutoNegotiate")
166
167 $rapidcity->rc_alias()
168 ("rcPortName")
169
170 RAPID-CITY CPU Ethernet Port Table ("rc2kCpuEthernetPortTable")
171 $rapidcity->rc_cpu_ifindex()
172 ("rc2kCpuEthernetPortIfIndex")
173
174 $rapidcity->rc_cpu_admin()
175 ("rc2kCpuEthernetPortAdminStatus")
176
177 $rapidcity->rc_cpu_oper()
178 ("rc2kCpuEthernetPortOperStatus")
179
180 $rapidcity->rc_cpu_ip()
181 ("rc2kCpuEthernetPortAddr")
182
183 $rapidcity->rc_cpu_mask()
184 ("rc2kCpuEthernetPortMask")
185
186 $rapidcity->rc_cpu_auto()
187 ("rc2kCpuEthernetPortAutoNegotiate")
188
189 $rapidcity->rc_cpu_duplex_admin()
190 ("rc2kCpuEthernetPortAdminDuplex")
191
192 $rapidcity->rc_cpu_duplex()
193 ("rc2kCpuEthernetPortOperDuplex")
194
195 $rapidcity->rc_cpu_speed_admin()
196 ("rc2kCpuEthernetPortAdminSpeed")
197
198 $rapidcity->rc_cpu_speed_oper()
199 ("rc2kCpuEthernetPortOperSpeed")
200
201 $rapidcity->rc_cpu_mac()
202 ("rc2kCpuEthernetPortMgmtMacAddr")
203
204 RAPID-CITY VLAN Port Table ("rcVlanPortTable")
205 $rapidcity->rc_i_vlan_if()
206 ("rcVlanPortIndex")
207
208 $rapidcity->rc_i_vlan_num()
209 ("rcVlanPortNumVlanIds")
210
211 $rapidcity->rc_i_vlan()
212 ("rcVlanPortVlanIds")
213
214 $rapidcity->rc_i_vlan_type()
215 ("rcVlanPortType")
216
217 $rapidcity->rc_i_vlan_pvid()
218 ("rcVlanPortDefaultVlanId")
219
220 $rapidcity->rc_i_vlan_tag()
221 ("rcVlanPortPerformTagging")
222
223 RAPID-CITY VLAN Table ("rcVlanTable")
224 $rapidcity->rc_vlan_id()
225 ("rcVlanId")
226
227 $rapidcity->v_name()
228 ("rcVlanName")
229
230 $rapidcity->rc_vlan_color()
231 ("rcVlanColor")
232
233 $rapidcity->rc_vlan_if()
234 ("rcVlanIfIndex")
235
236 $rapidcity->rc_vlan_stg()
237 ("rcVlanStgId")
238
239 $rapidcity->rc_vlan_type()
240 ("rcVlanType")
241
242 $rapidcity->rc_vlan_members()
243 ("rcVlanPortMembers")
244
245 $rapidcity->rc_vlan_mac()
246 ("rcVlanMacAddress")
247
248 RAPID-CITY IP Address Table ("rcIpAddrTable")
249 $rapidcity->rc_ip_index()
250 ("rcIpAdEntIfIndex")
251
252 $rapidcity->rc_ip_addr()
253 ("rcIpAdEntAddr")
254
255 $rapidcity->rc_ip_type()
256 ("rcIpAdEntIfType")
257
258 RAPID-CITY Chassis Fan Table ("rcChasFanTable")
259 $rapidcity->rc_fan_op()
260 ("rcChasFanOperStatus")
261
262 RAPID-CITY Power Supply Table ("rcChasPowerSupplyTable")
263 $rapidcity->rc_ps_op()
264 ("rcChasPowerSupplyOperStatus")
265
266 RAPID-CITY Power Supply Detail Table ("rcChasPowerSupplyDetailTable")
267 $rapidcity->rc_ps_type()
268 ("rcChasPowerSupplyDetailType")
269
270 $rapidcity->rc_ps_serial()
271 ("rcChasPowerSupplyDetailSerialNumber")
272
273 $rapidcity->rc_ps_rev()
274 ("rcChasPowerSupplyDetailHardwareRevision")
275
276 $rapidcity->rc_ps_part()
277 ("rcChasPowerSupplyDetailPartNumber")
278
279 $rapidcity->rc_ps_detail()
280 ("rcChasPowerSupplyDetailDescription")
281
282 RAPID-CITY Card Table ("rcCardTable")
283 $rapidcity->rc_c_type()
284 ("rcCardType")
285
286 $rapidcity->rc_c_serial()
287 ("rcCardSerialNumber")
288
289 $rapidcity->rc_c_rev()
290 ("rcCardHardwareRevision")
291
292 $rapidcity->rc_c_part()
293 ("rcCardPartNumber")
294
295 RAPID-CITY 2k Card Table ("rc2kCardTable")
296 $rapidcity->rc2k_c_ftype()
297 ("rc2kCardFrontType")
298
299 $rapidcity->rc2k_c_fdesc()
300 ("rc2kCardFrontDescription")
301
302 $rapidcity->rc2k_c_fserial()
303 ("rc2kCardFrontSerialNum")
304
305 $rapidcity->rc2k_c_frev()
306 ("rc2kCardFrontHwVersion")
307
308 $rapidcity->rc2k_c_fpart()
309 ("rc2kCardFrontPartNumber")
310
311 $rapidcity->rc2k_c_fdate()
312 ("rc2kCardFrontDateCode")
313
314 $rapidcity->rc2k_c_fdev()
315 ("rc2kCardFrontDeviations")
316
317 $rapidcity->rc2k_c_btype()
318 ("rc2kCardBackType")
319
320 $rapidcity->rc2k_c_bdesc()
321 ("rc2kCardBackDescription")
322
323 $rapidcity->rc2k_c_bserial()
324 ("rc2kCardBackSerialNum")
325
326 $rapidcity->rc2k_c_brev()
327 ("rc2kCardBackHwVersion")
328
329 $rapidcity->rc2k_c_bpart()
330 ("rc2kCardBackPartNumber")
331
332 $rapidcity->rc2k_c_bdate()
333 ("rc2kCardBackDateCode")
334
335 $rapidcity->rc2k_c_bdev()
336 ("rc2kCardBackDeviations")
337
338 RAPID-CITY MDA Card Table ("rc2kMdaCardTable")
339 $rapidcity->rc2k_mda_type()
340 ("rc2kMdaCardType")
341
342 $rapidcity->rc2k_mda_desc()
343 ("rc2kMdaCardDescription")
344
345 $rapidcity->rc2k_mda_serial()
346 ("rc2kMdaCardSerialNum")
347
348 $rapidcity->rc2k_mda_rev()
349 ("rc2kMdaCardHwVersion")
350
351 $rapidcity->rc2k_mda_part()
352 ("rc2kMdaCardPartNumber")
353
354 $rapidcity->rc2k_mda_date()
355 ("rc2kMdaCardDateCode")
356
357 $rapidcity->rc2k_mda_dev()
358 ("rc2kMdaCardDeviations")
359
360 RAPID-CITY Bridge SPBM MAC Table ("rcBridgeSpbmMacTable")
361 $rapidcity->rc_spbm_fw_mac()
362 Returns reference to hash of forwarding table MAC Addresses
363
364 ("rcBridgeSpbmMacAddr")
365
366 $rapidcity->rc_spbm_fw_port()
367 Returns reference to hash of forwarding table entries port
368 interface identifier (iid)
369
370 ("rcBridgeSpbmMacCPort")
371
372 $rapidcity->rc_spbm_fw_status()
373 Returns reference to hash of forwarding table entries status
374
375 ("rcBridgeSpbmMacStatus")
376
377 $rapidcity->rc_spbm_fw_vlan()
378 Returns reference to hash of forwarding table entries Customer VLAN
379 ID
380
381 ("rcBridgeSpbmMacCVlanId")
382
383 $rapidcity->rc_spbm_fw_isid()
384 Returns reference to hash of forwarding table entries ISID
385
386 ("rcBridgeSpbmMacIsid")
387
388 Spanning Tree Instance Globals
389 "RSTP" and "ieee8021d" operating modes do not populate the
390 "RAPID-CITY::rcStgTable" but do populate BRIDGE-MIB. These methods
391 check RAPID-CITY first and fall back to BRIDGE-MIB.
392
393 $rapidcity->stp_i_mac()
394 Returns the bridge address
395
396 $rapidcity->stp_i_time()
397 Returns time since last topology change detected. (100ths/second)
398
399 $rapidcity->stp_i_ntop()
400 Returns the total number of topology changes detected.
401
402 $rapidcity->stp_i_root()
403 Returns root of STP.
404
405 $rapidcity->stp_i_root_port()
406 Returns the port number of the port that offers the lowest cost
407 path to the root bridge.
408
409 $rapidcity->stp_i_priority()
410 Returns the port number of the port that offers the lowest cost
411 path to the root bridge.
412
413 Spanning Tree Protocol Port Table
414 "RSTP" and "ieee8021d" operating modes do not populate the
415 "RAPID-CITY::rcStgPortTable" but do populate BRIDGE-MIB. These methods
416 check RAPID-CITY first and fall back to BRIDGE-MIB.
417
418 $rapidcity->stp_p_id()
419 "The port number of the port for which this entry contains Spanning
420 Tree Protocol management information."
421
422 $rapidcity->stp_p_priority()
423 "The value of the priority field which is contained in the first
424 (in network byte order) octet of the (2 octet long) Port ID. The
425 other octet of the Port ID is given by the value of
426 "dot1dStpPort"."
427
428 $rapidcity->stp_p_state()
429 "The port's current state as defined by application of the Spanning
430 Tree Protocol."
431
432 $rapidcity->stp_p_cost()
433 "The contribution of this port to the path cost of paths towards
434 the spanning tree root which include this port."
435
436 $rapidcity->stp_p_root()
437 "The unique Bridge Identifier of the Bridge recorded as the Root in
438 the Configuration BPDUs transmitted by the Designated Bridge for
439 the segment to which the port is attached."
440
441 $rapidcity->stp_p_bridge()
442 "The Bridge Identifier of the bridge which this port considers to
443 be the Designated Bridge for this port's segment."
444
445 $rapidcity->stp_p_port()
446 "The Port Identifier of the port on the Designated Bridge for this
447 port's segment."
448
450 These are methods that provide SNMP set functionality for overridden
451 methods or provide a simpler interface to complex set operations. See
452 "SETTING DATA VIA SNMP" in SNMP::Info for general information on set
453 operations.
454
455 $rapidcity->set_i_speed_admin(speed, ifIndex)
456 Sets port speed, must be supplied with speed and port "ifIndex".
457 Speed choices are 'auto', '10', '100', '1000'.
458
459 Example:
460 my %if_map = reverse %{$rapidcity->interfaces()};
461 $rapidcity->set_i_speed_admin('auto', $if_map{'1.1'})
462 or die "Couldn't change port speed. ",$rapidcity->error(1);
463
464 $rapidcity->set_i_duplex_admin(duplex, ifIndex)
465 Sets port duplex, must be supplied with duplex and port "ifIndex".
466 Speed choices are 'auto', 'half', 'full'.
467
468 Example:
469 my %if_map = reverse %{$rapidcity->interfaces()};
470 $rapidcity->set_i_duplex_admin('auto', $if_map{'1.1'})
471 or die "Couldn't change port duplex. ",$rapidcity->error(1);
472
473 $rapidcity->set_i_vlan(vlan, ifIndex)
474 Changes an access (untagged) port VLAN, must be supplied with the
475 numeric VLAN ID and port "ifIndex". This method will modify the
476 port's VLAN membership and PVID (default VLAN). This method should
477 only be used on end station (non-trunk) ports.
478
479 Example:
480 my %if_map = reverse %{$rapidcity->interfaces()};
481 $rapidcity->set_i_vlan('2', $if_map{'1.1'})
482 or die "Couldn't change port VLAN. ",$rapidcity->error(1);
483
484 $rapidcity->set_i_pvid(pvid, ifIndex)
485 Sets port PVID or default VLAN, must be supplied with the numeric
486 VLAN ID and port "ifIndex". This method only changes the PVID, to
487 modify an access (untagged) port use set_i_vlan() instead.
488
489 Example:
490 my %if_map = reverse %{$rapidcity->interfaces()};
491 $rapidcity->set_i_pvid('2', $if_map{'1.1'})
492 or die "Couldn't change port PVID. ",$rapidcity->error(1);
493
494 $rapidcity->set_add_i_vlan_tagged(vlan, ifIndex)
495 Adds the port to the egress list of the VLAN, must be supplied with
496 the numeric VLAN ID and port "ifIndex".
497
498 Example:
499 my %if_map = reverse %{$rapidcity->interfaces()};
500 $rapidcity->set_add_i_vlan_tagged('2', $if_map{'1.1'})
501 or die "Couldn't add port to egress list. ",$rapidcity->error(1);
502
503 $rapidcity->set_remove_i_vlan_tagged(vlan, ifIndex)
504 Removes the port from the egress list of the VLAN, must be supplied
505 with the numeric VLAN ID and port "ifIndex".
506
507 Example:
508 my %if_map = reverse %{$rapidcity->interfaces()};
509 $rapidcity->set_remove_i_vlan_tagged('2', $if_map{'1.1'})
510 or die "Couldn't add port to egress list. ",$rapidcity->error(1);
511
512 $rapidcity->set_delete_vlan(vlan)
513 Deletes the specified VLAN from the device.
514
515 $rapidcity->set_create_vlan(name, vlan)
516 Creates the specified VLAN on the device.
517
518 Note: This method only allows creation of Port type VLANs and does
519 not allow for the setting of the Spanning Tree Group (STG) which
520 defaults to 1.
521
522
523
524perl v5.28.0 2018-11-29 SNMP::Info::RapidCity(3)