1SNMP::Info::MAU(3) User Contributed Perl Documentation SNMP::Info::MAU(3)
2
3
4
6 SNMP::Info::MAU - SNMP Interface to Medium Attachment Unit (MAU) MIB
7 (RFC 2668) via SNMP
8
10 Max Baker
11
13 my $mau = new SNMP::Info (
14 AutoSpecify => 1,
15 Debug => 1,
16 DestHost => 'hpswitch',
17 Community => 'public',
18 Version => 2
19 );
20
21 my $class = $mau->class();
22 print " Using device sub class : $class\n";
23
25 SNMP::Info::MAU is a subclass of SNMP::Info that supplies access to the
26 MAU-MIB (RFC 2668). This MIB is sometimes implemented on Layer 2
27 network devices like HP Switches. MAU = Medium Attachment Unit.
28
29 The MAU table contains link and duplex info for the port itself and the
30 device connected to that port.
31
32 Normally you use or create a subclass of SNMP::Info that inherits this
33 one. Do not use directly.
34
35 For debugging purposes call the class directly as you would SNMP::Info
36
37 my $mau = new SNMP::Info::MAU(...);
38
39 Inherited Classes
40 None.
41
42 Required MIBs
43 MAU-MIB
44
46 These are methods that return scalar value from SNMP
47
48 None
49
51 These are methods that return tables of information in the form of a
52 reference to a hash.
53
54 $mau->mau_i_duplex()
55 Parses mau_index and mau_link to return the duplex information for
56 interfaces.
57
58 $mau->mau_i_duplex_admin()
59 Parses "mac_index","mau_autostat","mau_type_admin" in order to find
60 the admin duplex setting for all the interfaces.
61
62 Returns either (auto,full,half).
63
64 $mau->mau_i_duplex_admin_old()
65 Called by mau_i_duplex_admin() if "mau_type_admin" is empty.
66 Parses "mau_index","mau_autostat","mau_autosent" in order to find
67 the admin duplex setting for all the interfaces.
68
69 Returns either (auto,none,full,half).
70
71 $mau->mau_i_speed_admin()
72 Returns admin speed setting for all the interfaces.
73
74 MAU Interface Table Methods
75 $mau->mau_index() - Returns a list of interfaces and their index in
76 the MAU IF Table.
77 ("ifMauIfIndex")
78
79 $mau->mau_link() - Returns the type of Media Access used.
80 This is essentially the type of link in use.
81 eg. dot3MauType100BaseTXFD - 100BaseT at Full Duplex
82
83 ("ifMauType")
84
85 $mau->mau_status() - Returns the admin link condition as
86 1 - other
87 2 - unknown
88 3 - operational
89 4 - standby
90 5 - shutdown
91 6 - reset
92
93 Use 5 and !5 to see if the link is up or down on the admin side.
94
95 ("ifMauStatus")
96
97 $mau->mau_up() - Returns the current link condition
98 (C<ifMauMediaAvailable>)
99
100 $mau->mau_type() - Returns a 32bit string reporting the capabilities of
101 the port from a MAU POV.
102 Directly from F<MAU-MIB> :
103 Bit Capability
104 0 other or unknown
105 1 AUI
106 2 10BASE-5
107 3 FOIRL
108 4 10BASE-2
109 5 10BASE-T duplex mode unknown
110 6 10BASE-FP
111 7 10BASE-FB
112 8 10BASE-FL duplex mode unknown
113 9 10BROAD36
114 10 10BASE-T half duplex mode
115 11 10BASE-T full duplex mode
116 12 10BASE-FL half duplex mode
117 13 10BASE-FL full duplex mode
118 14 100BASE-T4
119 15 100BASE-TX half duplex mode
120 16 100BASE-TX full duplex mode
121 17 100BASE-FX half duplex mode
122 18 100BASE-FX full duplex mode
123 19 100BASE-T2 half duplex mode
124 20 100BASE-T2 full duplex mode
125
126 ("ifMauTypeList")
127
128 $mau->mau_type_admin()
129 ("ifMauDefaultType")
130
131 $mau->mau_auto() - Indicates whether or not auto-negotiation is
132 supported.
133 ("ifMauAutoNegSupported")
134
135 $mau->mau_autostat() - Returns status of auto-negotiation mode for
136 ports.
137 ("ifMauAutoNegAdminStatus")
138
139 $mau->mau_autosent() - Returns a 32 bit bit-string representing the
140 capabilities we are broadcasting on that port
141 Uses the same decoder as $mau->mau_type().
142
143 ("ifMauAutoNegCapAdvertised")
144
145 $mau->mau_autorec() - Returns a 32 bit bit-string representing the
146 capabilities of the device on the other end.
147 Uses the same decoder as $mau->mau_type().
148
149 ("ifMauAutoNegCapReceived")
150
152 These are methods that provide SNMP set functionality for overridden
153 methods or provide a simpler interface to complex set operations. See
154 "SETTING DATA VIA SNMP" in SNMP::Info for general information on set
155 operations.
156
157 $mau->mau_set_i_speed_admin(speed, ifIndex)
158 Sets port speed, must be supplied with speed and port "ifIndex".
159
160 Note that this method has some limitations since there is no way to
161 reliably set the port speed independently of the port duplex
162 setting on certain devices, notably the Cisco Cat4k series.
163
164 Speed choices are '10', '100', '1000', 'auto'.
165
166 $mau->mau_set_i_duplex_admin(duplex, ifIndex)
167 Sets port duplex, must be supplied with duplex and port "ifIndex".
168
169 Note that this method has some limitations since there is no way to
170 reliably set the port duplex independently of the port speed
171 setting on certain devices, notably the Cisco Cat4k series.
172
173 Duplex choices are 'auto', 'half', 'full'.
174
175 $mau->mau_set_i_speed_duplex_admin(speed, duplex, ifIndex)
176 Sets port speed and duplex settings, must be supplied with speed,
177 duplex and port "ifIndex".
178
179 Accepts the following values for speed and duplex:
180
181 Speed/Duplex
182 ------------
183 auto/auto (this is a special case)
184 10/half
185 10/full
186 100/half
187 100/full
188 1000/half
189 1000/full
190
192 munge_int2bin() - Unpacks an integer into a 32bit bit string.
193 $mau->_isfullduplex(bitstring)
194 Boolean. Checks to see if any of the full_duplex types from mau_type()
195 are high. Currently bits 11,13,16,18,20.
196
197 $mau->_ishalfduplex(bitstring)
198 Boolean. Checks to see if any of the half_duplex types from mau_type()
199 are high. Currently bits 10,12,15,17,19.
200
201
202
203perl v5.28.1 2019-04-04 SNMP::Info::MAU(3)