07-12-2010 03:23 PM
We need to locate our devices MAC address on the switch. We currently use cli show mac-address but would like to switch to SNMP control. I have not been able to find an SNMP replacement for show mac-address. Does anyone know where I can find a list of all the MAC addresses attached to each port?
07-13-2010 09:43 PM
You may be able to use snmpwalk to get the information you need. However, you'll have to figure out what OID to poll in the MIB you're switch utilizes to present the CAM table over SNMP. Without any information, I'll take a guess and say it's going to be in, "FOUNDRY-SN-MAC-VLAN-MIB".
Here's an example of how to use snmpwalk with a standard MIB to poll the ARP table from a router or L3 Switch.
#snmpwalk -v 2c -c abc123 10.10.10.1 ipNetToMediaPhysAddress
Alternatively, you can also run the snmpwalk without specifying a MIB area of interest, leave off the last argument shown in the example above, and it will return a large number of rows you could manually scan through to find the information you need.
Here is a link to some additional snmpwalk examples:
07-14-2010 04:45 AM
Thanks for your reply.
I found a table with ipNetToMediaPhysAddress in the RFC1213-MIB.iso.org.dod.internet.mgmt.mib-2 in the ip.iNetToMediaTable. However it is not showing all the devices I have attached. It will occasionally show some of them but has never shown all of them. I have IO active on 9 ports and have only seen 2 or 3 of them show up in that table. When I use "show mac-address" all of them show up all of the time. That table is full of MACs that it has found over the mgmt port (from our lab network) and those seem to be quite consistent, but rarely does it show one of the 10G ports.
The switch I am using is the TurboIron24. I am using iReasoning MIB Browser to try to locate the info and have loaded the TIS04200.mib. I have some test JAVA code with which I am able to enable and disable ports using the RFC1213-MIB.iso.org.dod.internet.mgmt.mib-2 interfaces.iftable and now only need to be able to locate the port I want to manage.
I do not see the FOUNDRY-SN-MAC-VLAN-MIB in the MIB list provided in TIS04200.mib. Maybe I need to locate it seperately.
Again, I am greatful for you assistance.
07-14-2010 08:28 AM
Right, ipNetToMediaPhysAddress should only show you entries in the ARP table. The ARP table entries should be pretty limited if your using this switch primarily in a layer 2 fashion.
Take a look at this link for additional information: http://www.snmplink.org/OnLineMIB/Brocade/
You can find the MIB I referenced under: Parent- > Brocade Communication Systems, Inc. > Foundry Networks, Inc > FGL04000