SNMP::Info::Bridge - Perl5 Interface to BRIDGE-MIB
BRIDGE-MIB is used by most Layer 2 devices like Switches
Inherits all methods from SNMP::Info
Max Baker (max@warped.org)
max@warped.org
my $bridge = new SNMP::Info::Bridge(DestHost => 'myswitch', Community => 'public'); my $mac = $bridge->mac();
Arguments passed to new() are passed on to SNMP::Session::new()
my $bridge = new SNMP::Info::Bridge( DestHost => $host, Community => 'public', Version => 3,... ) die "Couldn't connect.\n" unless defined $bridge;
Sets or returns the SNMP::Session object
# Get my $sess = $bridge->session(); # Set my $newsession = new SNMP::Session(...); $bridge->session($newsession);
Returns the MAC Address of the root bridge port
(dot1dBaseBridgeAddress)
Returns the number of ports in device
(dot1dBaseNumPorts)
Returns the type? of the device
(dot1dBaseType)
Returns reference to hash of forwarding table MAC Addresses
(dot1dTpFdbAddress)
Returns reference to hash of forwarding table entries port interface identifier (iid)
(dot1dTpFdbPort)
Returns reference to hash of forwading table entries status
(dot2dTpFdbStatus)
Returns reference to hash of bridge port table entries map back to interface identifier (iid)
(dot1dBasePortIfIndex)
Returns reference to hash of bridge port table entries physical port name.
(dot1dBasePortCircuit)
To install SNMP::Info, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SNMP::Info
CPAN shell
perl -MCPAN -e shell install SNMP::Info
For more information on module installation, please visit the detailed CPAN module installation guide.