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. I only mention these as I have had direct experience installing, configuring, and managing these software packages.How to collect list of MAC addresses from Cisco Switch via SNMP (dot1dTpFdbEntry) There are a number of other solutions out there (both commercial and free). While it does not store its data in SQL, it creates CSV files which can then be poured into a SQL database, if desired. IPPLAN polls via the ucd-snmp package and NMAP and can map IP addresses to MAC addresses in a variety of SQL databases.Īlso, you may want to take a look at Switchmap. A more recent version can be installed from source on their site.Īnother example would be IPPlan which focuses on IP Address Management(IPAM), DNS and circuit management. While there is a package available for install from the Ubuntu repositories (see netdiso-common, netdisco-backend, and netdisco-frontend) it is somewhat outdated. Layer-2 topology protocols such as CDP and LLDP provide automatic discovery of the network topology." Data is stored using a SQL database for scalability and speed. Per their website, Netdisco is a software package that maintains "Configuration information and connection data for network devices. One example of such a tool available for Ubuntu is Netdisco. How these device are configured is vendor dependant and beyond the apparent scope of your question. Either you, or your IT support folks, will need to configure the switches with permit SNMP string as well as permit SNMP queries from the server IP/subnet that it resides on. Generally, their functionality includes a great deal more than what you are asking for in your question.īefore installing the software on a server, it is important to note that you should have administrative access to the network devices, or at the very least, permission to query the devices in question. There are a number of software solutions that can poll network devices via SNMP and store their MAC address tables in a SQL database.
0 Comments
Leave a Reply. |