1SNMP::Info::CiscoStack(U3s)er Contributed Perl DocumentatSiNoMnP::Info::CiscoStack(3)
2
3
4

NAME

6       SNMP::Info::CiscoStack - SNMP Interface to data from CISCO-STACK-MIB
7       and CISCO-PORT-SECURITY-MIB
8

AUTHOR

10       Max Baker
11

SYNOPSIS

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

DESCRIPTION

27       SNMP::Info::CiscoStack is a subclass of SNMP::Info that provides an
28       interface to the "CISCO-STACK-MIB".  This MIB is used across the
29       Catalyst family under CatOS and IOS.
30
31       Use or create in a subclass of SNMP::Info.  Do not use directly.
32
33   Inherited Classes
34       none.
35
36   Required MIBs
37       CISCO-STACK-MIB
38

GLOBALS

40       $stack->broadcast()
41           ("sysBroadcast")
42
43       $stack->fan()
44           ("chassisFanStatus")
45
46       $stack->model()
47           ("chassisModel")
48
49       $stack->netmask()
50           ("sysNetMask")
51
52       $stack->ps1_type()
53           ("chassisPs1Type")
54
55       $stack->ps2_type()
56           ("chassisPs2Type")
57
58       $stack->ps1_status()
59           ("chassisPs1Status")
60
61       $stack->ps2_status()
62           ("chassisPs2Status")
63
64       $stack->serial()
65           ("chassisSerialNumberString") or ("chassisSerialNumber")
66
67       $stack->slots()
68           ("chassisNumSlots")
69

TABLE METHODS

