SNMP::...pidCity(3pm)

✨ SNMP::Info::RapidCity(3pm) ✨

okay bestie, welcome to the User Contributed Perl Documentation corner of the internet πŸ’– this is SNMP::Info::RapidCity(3pm), and she is the SNMP Interface to the Avaya/Nortel RapidCity MIB. no cap.


🌸 NAME 🌸

SNMP::Info::RapidCity β€” SNMP Interface to the Avaya/Nortel RapidCity MIB πŸ¦‹


πŸŽ€ AUTHOR πŸŽ€

Eric Miller


🌈 SYNOPSIS 🌈

# Let SNMP::Info determine the correct subclass for you.
my $rapidcity = new SNMP::Info(
                       AutoSpecify => 1,
                       Debug       => 1,
                       # These arguments are passed directly to SNMP::Session
                       DestHost    => 'myswitch',
                       Community   => 'public',
                       Version     => 2
                       )
   or die "Can't connect to DestHost.\n";

my $class = $rapidcity->class();
print "SNMP::Info determined this device to fall under subclass : $class\n";

πŸ’… DESCRIPTION πŸ’…

SNMP::Info::RapidCity is a subclass of SNMP::Info that provides an interface to the RAPID-CITY MIB. This MIB is used across the Avaya/Nortel Ethernet Routing Switch and Ethernet Switch product lines (Formerly known as Passport, BayStack, and Accelar), as well as, the VSP 9000 and 7000 series. it's giving iconic hardware lineage, fr fr πŸ‘‘

Use or create in a subclass of SNMP::Info. Do not use directly.

🫢 bestie please do not use this directly, it is literally not built for that, use it inside a subclass like the good main character you are.

🧚 Inherited Classes

None. she inherits from no one, she is self-made ✨

πŸ“ Required MIBs

  • RAPID-CITY
  • NORTEL-NETWORKS-RAPID-SPANNING-TREE-MIB
  • NORTEL-NETWORKS-MULTIPLE-SPANNING-TREE-MIB

πŸ‘‘ GLOBALS πŸ‘‘

These are methods that return scalar values from SNMP. little one-value snackies, yum πŸ“

  • $rapidcity->rc_base_mac() β€” pulls from ("rc2kChassisBaseMacAddr")
  • $rapidcity->rc_serial() β€” pulls from ("rcChasSerialNumber")
  • $rapidcity->rc_ch_rev() β€” pulls from ("rcChasHardwareRevision")
  • $rapidcity->chassis() β€” pulls from ("rcChasType")
  • $rapidcity->slots() β€” pulls from ("rcChasNumSlots")
  • $rapidcity->rc_virt_ip() β€” pulls from ("rcSysVirtualIpAddr")
  • $rapidcity->rc_virt_mask() β€” pulls from ("rcSysVirtualNetMask")
  • $rapidcity->tftp_host() β€” pulls from ("rcTftpHost")
  • $rapidcity->tftp_file() β€” pulls from ("rcTftpFile")
  • $rapidcity->tftp_action() β€” pulls from ("rcTftpAction")
  • $rapidcity->tftp_result() β€” pulls from ("rcTftpResult")

πŸ”₯ Overrides πŸ”₯

  • $rapidcity->serial() β€” Returns serial number of the chassis. periodt πŸ’…
  • $rapidcity->stp_ver() β€” Returns the particular STP version running on this device.

Values: "nortelStpg", "pvst", "rstp", "mstp", "ieee8021d"

pulls from ("rcSysSpanningTreeOperMode")

✨ TABLE METHODS ✨

Okay bestie, these are the methods that hand you back tables of info, and they always give them to you as a reference to a hash. Like, you get a ref, you deref it, you live your life. πŸ’…


  • $rapidcity->i_duplex() β€” gives you back a reference to a map of IIDs β†’ whatever duplex the link is currently running. πŸ¦‹
  • $rapidcity->i_duplex_admin() β€” reference to a hash of IIDs β†’ the admin duplex setting. (the setting, not the reality, okurrr)
  • $rapidcity->i_vlan() β€” maps ifIndex to the PVID or the default VLAN. πŸŽ€
  • $rapidcity->i_vlan_membership() β€” returns a reference to a hash of arrays: key = ifIndex, value = array of VLAN IDs. These are the VLANs sitting in the egress list for that port. 🫢

