- NAME
- AUTHOR
- SYNOPSIS
- DESCRIPTION
- GLOBALS
- Overrides
- Globals imported from SNMP::Info::CiscoVTP
- Globals imported from SNMP::Info::CDP
- Globals imported from SNMP::Info::CiscoStats
- Globals imported from SNMP::Info::CiscoConfig
- Globals imported from SNMP::Info::Layer2
- TABLE METHODS
- Overrides
- C2900-MIB Port Entry Table
- Table Methods imported from SNMP::Info::CiscoVTP
- Table Methods imported from SNMP::Info::CDP
- Table Methods imported from SNMP::Info::CiscoStats
- Table Methods imported from SNMP::Info::CiscoConfig
- Table Methods imported from SNMP::Info::Layer2
- SET METHODS
NAME
SNMP::Info::Layer2::C2900 - SNMP Interface to Cisco Catalyst 2900 Switches running IOS
AUTHOR
Max Baker
SYNOPSIS
# Let SNMP::Info determine the correct subclass for you.
my $c2900 = 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 = $c2900->class(); print "SNMP::Info determined this device to fall under subclass : $class\n";
DESCRIPTION
Provides abstraction to the configuration information obtainable from a C2900 device through SNMP.
For speed or debugging purposes you can call the subclass directly, but not after determining a more specific class using the method above.
my $c2900 = new SNMP::Info::Layer2::C2900(...);
Inherited Classes
- SNMP::Info::CiscoVTP
- SNMP::Info::CDP
- SNMP::Info::CiscoStats
- SNMP::Info::CiscoConfig
- SNMP::Info::Layer2
- SNMP::Info::CDP
Required MIBs
- CISCO-C2900-MIB
-
Part of the v2 MIBs from Cisco.
Inherited MIBs
See Required MIBs in the SNMP::Info::CiscoVTP manpage for its MIB requirements.
See Required MIBs in the SNMP::Info::CDP manpage for its MIB requirements.
See Required MIBs in the SNMP::Info::CiscoStats manpage for its MIB requirements.
See Required MIBs in the SNMP::Info::CiscoConfig manpage for its MIB requirements.
See Required MIBs in the SNMP::Info::Layer2 manpage for its MIB requirements.
GLOBALS
These are methods that return scalar value from SNMP
Overrides
- $c2900->
vendor() -
Returns 'cisco' :)
- $c2900->
cisco_comm_indexing() -
Returns 1. Use vlan indexing.
Globals imported from SNMP::Info::CiscoVTP
See GLOBALS in the SNMP::Info::CiscoVTP manpage for details.
Globals imported from SNMP::Info::CDP
See GLOBALS in the SNMP::Info::CDP manpage for details.
Globals imported from SNMP::Info::CiscoStats
See GLOBALS in the SNMP::Info::CiscoStats manpage for details.
Globals imported from SNMP::Info::CiscoConfig
See GLOBALS in the SNMP::Info::CiscoConfig manpage for details.
Globals imported from SNMP::Info::Layer2
See GLOBALS in the SNMP::Info::Layer2 manpage for details.
TABLE METHODS
These are methods that return tables of information in the form of a reference to a hash.
Overrides
- $c2900->
interfaces() -
Returns reference to the map between IID and physical Port.
-
On the 2900 devices i_name isn't reliable, so we override to just the description.
-
Next all dots are changed for forward slashes so that the physical port name is the same as the broad-casted CDP port name. (Ethernet0.1 -> Ethernet0/1)
-
Also, any weird characters are removed, as I saw a few pop up.
- $c2900->
i_duplex() -
Returns reference to map of IIDs to current link duplex
-
Crosses $c2900->
c2900_p_index()with $c2900->c2900_p_duplex() - $c2900->
i_duplex_admin() -
Returns reference to hash of IIDs to admin duplex setting
-
Crosses $c2900->
c2900_p_index()with $c2900->c2900_p_duplex_admin()
C2900-MIB Port Entry Table
- $c2900->
c2900_p_index() -
Maps the Switch Port Table to the IID
-
(
c2900PortIfIndex) - $c2900->
c2900_p_duplex() -
Gives Port Duplex Info
-
(
c2900PortDuplexStatus) - $c2900->
c2900_p_duplex_admin() -
Gives admin setting for Duplex Info
-
(
c2900PortDuplexState) - $c2900->
c2900_p_speed_admin() -
Gives Admin speed of port
-
(
c2900PortAdminSpeed)
Table Methods imported from SNMP::Info::CiscoVTP
See TABLE METHODS in the SNMP::Info::CiscoVTP manpage for details.
Table Methods imported from SNMP::Info::CDP
See TABLE METHODS in the SNMP::Info::CDP manpage for details.
Table Methods imported from SNMP::Info::CiscoStats
See TABLE METHODS in the SNMP::Info::CiscoStats manpage for details.
Table Methods imported from SNMP::Info::CiscoConfig
See TABLE METHODS in the SNMP::Info::CiscoConfig manpage for details.
Table Methods imported from SNMP::Info::Layer2
See TABLE METHODS in the SNMP::Info::Layer2 manpage for details.
SET METHODS
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 the SNMP::Info manpage for general information on set operations.
- $c2900->set_i_speed_admin(speed, ifIndex)
-
Sets port speed, must be supplied with speed and port
ifIndex -
Speed choices are 'auto', '10', '100'
-
Crosses $c2900->
c2900_p_index()with $c2900->c2900_p_speed_admin()to utilize portifIndex. -
Example: my %if_map = reverse %{$c2900->interfaces()}; $c2900->set_i_speed_admin('auto', $if_map{'FastEthernet0/1'}) or die "Couldn't change port speed. ",$c2900->error(1); - $c2900->set_i_duplex_admin(duplex, ifIndex)
-
Sets port duplex, must be supplied with duplex and port
ifIndex -
Speed choices are 'auto', 'half', 'full'
-
Crosses $c2900->
c2900_p_index()with $c2900->c2900_p_duplex_admin()to utilize portifIndex. -
Example: my %if_map = reverse %{$c2900->interfaces()}; $c2900->set_i_duplex_admin('auto', $if_map{'FastEthernet0/1'}) or die "Couldn't change port duplex. ",$c2900->error(1);
