SNMP::Info::MAU - SNMP Interface to Medium Attachment Unit (MAU) MIB (RFC 2668) via SNMP
my $mau = new SNMP::Info (
AutoSpecify => 1,
Debug => 1,
DestHost => 'hpswitch',
Community => 'public',
Version => 2
my $class = $mau->class();
print " Using device sub class : $class\n";
SNMP::Info::MAU is a subclass of SNMP::Info that supplies access to the MAU-MIB (RFC 2668). This MIB is sometimes implemented on Layer 2 network devices. MAU = Medium Attachment Unit.
The MAU table contains link and duplex info for the port itself and the device connected to that port.
Normally you use or create a subclass of SNMP::Info that inherits this one. Do not use directly.
For debugging purposes call the class directly as you would SNMP::Info
my $mau = new SNMP::Info::MAU(...);
These are methods that return scalar value from SNMP
These are methods that return tables of information in the form of a reference to a hash.
Parses mau_index and mau_link to return the duplex information for interfaces.
Parses mac_index,mau_autostat,mau_type_admin in order to find the admin duplex setting for all the interfaces.
Returns either (auto,full,half).
Called by mau_i_duplex_admin() if mau_type_admin is empty. Parses mau_index,mau_autostat,mau_autosent in order to find the admin duplex setting for all the interfaces.
Returns either (auto,none,full,half).
Returns admin speed setting for all the interfaces.
This is essentially the type of link in use.
eg. dot3MauType100BaseTXFD - 100BaseT at Full Duplex
1 - other
2 - unknown
3 - operational
4 - standby
5 - shutdown
6 - reset
Use 5 and !5 to see if the link is up or down on the admin side.
Directly from F<MAU-MIB> :
0 other or unknown
5 10BASE-T duplex mode unknown
8 10BASE-FL duplex mode unknown
10 10BASE-T half duplex mode
11 10BASE-T full duplex mode
12 10BASE-FL half duplex mode
13 10BASE-FL full duplex mode
15 100BASE-TX half duplex mode
16 100BASE-TX full duplex mode
17 100BASE-FX half duplex mode
18 100BASE-FX full duplex mode
19 100BASE-T2 half duplex mode
20 100BASE-T2 full duplex mode
Uses the same decoder as $mau->mau_type().
These are methods that provide SNMP set functionality for overridden methods or provide a simpler interface to complex set operations. See "SETTING DATA VIA SNMP" in SNMP::Info for general information on set operations.
Sets port speed, must be supplied with speed and port ifIndex.
Note that this method has some limitations since there is no way to reliably set the port speed independently of the port duplex setting on certain devices, notably the Cisco Cat4k series.
Speed choices are '10', '100', '1000', 'auto'.
Sets port duplex, must be supplied with duplex and port ifIndex.
Note that this method has some limitations since there is no way to reliably set the port duplex independently of the port speed setting on certain devices, notably the Cisco Cat4k series.
Duplex choices are 'auto', 'half', 'full'.
Sets port speed and duplex settings, must be supplied with speed, duplex and port ifIndex.
Accepts the following values for speed and duplex:
auto/auto (this is a special case)
Boolean. Checks to see if any of the full_duplex types from mau_type()
are high. Currently bits 11,13,16,18,20.
Boolean. Checks to see if any of the half_duplex types from mau_type()
are high. Currently bits 10,12,15,17,19.
To install SNMP::Info, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.