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

NAME

6       SNMP::Info::Layer2::C1900 - SNMP Interface to data from Cisco Catalyst
7       1900 Network Switches running CatOS
8

AUTHOR

10       Max Baker
11

SYNOPSIS

13        # Let SNMP::Info determine the correct subclass for you.
14        my $c1900 = new SNMP::Info(
15                                 AutoSpecify => 1,
16                                 Debug       => 1,
17                                 DestHost    => 'myswitch',
18                                 Community   => 'public',
19                                 Version     => 1
20                               )
21           or die "Can't connect to DestHost.\n";
22
23        my $class      = $c1900->class();
24        print "SNMP::Info determined this device to fall under subclass : $class\n";
25

DESCRIPTION

27       Provides abstraction to the configuration information obtainable from a
28       Catalyst 1900 device through SNMP.  See SNMP::Info for full
29       documentation
30
31       Note that most of these devices only talk SNMP version 1, but not all.
32
33       For speed or debugging purposes you can call the subclass directly, but
34       not after determining a more specific class using the method above.
35
36        my $c1900 = new SNMP::Info::Layer2::C1900(...);
37
38   Inherited classes
39       SNMP::Info::CDP
40       SNMP::Info::CiscoStats
41       SNMP::Info::CiscoConfig
42       SNMP::Info::CiscoStpExtensions
43       SNMP::Info::CiscoAgg
44       SNMP::Info::Layer2
45
46   Required MIBs
47       STAND-ALONE-ETHERNET-SWITCH-MIB (ESSWITCH-MIB)
48           ESSWITCH-MIB is included in the Version 1 MIBs from Cisco.
49
50           They can be found at ftp://ftp.cisco.com/pub/mibs/v1/v1.tar.gz
51
52   Inherited MIBs
53       See "Required MIBs" in SNMP::Info::CDP for its MIB requirements.
54
55       See "Required MIBs" in SNMP::Info::CiscoStats for its MIB requirements.
56
57       See "Required MIBs" in SNMP::Info::CiscoConfig for its MIB
58       requirements.
59
60       See "Required MIBs" in SNMP::Info::CiscoStpExtensions for its MIB
61       requirements.
62
63       See "Required MIBs" in SNMP::Info::CiscoAgg for its MIB requirements.
64
65       See "Required MIBs" in SNMP::Info::Layer2 for its MIB requirements.
66

GLOBALS

68       These are methods that return scalar value from SNMP
69
70       $c1900->c1900_flash_status()
71           Usually contains the version of the software loaded in flash.  Used
72           by os_ver()
73
74           "STAND-ALONE-ETHERNET-SWITCH-MIB::upgradeFlashBankStatus"
75
76       $c1900->os()
77           Returns 'catalyst'
78
79       $c1900->os_ver()
80           Returns CatOS version if obtainable.  First tries to use
81           SNMP::Info::CiscoStats->os_ver() .  If that fails then it checks
82           for the presence of $c1900->c1900_flash_status() and culls the
83           version from there.
84
85       $c1900->vendor()
86           Returns 'cisco' :)
87
88   Overrides
89       $c1900->cisco_comm_indexing()
90           Returns 1.  Use vlan indexing.
91
92       $c1900->bulkwalk_no
93           Return 1.  Bulkwalk is turned off for this class.
94
95   Globals imported from SNMP::Info::CDP
96       See "GLOBALS" in SNMP::Info::CDP for details.
97
98   Globals imported from SNMP::Info::CiscoStats
99       See "GLOBALS" in SNMP::Info::CiscoStats for details.
100
101   Globals imported from SNMP::Info::CiscoConfig
102       See "GLOBALS" in SNMP::Info::CiscoConfig for details.
103
104   Globals imported from SNMP::Info::CiscoStpExtensions
105       See "GLOBALS" in SNMP::Info::CiscoStpExtensions for details.
106
107   Globals imported from SNMP::Info::CiscoAgg
108       See "GLOBALS" in SNMP::Info::CiscoAgg for details.
109
110   Globals imported from SNMP::Info::Layer2
111       See "GLOBALS" in SNMP::Info::Layer2 for details.
112

TABLE METHODS

