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   Inherited classes
34       SNMP::Info::CDP
35       SNMP::Info::CiscoStats
36       SNMP::Info::CiscoConfig
37       SNMP::Info::CiscoStpExtensions
38       SNMP::Info::CiscoAgg
39       SNMP::Info::Layer2
40
41   Required MIBs
42       STAND-ALONE-ETHERNET-SWITCH-MIB (ESSWITCH-MIB)
43           ESSWITCH-MIB is included in the Version 1 MIBs from Cisco.
44
45   Inherited MIBs
46       See "Required MIBs" in SNMP::Info::CDP for its MIB requirements.
47
48       See "Required MIBs" in SNMP::Info::CiscoStats for its MIB requirements.
49
50       See "Required MIBs" in SNMP::Info::CiscoConfig for its MIB
51       requirements.
52
53       See "Required MIBs" in SNMP::Info::CiscoStpExtensions for its MIB
54       requirements.
55
56       See "Required MIBs" in SNMP::Info::CiscoAgg for its MIB requirements.
57
58       See "Required MIBs" in SNMP::Info::Layer2 for its MIB requirements.
59

GLOBALS

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

TABLE METHODS

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

SET METHODS

202       These are methods that provide SNMP set functionality for overridden
203       methods or provide a simpler interface to complex set operations.  See
204       "SETTING DATA VIA SNMP" in SNMP::Info for general information on set
205       operations.
206
207       $c1900->set_i_duplex_admin(duplex, ifIndex)
208           Sets port duplex, must be supplied with duplex and port "ifIndex".
209           Speed choices are 'auto', 'half', 'full'.
210
211             Example:
212             my %if_map = reverse %{$c1900->interfaces()};
213             $c1900->set_i_duplex_admin('auto', $if_map{'1'})
214               or die "Couldn't change port duplex. ",$c1900->error(1);
215
216
217
218perl v5.30.1                      2020-01-30      SNMP::Info::Layer2::C1900(3)
Impressum