SNMP::Info::Layer2::C2900(3pm) | User Contributed Perl Documentation | SNMP::Info::Layer2::C2900(3pm) |
SNMP::Info::Layer2::C2900 - SNMP Interface to Cisco Catalyst 2900 Switches running IOS
Max Baker
# 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";
Provides abstraction to the configuration information obtainable from a C2900 device through SNMP.
See "Required MIBs" in SNMP::Info::Layer2::Cisco for its MIB requirements.
These are methods that return scalar value from SNMP
See "GLOBALS" in SNMP::Info::Layer2::Cisco for details.
These are methods that return tables of information in the form of a reference to a hash.
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.
Crosses $c2900->c2900_p_index() with $c2900->c2900_p_duplex()
Crosses $c2900->c2900_p_index() with $c2900->c2900_p_duplex_admin()
("c2900PortIfIndex")
("c2900PortDuplexStatus")
("c2900PortDuplexState")
("c2900PortAdminSpeed")
See "TABLE METHODS" in SNMP::Info::Layer2::Cisco for details.
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.
Speed choices are 'auto', '10', '100'
Crosses $c2900->c2900_p_index() with $c2900->c2900_p_speed_admin() to utilize port "ifIndex".
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);
Speed choices are 'auto', 'half', 'full'
Crosses $c2900->c2900_p_index() with $c2900->c2900_p_duplex_admin() to utilize port "ifIndex".
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);
2023-09-30 | perl v5.36.0 |