NAME Net::SNMP::Mixin::Dot1qFdb - mixin class for 802.1-Q switch forwarding databases VERSION Version 0.03 SYNOPSIS use Net::SNMP; use Net::SNMP::Mixin qw/mixer init_mixins/; my $session = Net::SNMP->session( -hostname => 'foo.bar.com' ); $session->mixer('Net::SNMP::Mixin::Dot1qFdb'); $session->init_mixins(); snmp_dispatcher() if $session->nonblocking; die $session->error if $session->error; foreach my $fdb_entry ( $session->get_dot1q_fdb_entries() ) { my $mac = $fdb_entry->{MacAddress}; my $fdb_id = $fdb_entry->{fdbId}; my $vlan_id = $fdb_entry->{vlanId}; my $port = $fdb_entry->{dot1dBasePort}; my $status = $fdb_entry->{fdbStatus}; print "$mac, $fdb_id, $vlan_id, $port, $status\n"; } DESCRIPTION A Net::SNMP mixin class for forwarding database info of 802.1-Q compatible switches. The switches must support parts of the standard Q-BRIDGE-MIB. Sorry to disappoint you, Cisco isn't standard conform, but you knew this already, for sure! MIXIN METHODS @fdb = OBJ->get_dot1q_fdb_entries() 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, fdbId => Integer, vlanId => Integer, fdbStatus => Integer, fdbStatusString => String, } MacAddress MacAddress received, in normalized IEEE form XX:XX:XX:XX:XX:XX. dot1dBasePort The receiving bride-port for the MAC address. fdbId MacAddress is member of the FDB with this fdbId. dot1q bridges support many forwarding databases. vlanId Every fdbId is related to a distinct vlanId. fdbStatus 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. fdbStatusString The status of this entry in string form, see above. INITIALIZATION OBJ->_init($reload) Fetch the fdb related snmp values from the host. Don't call this method direct! PRIVATE METHODS Only for developers or maintainers. _fetch_dot1q_fdbid() Fetch some columns from the VlanCurrentTable once during object initialization. MAC addresses in the forwarding database are related to fbd ids and the fbd ids are related to vlan ids by this column. _fetch_dot1q_tp_fdb_table() Fetch the forwarding databases from the dot1qTpFdbTable once during object initialization. SEE ALSO Net::SNMP::Mixin::Dot1dBase for a mapping between ifIndexes and dot1dBasePorts. REQUIREMENTS Net::SNMP, Net::SNMP::Mixin BUGS, PATCHES & FIXES There are no known bugs at the time of this release. However, if you spot a bug or are experiencing difficulties that are not explained within the POD documentation, please submit a bug to the RT system (see link below). However, it would help greatly if you are able to pinpoint problems or even supply a patch. Fixes are dependant upon their severity and my availablity. Should a fix not be forthcoming, please feel free to (politely) remind me by sending an email to gaissmai@cpan.org . RT: http://rt.cpan.org/Public/Dist/Display.html?Name=Net-SNMP-Mixin-Dot1qFdb AUTHOR Karl Gaissmaier COPYRIGHT & LICENSE Copyright 2008 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.