The corresponding instance of dot1dTpFdbPort indicates which of the bridge’s ports have this address. The value of the corresponding instance of dot1dTpFdbAddress represents one of the bridge’s addresses. The value of the corresponding instance of dot1dTpFdbPort was learned and is being used. This entry is no longer valid (e.g., it was learned but has since aged out), but has not yet been flushed from the table. Is being used to determine if and how frames addressed to the value of the corresponding instance of dot1dTpFdbAddress are being forwarded. This would include the case where some other MIB object (not the corresponding instance of dot1dTpFdbPort, nor an entry in the dot1dStaticTable)
You need to use to match ifIndex value to MAC Address.Īnd finally, to get a Status code to each MAC address perform SNMP Get-Bulk Request for 1.3.6.1.2.1.17.4.3.1.3 Values returned represent IfIndex values for corresponding Interfaces associated with each MAC Address.
To get list of associated Ports for each MAC address perform SNMP Get-Bulk request for “.1.3.6.1.2.1.17.4.3.1.2” If we take Decimal and convert to HEX, we will get 0:50:56:9C:45:71 If we take ASCII text (PVEq) and convert to HEX, we will get 50:56:9C:45:71 Notice that actual MAC Addresses returned look like some garbage characters but those are actually MAC address in ASCII format that needs to be converted to HEX to get a conventional xx:xx:xx:xx:xx:xx style. Here is the Example of output from our LAB Switch: To get list of MAC address perform SNMP Get-Bulk request for “.1.3.6.1.2.1.17.4.3.1.1”
One of the ways to get list of MAC addresses from the forwarding table of Cisco switch is via SNMP MIB: dot1dTpFdbEntryġ.3.6.1.2.1.17.4.3.1.1 ( dot1dTpFdbAddress)ġ.3.6.1.2.1.17.4.3.1.3 ( dot1dTpFdbStatus)ġ.3.6.1.2.1.17.4.3.1.1 ( dot1dTpFdbAddress) contain list of MAC addresses in Binary formatġ.3.6.1.2.1.17.4.3.1.2 ( dot1dTpFdbPort) contain IfIndex value of the interface associated with each MAC Addressġ.3.6.1.2.1.17.4.3.1.3 ( dot1dTpFdbStatus) contain Status code which gives information how each MAC was learned by the switch.
How to collect list of MAC addresses from Cisco Switch via SNMP (dot1dTpFdbEntry)