SNMP::Info::RapidCity - SNMP Interface to the Nortel RapidCity MIB
Eric Miller
# 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";
SNMP::Info::RapidCity is a subclass of SNMP::Info that provides an interface to the RAPID-CITY MIB. This MIB is used across the Nortel Ethernet Routing Switch and Ethernet Switch product lines (Formerly known as Passport, BayStack, and Accelar).
RAPID-CITY
Use or create in a subclass of SNMP::Info. Do not use directly.
None.
These are methods that return scalar values from SNMP
(rc2kChassisBaseMacAddr)
rc2kChassisBaseMacAddr
(rcChasSerialNumber)
rcChasSerialNumber
(rcChasHardwareRevision)
rcChasHardwareRevision
(rcChasType)
rcChasType
(rcChasNumSlots)
rcChasNumSlots
(rcSysVirtualIpAddr)
rcSysVirtualIpAddr
(rcSysVirtualNetMask)
rcSysVirtualNetMask
(rcTftpHost)
rcTftpHost
(rcTftpFile)
rcTftpFile
(rcTftpAction)
rcTftpAction
(rcTftpResult)
rcTftpResult
Returns serial number of the chassis
These are methods that return tables of information in the form of a reference to a hash.
Returns reference to map of IIDs to current link duplex.
Returns reference to hash of IIDs to admin duplex setting.
Returns a mapping between ifIndex and the PVID or default VLAN.
ifIndex
Returns reference to hash of arrays: key = ifIndex, value = array of VLAN IDs. These are the VLANs which are members of the egress list for the 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"; }
Returns VLAN IDs
(rcVlanId)
rcVlanId
rcPortTable
(rcPortIndex)
rcPortIndex
(rcPortOperDuplex)
rcPortOperDuplex
(rcPortAdminDuplex)
rcPortAdminDuplex
(rcPortAdminSpeed)
rcPortAdminSpeed
(rcPortAutoNegotiate)
rcPortAutoNegotiate
(rcPortName)
rcPortName
rc2kCpuEthernetPortTable
(rc2kCpuEthernetPortIfIndex)
rc2kCpuEthernetPortIfIndex
(rc2kCpuEthernetPortAdminStatus)
rc2kCpuEthernetPortAdminStatus
(rc2kCpuEthernetPortOperStatus)
rc2kCpuEthernetPortOperStatus
(rc2kCpuEthernetPortAddr)
rc2kCpuEthernetPortAddr
(rc2kCpuEthernetPortMask)
rc2kCpuEthernetPortMask
(rc2kCpuEthernetPortAutoNegotiate)
rc2kCpuEthernetPortAutoNegotiate
(rc2kCpuEthernetPortAdminDuplex)
rc2kCpuEthernetPortAdminDuplex
(rc2kCpuEthernetPortOperDuplex)
rc2kCpuEthernetPortOperDuplex
(rc2kCpuEthernetPortAdminSpeed)
rc2kCpuEthernetPortAdminSpeed
(rc2kCpuEthernetPortOperSpeed)
rc2kCpuEthernetPortOperSpeed
(rc2kCpuEthernetPortMgmtMacAddr)
rc2kCpuEthernetPortMgmtMacAddr
rcVlanPortTable
(rcVlanPortIndex)
rcVlanPortIndex
(rcVlanPortNumVlanIds)
rcVlanPortNumVlanIds
(rcVlanPortVlanIds)
rcVlanPortVlanIds
(rcVlanPortType)
rcVlanPortType
(rcVlanPortDefaultVlanId)
rcVlanPortDefaultVlanId
(rcVlanPortPerformTagging)
rcVlanPortPerformTagging
rcVlanTable
(rcVlanName)
rcVlanName
(rcVlanColor)
rcVlanColor
(rcVlanIfIndex)
rcVlanIfIndex
(rcVlanStgId)
rcVlanStgId
(rcVlanType)
rcVlanType
(rcVlanPortMembers)
rcVlanPortMembers
(rcVlanMacAddress)
rcVlanMacAddress
rcIpAddrTable
(rcIpAdEntIfIndex)
rcIpAdEntIfIndex
(rcIpAdEntAddr)
rcIpAdEntAddr
(rcIpAdEntIfType)
rcIpAdEntIfType
rcChasFanTable
(rcChasFanOperStatus)
rcChasFanOperStatus
rcChasPowerSupplyTable
(rcChasPowerSupplyOperStatus)
rcChasPowerSupplyOperStatus
rcChasPowerSupplyDetailTable
(rcChasPowerSupplyDetailType)
rcChasPowerSupplyDetailType
(rcChasPowerSupplyDetailSerialNumber)
rcChasPowerSupplyDetailSerialNumber
(rcChasPowerSupplyDetailHardwareRevision)
rcChasPowerSupplyDetailHardwareRevision
(rcChasPowerSupplyDetailPartNumber)
rcChasPowerSupplyDetailPartNumber
(rcChasPowerSupplyDetailDescription)
rcChasPowerSupplyDetailDescription
rcCardTable
(rcCardType)
rcCardType
(rcCardSerialNumber)
rcCardSerialNumber
(rcCardHardwareRevision)
rcCardHardwareRevision
(rcCardPartNumber)
rcCardPartNumber
rc2kCardTable
(rc2kCardFrontType)
rc2kCardFrontType
(rc2kCardFrontDescription)
rc2kCardFrontDescription
(rc2kCardFrontSerialNum)
rc2kCardFrontSerialNum
(rc2kCardFrontHwVersion)
rc2kCardFrontHwVersion
(rc2kCardFrontPartNumber)
rc2kCardFrontPartNumber
(rc2kCardFrontDateCode)
rc2kCardFrontDateCode
(rc2kCardFrontDeviations)
rc2kCardFrontDeviations
(rc2kCardBackType)
rc2kCardBackType
(rc2kCardBackDescription)
rc2kCardBackDescription
(rc2kCardBackSerialNum)
rc2kCardBackSerialNum
(rc2kCardBackHwVersion)
rc2kCardBackHwVersion
(rc2kCardBackPartNumber)
rc2kCardBackPartNumber
(rc2kCardBackDateCode)
rc2kCardBackDateCode
(rc2kCardBackDeviations)
rc2kCardBackDeviations
rc2kMdaCardTable
(rc2kMdaCardType)
rc2kMdaCardType
(rc2kMdaCardDescription)
rc2kMdaCardDescription
(rc2kMdaCardSerialNum)
rc2kMdaCardSerialNum
(rc2kMdaCardHwVersion)
rc2kMdaCardHwVersion
(rc2kMdaCardPartNumber)
rc2kMdaCardPartNumber
(rc2kMdaCardDateCode)
rc2kMdaCardDateCode
(rc2kMdaCardDeviations)
rc2kMdaCardDeviations
These are methods that provide SNMP set functionality for overridden methods or provide a simpler interface to complex set operations. See "SETTING DATA VIA SNMP" in SNMP::Info for general information on set operations.
Sets port speed, must be supplied with speed and port ifIndex. Speed choices are 'auto', '10', '100', '1000'.
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);
Sets port duplex, must be supplied with duplex and port ifIndex. Speed choices are 'auto', 'half', 'full'.
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);
Changes an access (untagged) port VLAN, must be supplied with the numeric VLAN ID and port ifIndex. This method will modify the port's VLAN membership and PVID (default VLAN). This method should only be used on end station (non-trunk) ports.
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);
Sets port PVID or default VLAN, must be supplied with the numeric VLAN ID and port ifIndex. This method only changes the PVID, to modify an access (untagged) port use set_i_vlan() instead.
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);
Adds the port to the egress list of the VLAN, must be supplied with the numeric VLAN ID and port ifIndex.
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);
Removes the port from the egress list of the VLAN, must be supplied with the numeric VLAN ID and port ifIndex.
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);
Deletes the specified VLAN from the device.
Creates the specified VLAN on the device.
Note: This method only allows creation of Port type VLANs and does not allow for the setting of the Spanning Tree Group (STG) which defaults to 1.
To install SNMP::Info, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SNMP::Info
CPAN shell
perl -MCPAN -e shell install SNMP::Info
For more information on module installation, please visit the detailed CPAN module installation guide.