Example:

my $interfaces = $rapidcity->interfaces();
my $vlans      = $rapidcity->i_vlan_membership();

foreach my $iid (sort keys %$interfaces) {
  my $port = $interfaces->{$iid};
  my $vlan = join(',', sort(@{$vlans->{$iid}}));
  print "Port: $port VLAN: $vlan\n";
}
  • $rapidcity->i_vlan_membership_untagged() β€” same shape, hash of arrays again: key = ifIndex, value = array of VLAN IDs, except these are the VLANs in the untagged egress list for the port. ✨
  • $rapidcity->v_index() β€” returns VLAN IDs.

(rcVlanId)

  • $rapidcity->agg_ports() β€” returns a HASH reference mapping slave β†’ master port for every member of a port bundle (MLT) on the device. Keys are the ifIndex of the slave ports, values are the ifIndex of the matching master ports. iconic honestly πŸ”₯
  • $rapidcity->i_stp_state() β€” returns the mapping from dot1dStpPortState to the interface index (iid). πŸ’œ
  • $rapidcity->mst_vlan2instance() β€” returns the mapping of VLAN β†’ Spanning Tree Group (STG) instance, as a hash reference where key = VLAN id and value = STG instance.

(rcVlanStgId)

  • $rapidcity->i_bpduguard_enabled() β€” returns true or false depending on whether BpduGuard is enabled on a given port. Format is a hash reference with key = ifIndex, value = [true|false].

(rcPortBpduFilteringOperEnabled)


πŸ‘‘ RAPID-CITY Port Table (rcPortTable)

  • $rapidcity->rc_index() β€” (rcPortIndex)
  • $rapidcity->rc_duplex() β€” (rcPortOperDuplex)
  • $rapidcity->rc_duplex_admin() β€” (rcPortAdminDuplex)
  • $rapidcity->rc_speed_admin() β€” (rcPortAdminSpeed)
  • $rapidcity->rc_auto() β€” (rcPortAutoNegotiate)
  • $rapidcity->rc_alias() β€” (rcPortName)

🌈 RAPID-CITY CPU Ethernet Port Table (rc2kCpuEthernetPortTable)

  • $rapidcity->rc_cpu_ifindex() β€” (rc2kCpuEthernetPortIfIndex)
  • $rapidcity->rc_cpu_admin() β€” (rc2kCpuEthernetPortAdminStatus)
  • $rapidcity->rc_cpu_oper() β€” (rc2kCpuEthernetPortOperStatus)
  • $rapidcity->rc_cpu_ip() β€” (rc2kCpuEthernetPortAddr)
  • $rapidcity->rc_cpu_mask() β€” (rc2kCpuEthernetPortMask)
  • $rapidcity->rc_cpu_auto() β€” (rc2kCpuEthernetPortAutoNegotiate)
  • $rapidcity->rc_cpu_duplex_admin() β€” (rc2kCpuEthernetPortAdminDuplex)
  • $rapidcity->rc_cpu_duplex() β€” (rc2kCpuEthernetPortOperDuplex)
  • $rapidcity->rc_cpu_speed_admin() β€” (rc2kCpuEthernetPortAdminSpeed)
  • $rapidcity->rc_cpu_speed_oper() β€” (rc2kCpuEthernetPortOperSpeed)
  • $rapidcity->rc_cpu_mac() β€” (rc2kCpuEthernetPortMgmtMacAddr)

πŸ¦‹ RAPID-CITY VLAN Port Table (rcVlanPortTable)

  • $rapidcity->rc_i_vlan_if() β€” (rcVlanPortIndex)
  • $rapidcity->rc_i_vlan_num() β€” (rcVlanPortNumVlanIds)
  • $rapidcity->rc_i_vlan() β€” (rcVlanPortVlanIds)
  • $rapidcity->rc_i_vlan_type() β€” (rcVlanPortType)
  • $rapidcity->rc_i_vlan_pvid() β€” (rcVlanPortDefaultVlanId)
  • $rapidcity->rc_i_vlan_tag() β€” (rcVlanPortPerformTagging)

