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