114       These are methods that return tables of information in the form of a
115       reference to a hash.
116
117   Overrides
118       $c1900->interfaces()
119           Returns reference to the map between IID and physical Port.
120
121       $c1900->i_duplex()
122           Returns reference to map of IIDs to current link duplex
123
124       $c1900->i_duplex_admin()
125           Returns reference to hash of IIDs to admin duplex setting
126
127       $c1900->i_name()
128           Crosses "ifName" with $c1900->c1900_p_name() and returns the human
129           set port name if exists.
130
131       $c1900->i_vlan()
132           Returns a mapping between the interface and the VLAN / bridge group
133           if overlap is not enabled.
134
135       $c1900->i_vlan_membership()
136           Returns reference to hash of arrays: key = interface, value = array
137           of VLAN / bridge group IDs.
138
139             Example:
140             my $interfaces = $c1900->interfaces();
141             my $vlans      = $c1900->i_vlan_membership();
142
143             foreach my $iid (sort keys %$interfaces) {
144               my $port = $interfaces->{$iid};
145               my $vlan = join(',', sort(@{$vlans->{$iid}}));
146               print "Port: $port VLAN: $vlan\n";
147             }
148
149       $c1900->i_vlan_membership_untagged()
150           Unsupported, returns nothing.
151
152       $c1900->bp_index()
153           Returns a bp_index that contains the original bp_index entries and
154           extra entries for those interfaces listed in if_index, as some
155           C1900 devices do not return complete bp_indexes.
156
157   STAND-ALONE-ETHERNET-SWITCH-MIB Switch Port Table Entries:
158       $c1900->c1900_p_index()
159           Maps the Switch Port Table to the IID
160
161           "swPortIfIndex"
162
163       $c1900->c1900_p_duplex()
164           Gives Port Duplex Info
165
166           ("swPortDuplexStatus")
167
168       $c1900->c1900_p_duplex_admin()
169           Gives admin setting for Duplex Info
170
171           ("swPortFullDuplex")
172
173       $c1900->c1900_p_name()
174           Gives human set name for port
175
176           ("swPortName")
177
178       $c1900->c1900_p_up_admin()
179           Gives Admin status of port enabled.
180
181           ("swPortAdminStatus")
182
183       $c1900->c1900_p_type()
184           Gives Type of port, i.e. "general-ethernet"
185
186           ("swPortMediaCapability")
187
188       $c1900->c1900_p_media()
189           Gives the media of the port , i.e. ""fiber-sc""
190
191           ("swPortConnectorType")
192
193   Table Methods imported from SNMP::Info::CDP
194       See "TABLE METHODS" in SNMP::Info::CDP for details.
195
196   Table Methods imported from SNMP::Info::CiscoStats
197       See "TABLE METHODS" in SNMP::Info::CiscoStats for details.
198
199   Table Methods imported from SNMP::Info::CiscoConfig
200       See "TABLE METHODS" in SNMP::Info::CiscoConfig for details.
201
202   Table Methods imported from SNMP::Info::CiscoStpExtensions
203       See "TABLE METHODS" in SNMP::Info::CiscoStpExtensions for details.
204
205   Table Methods imported from SNMP::Info::CiscoAgg
206       See "TABLE METHODS" in SNMP::Info::CiscoAgg for details.
207
208   Table Methods imported from SNMP::Info::Layer2
209       See "TABLE METHODS" in SNMP::Info::Layer2 for details.
210

SET METHODS

212       These are methods that provide SNMP set functionality for overridden
213       methods or provide a simpler interface to complex set operations.  See
214       "SETTING DATA VIA SNMP" in SNMP::Info for general information on set
215       operations.
216
217       $c1900->set_i_duplex_admin(duplex, ifIndex)
218           Sets port duplex, must be supplied with duplex and port "ifIndex".
219           Speed choices are 'auto', 'half', 'full'.
220
221             Example:
222             my %if_map = reverse %{$c1900->interfaces()};
223             $c1900->set_i_duplex_admin('auto', $if_map{'1'})
224               or die "Couldn't change port duplex. ",$c1900->error(1);
225
226
227
228perl v5.28.0                      2018-11-29      SNMP::Info::Layer2::C1900(3)
Impressum