πŸŽ€ RAPID-CITY VLAN Table (rcVlanTable)

  • $rapidcity->rc_vlan_id() β€” (rcVlanId)
  • $rapidcity->v_name() β€” (rcVlanName)
  • $rapidcity->rc_vlan_color() β€” (rcVlanColor)
  • $rapidcity->rc_vlan_if() β€” (rcVlanIfIndex)
  • $rapidcity->rc_vlan_stg() β€” (rcVlanStgId)
  • $rapidcity->rc_vlan_type() β€” (rcVlanType)
  • $rapidcity->rc_vlan_members() β€” (rcVlanPortMembers)
  • $rapidcity->rc_vlan_mac() β€” (rcVlanMacAddress)

πŸ’œ RAPID-CITY IP Address Table (rcIpAddrTable)

  • $rapidcity->rc_ip_index() β€” (rcIpAdEntIfIndex)
  • $rapidcity->rc_ip_addr() β€” (rcIpAdEntAddr)
  • $rapidcity->rc_ip_type() β€” (rcIpAdEntIfType)

🌸 RAPID-CITY Chassis Fan Table (rcChasFanTable)

  • $rapidcity->rc_fan_op() β€” (rcChasFanOperStatus)

⚑ RAPID-CITY Power Supply Table (rcChasPowerSupplyTable)

  • $rapidcity->rc_ps_op() β€” (rcChasPowerSupplyOperStatus)

⚑ RAPID-CITY Power Supply Detail Table (rcChasPowerSupplyDetailTable)

  • $rapidcity->rc_ps_type() β€” (rcChasPowerSupplyDetailType)
  • $rapidcity->rc_ps_serial() β€” (rcChasPowerSupplyDetailSerialNumber)
  • $rapidcity->rc_ps_rev() β€” (rcChasPowerSupplyDetailHardwareRevision)
  • $rapidcity->rc_ps_part() β€” (rcChasPowerSupplyDetailPartNumber)
  • $rapidcity->rc_ps_detail() β€” (rcChasPowerSupplyDetailDescription)

🧚 RAPID-CITY Card Table (rcCardTable)

  • $rapidcity->rc_c_type() β€” (rcCardType)
  • $rapidcity->rc_c_serial() β€” (rcCardSerialNumber)
  • $rapidcity->rc_c_rev() β€” (rcCardHardwareRevision)
  • $rapidcity->rc_c_part() β€” (rcCardPartNumber)

🧚 RAPID-CITY 2k Card Table (rc2kCardTable)

  • $rapidcity->rc2k_c_ftype() β€” (rc2kCardFrontType)
  • $rapidcity->rc2k_c_fdesc() β€” (rc2kCardFrontDescription)
  • $rapidcity->rc2k_c_fserial() β€” (rc2kCardFrontSerialNum)
  • $rapidcity->rc2k_c_frev() β€” (rc2kCardFrontHwVersion)
  • $rapidcity->rc2k_c_fpart() β€” (rc2kCardFrontPartNumber)
  • $rapidcity->rc2k_c_fdate() β€” (rc2kCardFrontDateCode)
  • $rapidcity->rc2k_c_fdev() β€” (rc2kCardFrontDeviations)
  • $rapidcity->rc2k_c_btype() β€” (rc2kCardBackType)
  • $rapidcity->rc2k_c_bdesc() β€” (rc2kCardBackDescription)
  • $rapidcity->rc2k_c_bserial() β€” (rc2kCardBackSerialNum)
  • $rapidcity->rc2k_c_brev() β€” (rc2kCardBackHwVersion)
  • $rapidcity->rc2k_c_bpart() β€” (rc2kCardBackPartNumber)
  • $rapidcity->rc2k_c_bdate() β€” (rc2kCardBackDateCode)
  • $rapidcity->rc2k_c_bdev() β€” (rc2kCardBackDeviations)