71   Interface Tables
72       $stack->i_physical()
73           Returns a map to IID for ports that are physical ports, not vlans,
74           etc.
75
76       $stack->i_type()
77           Crosses p_port() with p_type() and returns the results.
78
79           Overrides with "ifType" if p_type() isn't available.
80
81       $stack->i_duplex()
82           Returns reference to hash of iid to current link duplex setting.
83
84           First checks for fixed gigabit ports which are always full duplex.
85           Next, if the port is not operational and reported port duplex
86           ("portDuplex") is auto then the operational duplex can not be
87           determined.  Otherwise it uses the reported port duplex
88           ("portDuplex").
89
90       $stack->i_duplex_admin()
91           Returns reference to hash of iid to administrative duplex setting.
92
93           First checks for fixed gigabit ports which are always full duplex.
94           Next checks the port administrative speed ("portAdminSpeed") which
95           if set to autonegotiate then the duplex will also autonegotiate,
96           otherwise it uses the reported port duplex ("portDuplex").
97
98       $stack->i_speed_admin()
99           Returns reference to hash of iid to administrative speed setting.
100
101           "portAdminSpeed"
102
103       $stack->set_i_speed_admin(speed, ifIndex)
104               Sets port speed, must be supplied with speed and port C<ifIndex>
105
106               Speed choices are 'auto', '10', '100', '1000'
107
108               Crosses $stack->p_port() with $stack->p_duplex() to
109               utilize port C<ifIndex>.
110
111               Example:
112               my %if_map = reverse %{$stack->interfaces()};
113               $stack->set_i_speed_admin('auto', $if_map{'FastEthernet0/1'})
114                   or die "Couldn't change port speed. ",$stack->error(1);
115
116       $stack->set_i_duplex_admin(duplex, ifIndex)
117               Sets port duplex, must be supplied with duplex and port C<ifIndex>
118
119               Speed choices are 'auto', 'half', 'full'
120
121               Crosses $stack->p_port() with $stack->p_duplex() to
122               utilize port C<ifIndex>.
123
124               Example:
125               my %if_map = reverse %{$stack->interfaces()};
126               $stack->set_i_duplex_admin('auto', $if_map{'FastEthernet0/1'})
127                   or die "Couldn't change port duplex. ",$stack->error(1);
128
129   Module table
130       This table holds configuration information for each of the blades
131       installed in the Catalyst device.
132
133       $stack->m_type()
134           ("moduleType")
135
136       $stack->m_model()
137           ("moduleModel")
138
139       $stack->m_serial()
140           ("moduleSerialNumber")
141
142       $stack->m_status()
143           ("moduleStatus")
144
145       $stack->m_name()
146           ("moduleName")
147
148       $stack->m_ports()
149           ("moduleNumPorts")
150
151       $stack->m_ports_status()
152           Returns a list of space separated status strings for the ports.
153
154           To see the status of port 4 :
155
156               @ports_status = split(' ', $stack->m_ports_status() );
157               $port4 = $ports_status[3];
158
159           ("modulePortStatus")
160
161       $stack->m_ports_hwver()
162           ("moduleHwVersion")
163
164       $stack->m_ports_fwver()
165           ("moduleFwVersion")
166
167       $stack->m_ports_swver()
168           ("moduleSwVersion")
169
170       $stack->m_ports_ip()
171           ("moduleIPAddress")
172
173       $stack->m_ports_sub1()
174           ("moduleSubType")
175
176       $stack->m_ports_sub2()
177           ("moduleSubType2")
178
179   Modules - Router Blades
180       $stack->m_ip()
181           ("moduleIPAddress")
182
183       $stack->m_sub1()
184           ("moduleSubType")
185
186       $stack->m_sub2()
187           ("moduleSubType2")
188
189   Port Entry Table ("CISCO-STACK-MIB::portTable")
190       $stack->p_name()
191           ("portName")
192
193       $stack->p_type()
194           ("portType")
195
196       $stack->p_status()
197           ("portOperStatus")
198
199       $stack->p_status2()
200           ("portAdditionalStatus")
201
202       $stack->p_speed()
203           ("portAdminSpeed")
204
205       $stack->p_duplex()
206           ("portDuplex")
207
208       $stack->p_port()
209           ("portIfIndex")
210
211       $stack->p_rx_flow_control()
212           Can be either "on" "off" or "disagree"
213
214           "Indicates the receive flow control operational status of the port.
215           If the port could not agree with the far end on a link protocol,
216           its operational status will be disagree(3)."
217
218           "portOperRxFlowControl"
219
220       $stack->p_tx_flow_control()
221           Can be either "on" "off" or "disagree"
222
223           "Indicates the transmit flow control operational status of the
224           port. If the port could not agree with the far end on a link
225           protocol, its operational status will be disagree(3)."
226
227           "portOperTxFlowControl"
228
229       $stack->p_rx_flow_control_admin()
230           Can be either "on" "off" or "desired"
231
232           "Indicates the receive flow control administrative status set on
233           the port. If the status is set to on(1), the port will require the
234           far end to send flow control. If the status is set to off(2), the
235           port will not allow far end to send flow control.  If the status is
236           set to desired(3), the port will allow the far end to send the flow
237           control."
238
239           "portAdminRxFlowControl"
240
241       $stack->p_tx_flow_control_admin()
242           Can be either "on" "off" or "desired"
243
244           "Indicates the transmit flow control administrative status set on
245           the port.  If the status is set to on(1), the port will send flow
246           control to the far end.  If the status is set to off(2), the port
247           will not send flow control to the far end. If the status is set to
248           desired(3), the port will send flow control to the far end if the
249           far end supports it."
250
251           "portAdminTxFlowControl"
252
253   Port Capability Table ("CISCO-STACK-MIB::portCpbTable")
254       $stack->p_speed_admin()
255           ("portCpbSpeed")
256
257       $stack->p_duplex_admin()
258           ("portCpbDuplex")
259

Data Munging Callback Subroutines

261       $stack->munge_port_status()
262           Munges binary byte describing each port into ascii, and returns an
263           ascii list separated by spaces.
264
265
266
267perl v5.28.0                      2018-11-29         SNMP::Info::CiscoStack(3)
Impressum