1Info::Layer2::C1900(3)User Contributed Perl DocumentationInfo::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::Layer2
43
44   Required MIBs
45       STAND-ALONE-ETHERNET-SWITCH-MIB (ESSWITCH-MIB)
46           ESSWITCH-MIB is included in the Version 1 MIBs from Cisco.
47
48           They can be found at ftp://ftp.cisco.com/pub/mibs/v1/v1.tar.gz
49
50   Inherited MIBs
51       See "Required MIBs" in SNMP::Info::CDP for its MIB requirements.
52
53       See "Required MIBs" in SNMP::Info::CiscoStats for its MIB requirements.
54
55       See "Required MIBs" in SNMP::Info::CiscoConfig for its MIB
56       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::Layer2
98       See "GLOBALS" in SNMP::Info::Layer2 for details.
99

TABLE METHODS

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

SET METHODS

185       These are methods that provide SNMP set functionality for overridden
186       methods or provide a simpler interface to complex set operations.  See
187       "SETTING DATA VIA SNMP" in SNMP::Info for general information on set
188       operations.
189
190       $c1900->set_i_duplex_admin(duplex, ifIndex)
191           Sets port duplex, must be supplied with duplex and port "ifIndex".
192           Speed choices are 'auto', 'half', 'full'.
193
194             Example:
195             my %if_map = reverse %{$c1900->interfaces()};
196             $c1900->set_i_duplex_admin('auto', $if_map{'1'})
197               or die "Couldn't change port duplex. ",$c1900->error(1);
198
199
200
201perl v5.12.0                      2009-06-12            Info::Layer2::C1900(3)
Impressum