πŸ“ RAPID-CITY MDA Card Table (rc2kMdaCardTable)

  • $rapidcity->rc2k_mda_type() β€” (rc2kMdaCardType)
  • $rapidcity->rc2k_mda_desc() β€” (rc2kMdaCardDescription)
  • $rapidcity->rc2k_mda_serial() β€” (rc2kMdaCardSerialNum)
  • $rapidcity->rc2k_mda_rev() β€” (rc2kMdaCardHwVersion)
  • $rapidcity->rc2k_mda_part() β€” (rc2kMdaCardPartNumber)
  • $rapidcity->rc2k_mda_date() β€” (rc2kMdaCardDateCode)
  • $rapidcity->rc2k_mda_dev() β€” (rc2kMdaCardDeviations)

🌈 RAPID-CITY Bridge SPBM MAC Table (rcBridgeSpbmMacTable)

  • $rapidcity->rc_spbm_fw_mac() β€” returns a reference to a hash of forwarding table MAC Addresses.

(rcBridgeSpbmMacAddr)

  • $rapidcity->rc_spbm_fw_port() β€” returns a reference to a hash of forwarding table entries' port interface identifier (iid).

(rcBridgeSpbmMacCPort)

  • $rapidcity->rc_spbm_fw_status() β€” returns a reference to a hash of forwarding table entries' status.

(rcBridgeSpbmMacStatus)

  • $rapidcity->rc_spbm_fw_vlan() β€” returns a reference to a hash of forwarding table entries' Customer VLAN ID.

(rcBridgeSpbmMacCVlanId)

  • $rapidcity->rc_spbm_fw_isid() β€” returns a reference to a hash of forwarding table entries' ISID.

(rcBridgeSpbmMacIsid)


🌸 Spanning Tree Instance Globals

Heads up bestie, this is important: the RSTP and ieee8021d operating modes do not populate the RAPID-CITY::rcStgTable, but they do populate BRIDGE-MIB. So these methods check RAPID-CITY first and fall back to BRIDGE-MIB if it's not there. 🫢

  • $rapidcity->stp_i_mac() β€” returns the bridge address. πŸ’…
  • $rapidcity->stp_i_time() β€” returns the time since the last topology change was detected. (in 100ths/second)
  • $rapidcity->stp_i_ntop() β€” returns the total number of topology changes detected.
  • $rapidcity->stp_i_root() β€” returns the root of STP.
  • $rapidcity->stp_i_root_port() β€” returns the port number of the port that offers the lowest cost path to the root bridge.
  • $rapidcity->stp_i_priority() β€” returns the port number of the port that offers the lowest cost path to the root bridge.

πŸ”₯ Spanning Tree Protocol Port Table

Same disclaimer as above, no cap: RSTP and ieee8021d operating modes do not populate the RAPID-CITY::rcStgPortTable, but they do populate BRIDGE-MIB. These methods check RAPID-CITY first and fall back to BRIDGE-MIB. 😭

  • $rapidcity->stp_p_id() β€” "The port number of the port for which this entry contains Spanning Tree Protocol management information."
  • $rapidcity->stp_p_priority() β€” "The value of the priority field which is contained in the first (in network byte order) octet of the (2 octet long) Port ID. The other octet of the Port ID is given by the value of "dot1dStpPort"."
  • $rapidcity->stp_p_state() β€” "The port's current state as defined by application of the Spanning Tree Protocol."
  • $rapidcity->stp_p_cost() β€” "The contribution of this port to the path cost of paths towards the spanning tree root which include this port."
  • $rapidcity->stp_p_root() β€” "The unique Bridge Identifier of the Bridge recorded as the Root in the Configuration BPDUs transmitted by the Designated Bridge for the segment to which the port is attached."
  • $rapidcity->stp_p_bridge() β€” "The Bridge Identifier of the bridge which this port considers to be the Designated Bridge for this port's segment."
  • $rapidcity->stp_p_port() β€” "The Port Identifier of the port on the Designated Bridge for this port's segment."

✨ SET METHODS ✨

Okay bestie, this is the part where we stop looking at the switch and start poking it. 🫢 These methods give you SNMP set functionality β€” either for overridden methods or as a simpler lil interface wrapped around set operations that are otherwise a whole mess. 🌈

If you want the general tea on set operations, go read "SETTING DATA VIA SNMP" in SNMP::Info. iykyk. πŸ’…


πŸ’– $rapidcity->set_i_speed_admin(speed, ifIndex)

