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. 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 IANA-MAU-MIB
45
47 These are methods that return scalar value from SNMP
48
49 None
50
52 These are methods that return tables of information in the form of a
53 reference to a hash.
54
55 $mau->mau_i_duplex()
56 Parses mau_index and mau_link to return the duplex information for
57 interfaces.
58
59 $mau->mau_i_duplex_admin()
60 Parses "mac_index","mau_autostat","mau_type_admin" in order to find
61 the admin duplex setting for all the interfaces.
62
63 Returns either (auto,full,half).
64
65 $mau->mau_i_duplex_admin_old()
66 Called by mau_i_duplex_admin() if "mau_type_admin" is empty.
67 Parses "mau_index","mau_autostat","mau_autosent" in order to find
68 the admin duplex setting for all the interfaces.
69
70 Returns either (auto,none,full,half).
71
72 $mau->mau_i_speed_admin()
73 Returns admin speed setting for all the interfaces.
74
75 MAU Interface Table Methods
76 $mau->mau_index() - Returns a list of interfaces and their index in
77 the MAU IF Table.
78 ("ifMauIfIndex")
79
80 $mau->mau_link() - Returns the type of Media Access used.
81 This is essentially the type of link in use.
82 eg. dot3MauType100BaseTXFD - 100BaseT at Full Duplex
83
84 ("ifMauType")
85
86 $mau->mau_status() - Returns the admin link condition as
87 1 - other
88 2 - unknown
89 3 - operational
90 4 - standby
91 5 - shutdown
92 6 - reset
93
94 Use 5 and !5 to see if the link is up or down on the admin side.
95
96 ("ifMauStatus")
97
98 $mau->mau_up() - Returns the current link condition
99 (C<ifMauMediaAvailable>)
100
101 $mau->mau_type() - Returns a 32bit string reporting the capabilities of
102 the port from a MAU POV.
103 Directly from F<MAU-MIB> :
104 Bit Capability
105 0 other or unknown
106 1 AUI
107 2 10BASE-5
108 3 FOIRL
109 4 10BASE-2
110 5 10BASE-T duplex mode unknown
111 6 10BASE-FP
112 7 10BASE-FB
113 8 10BASE-FL duplex mode unknown
114 9 10BROAD36
115 10 10BASE-T half duplex mode
116 11 10BASE-T full duplex mode
117 12 10BASE-FL half duplex mode
118 13 10BASE-FL full duplex mode
119 14 100BASE-T4
120 15 100BASE-TX half duplex mode
121 16 100BASE-TX full duplex mode
122 17 100BASE-FX half duplex mode
123 18 100BASE-FX full duplex mode
124 19 100BASE-T2 half duplex mode
125 20 100BASE-T2 full duplex mode
126
127 ("ifMauTypeList")
128
129 $mau->mau_type_admin()
130 ("ifMauDefaultType")
131
132 $mau->mau_auto() - Indicates whether or not auto-negotiation is
133 supported.
134 ("ifMauAutoNegSupported")
135
136 $mau->mau_autostat() - Returns status of auto-negotiation mode for
137 ports.
138 ("ifMauAutoNegAdminStatus")
139
140 $mau->mau_autosent() - Returns a 32 bit bit-string representing the
141 capabilities we are broadcasting on that port
142 Uses the same decoder as $mau->mau_type().
143
144 ("ifMauAutoNegCapAdvertised")
145
146 $mau->mau_autorec() - Returns a 32 bit bit-string representing the
147 capabilities of the device on the other end.
148 Uses the same decoder as $mau->mau_type().
149
150 ("ifMauAutoNegCapReceived")
151
153 These are methods that provide SNMP set functionality for overridden
154 methods or provide a simpler interface to complex set operations. See
155 "SETTING DATA VIA SNMP" in SNMP::Info for general information on set
156 operations.
157
158 $mau->mau_set_i_speed_admin(speed, ifIndex)
159 Sets port speed, must be supplied with speed and port "ifIndex".
160
161 Note that this method has some limitations since there is no way to
162 reliably set the port speed independently of the port duplex
163 setting on certain devices, notably the Cisco Cat4k series.
164
165 Speed choices are '10', '100', '1000', 'auto'.
166
167 $mau->mau_set_i_duplex_admin(duplex, ifIndex)
168 Sets port duplex, must be supplied with duplex and port "ifIndex".
169
170 Note that this method has some limitations since there is no way to
171 reliably set the port duplex independently of the port speed
172 setting on certain devices, notably the Cisco Cat4k series.
173
174 Duplex choices are 'auto', 'half', 'full'.
175
176 $mau->mau_set_i_speed_duplex_admin(speed, duplex, ifIndex)
177 Sets port speed and duplex settings, must be supplied with speed,
178 duplex and port "ifIndex".
179
180 Accepts the following values for speed and duplex:
181
182 Speed/Duplex
183 ------------
184 auto/auto (this is a special case)
185 10/half
186 10/full
187 100/half
188 100/full
189 1000/half
190 1000/full
191
193 munge_int2bin() - Unpacks an integer into a 32bit bit string.
194 $mau->_isfullduplex(bitstring)
195 Boolean. Checks to see if any of the full_duplex types from mau_type()
196 are high. Currently bits 11,13,16,18,20.
197
198 $mau->_ishalfduplex(bitstring)
199 Boolean. Checks to see if any of the half_duplex types from mau_type()
200 are high. Currently bits 10,12,15,17,19.
201
202
203
204perl v5.36.0 2022-07-22 SNMP::Info::MAU(3)