1SNMP::Info::Layer2::C29U0s0e(r3)Contributed Perl DocumenStNaMtPi:o:nInfo::Layer2::C2900(3)
2
3
4

NAME

6       SNMP::Info::Layer2::C2900 - SNMP Interface to Cisco Catalyst 2900
7       Switches running IOS
8

AUTHOR

10       Max Baker
11

SYNOPSIS

13        # Let SNMP::Info determine the correct subclass for you.
14        my $c2900 = 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 = $c2900->class();
25        print "SNMP::Info determined this device to fall under subclass : $class\n";
26

DESCRIPTION

28       Provides abstraction to the configuration information obtainable from a
29       C2900 device through SNMP.
30
31       For speed or debugging purposes you can call the subclass directly, but
32       not after determining a more specific class using the method above.
33
34        my $c2900 = new SNMP::Info::Layer2::C2900(...);
35
36   Inherited Classes
37       SNMP::Info::Layer2::Cisco
38
39   Required MIBs
40       CISCO-C2900-MIB
41           Part of the v2 MIBs from Cisco.
42
43   Inherited MIBs
44       See "Required MIBs" in SNMP::Info::Layer2::Cisco for its MIB
45       requirements.
46

GLOBALS

48       These are methods that return scalar value from SNMP
49
50   Overrides
51       $c2900->vendor()
52           Returns 'cisco' :)
53
54       $c2900->cisco_comm_indexing()
55           Returns 1.  Use vlan indexing.
56
57   Globals imported from SNMP::Info::Layer2::Cisco
58       See "GLOBALS" in SNMP::Info::Layer2::Cisco for details.
59

TABLE METHODS

61       These are methods that return tables of information in the form of a
62       reference to a hash.
63
64   Overrides
65       $c2900->interfaces()
66           Returns reference to the map between IID and physical Port.
67
68           On the 2900 devices i_name isn't reliable, so we override to just
69           the description.
70
71           Next all dots are changed for forward slashes so that the physical
72           port name is the same as the broad-casted CDP port name.
73               (Ethernet0.1 -> Ethernet0/1)
74
75           Also, any weird characters are removed, as I saw a few pop up.
76
77       $c2900->i_duplex()
78           Returns reference to map of IIDs to current link duplex
79
80           Crosses $c2900->c2900_p_index() with $c2900->c2900_p_duplex()
81
82       $c2900->i_duplex_admin()
83           Returns reference to hash of IIDs to admin duplex setting
84
85           Crosses $c2900->c2900_p_index() with $c2900->c2900_p_duplex_admin()
86
87       $c2900->i_speed_admin()
88           Returns reference to hash of IIDs to admin speed setting.
89
90   C2900-MIB Port Entry Table
91       $c2900->c2900_p_index()
92           Maps the Switch Port Table to the IID
93
94           ("c2900PortIfIndex")
95
96       $c2900->c2900_p_duplex()
97           Gives Port Duplex Info
98
99           ("c2900PortDuplexStatus")
100
101       $c2900->c2900_p_duplex_admin()
102           Gives admin setting for Duplex Info
103
104           ("c2900PortDuplexState")
105
106       $c2900->c2900_p_speed_admin()
107           Gives Admin speed of port
108
109           ("c2900PortAdminSpeed")
110
111   Table Methods imported from SNMP::Info::Layer2::Cisco
112       See "TABLE METHODS" in SNMP::Info::Layer2::Cisco for details.
113

SET METHODS

115       These are methods that provide SNMP set functionality for overridden
116       methods or provide a simpler interface to complex set operations.  See
117       "SETTING DATA VIA SNMP" in SNMP::Info for general information on set
118       operations.
119
120       $c2900->set_i_speed_admin(speed, ifIndex)
121           Sets port speed, must be supplied with speed and port "ifIndex"
122
123           Speed choices are 'auto', '10', '100'
124
125           Crosses $c2900->c2900_p_index() with $c2900->c2900_p_speed_admin()
126           to utilize port "ifIndex".
127
128               Example:
129               my %if_map = reverse %{$c2900->interfaces()};
130               $c2900->set_i_speed_admin('auto', $if_map{'FastEthernet0/1'})
131                   or die "Couldn't change port speed. ",$c2900->error(1);
132
133       $c2900->set_i_duplex_admin(duplex, ifIndex)
134           Sets port duplex, must be supplied with duplex and port "ifIndex"
135
136           Speed choices are 'auto', 'half', 'full'
137
138           Crosses $c2900->c2900_p_index() with $c2900->c2900_p_duplex_admin()
139           to utilize port "ifIndex".
140
141               Example:
142               my %if_map = reverse %{$c2900->interfaces()};
143               $c2900->set_i_duplex_admin('auto', $if_map{'FastEthernet0/1'})
144                   or die "Couldn't change port duplex. ",$c2900->error(1);
145
146
147
148perl v5.28.1                      2019-04-04      SNMP::Info::Layer2::C2900(3)
Impressum