Sets port speed, fr fr. You must supply both the speed and the port ifIndex. The speed choices are 'auto', '10', '100', '1000'. That's it, that's the list, no extras. ✨

Example:

my %if_map = reverse %{$rapidcity->interfaces()};
$rapidcity->set_i_speed_admin('auto', $if_map{'1.1'})
   or die "Couldn't change port speed. ",$rapidcity->error(1);

πŸ¦‹ $rapidcity->set_i_duplex_admin(duplex, ifIndex)

Sets port duplex β€” again, you must hand it the duplex and the port ifIndex. The duplex choices are 'auto', 'half', 'full'. Pick one, no custom vibes allowed. πŸ’œ

Example:

my %if_map = reverse %{$rapidcity->interfaces()};
$rapidcity->set_i_duplex_admin('auto', $if_map{'1.1'})
  or die "Couldn't change port duplex. ",$rapidcity->error(1);

πŸŽ€ $rapidcity->set_i_vlan(vlan, ifIndex)

Changes an access (untagged) port VLAN. You must give it the numeric VLAN ID and the port ifIndex. This method is gonna modify the port's VLAN membership and its PVID (that's the default VLAN, bestie). πŸ’…

Heads up: only use this bad boy on end station (non-trunk) ports. Trunk ports? Not the moment. πŸ™ˆ

Example:

my %if_map = reverse %{$rapidcity->interfaces()};
$rapidcity->set_i_vlan('2', $if_map{'1.1'})
  or die "Couldn't change port VLAN. ",$rapidcity->error(1);

🌸 $rapidcity->set_i_pvid(pvid, ifIndex)

Sets the port PVID, aka the default VLAN. Supply the numeric VLAN ID and the port ifIndex, obviously. 🧚

Note the lore: this one only changes the PVID. If you actually wanna modify an access (untagged) port, use set_i_vlan() instead. Different method, different job, no cap. ⭐

Example:

my %if_map = reverse %{$rapidcity->interfaces()};
$rapidcity->set_i_pvid('2', $if_map{'1.1'})
  or die "Couldn't change port PVID. ",$rapidcity->error(1);

πŸ”₯ $rapidcity->set_add_i_vlan_tagged(vlan, ifIndex)

Adds the port to the egress list of the VLAN. You must supply the numeric VLAN ID and the port ifIndex. Putting it on the list, main character behavior. πŸ‘‘

Example:

my %if_map = reverse %{$rapidcity->interfaces()};
$rapidcity->set_add_i_vlan_tagged('2', $if_map{'1.1'})
  or die "Couldn't add port to egress list. ",$rapidcity->error(1);

πŸ’€ $rapidcity->set_remove_i_vlan_tagged(vlan, ifIndex)

Removes the port from the egress list of the VLAN. Must be supplied with the numeric VLAN ID and the port ifIndex. It's giving "you're off the list, bestie". 😭

Example:

my %if_map = reverse %{$rapidcity->interfaces()};
$rapidcity->set_remove_i_vlan_tagged('2', $if_map{'1.1'})
  or die "Couldn't add port to egress list. ",$rapidcity->error(1);
Ngl, that error message in the original example says "Couldn't add port to egress list." even though we're removing. I'm keeping it exactly as written, character for character β€” don't come for me, it's the source's line, not mine. πŸ’–

🌈 $rapidcity->set_delete_vlan(vlan)

Deletes the specified VLAN off the device. Poof, gone, no more. πŸ’…


✨ $rapidcity->set_create_vlan(name, vlan)

Creates the specified VLAN on the device. New VLAN, new era, we love to see it. πŸŽ€

Note: this method only allows creation of Port type VLANs, and it does not allow you to set the Spanning Tree Group (STG) β€” that just defaults to 1. So if you needed something fancier, this ain't it. πŸ™ˆ

and that's the whole page, bestie!! πŸ₯³ you made it to the very end, iconic behavior honestly. this was the SNMP::...pidCity(3pm) manual page from the User Contributed Perl Documentation, and yes it came with perl v5.40.1 and the date 2026-02-28 stamped on it β€” that's the source and version, right there in the footer. go forth and set some SNMP data responsibly, mwah πŸ’–πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from