Net::SNMP::Mixin::NXOSDot1qFdb - mixin class for 802.1-Q switch forwarding databases
use Net::SNMP; use Net::SNMP::Mixin; my $session = Net::SNMP->session( -hostname => 'foo.bar.com' ); $session->mixer('Net::SNMP::Mixin::NXOSDot1qFdb'); $session->init_mixins(); snmp_dispatcher() if $session->nonblocking; $session->init_ok(); die $session->errors if $session->errors; foreach my $fdb_entry ( $session->get_dot1q_fdb_entries() ) { my $mac = $fdb_entry->{MacAddress}; my $vlan_id = $fdb_entry->{vlanId}; my $port = $fdb_entry->{dot1dBasePort}; my $status = $fdb_entry->{fdbStatus}; print "$mac, $vlan_id, $port, $status\n"; }
A Net::SNMP mixin class for forwarding database info of NXOS 802.1-Q limited MIBs.
Returns a list of fdb entries. Every list element is a reference to a hash with the following fields and values:
{ MacAddress => 'XX:XX:XX:XX:XX:XX', dot1dBasePort => Integer, vlanId => Integer, fdbStatus => Integer, fdbStatusString => String, }
MacAddress received, in normalized IEEE form XX:XX:XX:XX:XX:XX.
The receiving bride-port for the MAC address.
Every MacAdress is related to a distinct vlanId.
The status of this entry. The meanings of the values are:
1 = other 2 = invalid 3 = learned 4 = self 5 = mgmt
For more information please see the corresponding Q-BRIDGE-MIB.
The status of this entry in string form, see above.
Fetch the fdb related snmp values from the host. Don't call this method direct!
Only for developers or maintainers.
Fetch the forwarding databases from the dot1qTpFdbTable once during object initialization.
Net::SNMP::Mixin::NXOSDot1dBase for a mapping between ifIndexes and bridgePorts.
Net::SNMP, Net::SNMP::Mixin
Karl Gaissmaier <karl.gaissmaier at uni-ulm.de>
Copyright 2020-2021 Karl Gaissmaier, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Net::SNMP::Mixin::NXOSDot1qFdb, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::SNMP::Mixin::NXOSDot1qFdb
CPAN shell
perl -MCPAN -e shell install Net::SNMP::Mixin::NXOSDot1qFdb
For more information on module installation, please visit the detailed CPAN module installation guide.