1Info::Layer2::C2900(3)User Contributed Perl DocumentationInfo::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::CiscoVTP
38       SNMP::Info::CDP
39       SNMP::Info::CiscoStats
40       SNMP::Info::CiscoConfig
41       SNMP::Info::Layer2
42
43   Required MIBs
44       CISCO-C2900-MIB
45           Part of the v2 MIBs from Cisco.
46
47   Inherited MIBs
48       See "Required MIBs" in SNMP::Info::CiscoVTP for its MIB requirements.
49
50       See "Required MIBs" in SNMP::Info::CDP for its MIB requirements.
51
52       See "Required MIBs" in SNMP::Info::CiscoStats for its MIB requirements.
53
54       See "Required MIBs" in SNMP::Info::CiscoConfig for its MIB
55       requirements.
56
57       See "Required MIBs" in SNMP::Info::Layer2 for its MIB requirements.
58

GLOBALS

60       These are methods that return scalar value from SNMP
61
62   Overrides
63       $c2900->vendor()
64           Returns 'cisco' :)
65
66       $c2900->cisco_comm_indexing()
67           Returns 1.  Use vlan indexing.
68
69   Globals imported from SNMP::Info::CiscoVTP
70       See "GLOBALS" in SNMP::Info::CiscoVTP for details.
71
72   Globals imported from SNMP::Info::CDP
73       See "GLOBALS" in SNMP::Info::CDP for details.
74
75   Globals imported from SNMP::Info::CiscoStats
76       See "GLOBALS" in SNMP::Info::CiscoStats for details.
77
78   Globals imported from SNMP::Info::CiscoConfig
79       See "GLOBALS" in SNMP::Info::CiscoConfig for details.
80
81   Globals imported from SNMP::Info::Layer2
82       See "GLOBALS" in SNMP::Info::Layer2 for details.
83

TABLE METHODS

85       These are methods that return tables of information in the form of a
86       reference to a hash.
87
88   Overrides
89       $c2900->interfaces()
90           Returns reference to the map between IID and physical Port.
91
92           On the 2900 devices i_name isn't reliable, so we override to just
93           the description.
94
95           Next all dots are changed for forward slashes so that the physical
96           port name is the same as the broad-casted CDP port name.
97               (Ethernet0.1 -> Ethernet0/1)
98
99           Also, any weird characters are removed, as I saw a few pop up.
100
101       $c2900->i_duplex()
102           Returns reference to map of IIDs to current link duplex
103
104           Crosses $c2900->c2900_p_index() with $c2900->c2900_p_duplex()
105
106       $c2900->i_duplex_admin()
107           Returns reference to hash of IIDs to admin duplex setting
108
109           Crosses $c2900->c2900_p_index() with $c2900->c2900_p_duplex_admin()
110
111   C2900-MIB Port Entry Table
112       $c2900->c2900_p_index()
113           Maps the Switch Port Table to the IID
114
115           ("c2900PortIfIndex")
116
117       $c2900->c2900_p_duplex()
118           Gives Port Duplex Info
119
120           ("c2900PortDuplexStatus")
121
122       $c2900->c2900_p_duplex_admin()
123           Gives admin setting for Duplex Info
124
125           ("c2900PortDuplexState")
126
127       $c2900->c2900_p_speed_admin()
128           Gives Admin speed of port
129
130           ("c2900PortAdminSpeed")
131
132   Table Methods imported from SNMP::Info::CiscoVTP
133       See "TABLE METHODS" in SNMP::Info::CiscoVTP for details.
134
135   Table Methods imported from SNMP::Info::CDP
136       See "TABLE METHODS" in SNMP::Info::CDP for details.
137
138   Table Methods imported from SNMP::Info::CiscoStats
139       See "TABLE METHODS" in SNMP::Info::CiscoStats for details.
140
141   Table Methods imported from SNMP::Info::CiscoConfig
142       See "TABLE METHODS" in SNMP::Info::CiscoConfig for details.
143
144   Table Methods imported from SNMP::Info::Layer2
145       See "TABLE METHODS" in SNMP::Info::Layer2 for details.
146

SET METHODS

148       These are methods that provide SNMP set functionality for overridden
149       methods or provide a simpler interface to complex set operations.  See
150       "SETTING DATA VIA SNMP" in SNMP::Info for general information on set
151       operations.
152
153       $c2900->set_i_speed_admin(speed, ifIndex)
154           Sets port speed, must be supplied with speed and port "ifIndex"
155
156           Speed choices are 'auto', '10', '100'
157
158           Crosses $c2900->c2900_p_index() with $c2900->c2900_p_speed_admin()
159           to utilize port "ifIndex".
160
161               Example:
162               my %if_map = reverse %{$c2900->interfaces()};
163               $c2900->set_i_speed_admin('auto', $if_map{'FastEthernet0/1'})
164                   or die "Couldn't change port speed. ",$c2900->error(1);
165
166       $c2900->set_i_duplex_admin(duplex, ifIndex)
167           Sets port duplex, must be supplied with duplex and port "ifIndex"
168
169           Speed choices are 'auto', 'half', 'full'
170
171           Crosses $c2900->c2900_p_index() with $c2900->c2900_p_duplex_admin()
172           to utilize port "ifIndex".
173
174               Example:
175               my %if_map = reverse %{$c2900->interfaces()};
176               $c2900->set_i_duplex_admin('auto', $if_map{'FastEthernet0/1'})
177                   or die "Couldn't change port duplex. ",$c2900->error(1);
178
179
180
181perl v5.12.0                      2009-06-12            Info::Layer2::C2900(3)
Impressum