how to see mac address table on the l2 interface using snmp

Unanswered Question
May 4th, 2010

Hello

   I have set snmp on my cisco cat3750 and cat2960: snmp-server community public RO.

   I have cheked it by snmpwalk -c public -v 1  <ip of my switch> system. It works!

   But when I try to get  mac address table through snmwalk -c public -v 1 <ip of my switch> 1.3.6.1.2.1.17.4.3.1.1 it shows nothing about mac address table. What I do wrong? Can you (experts) show me please an example of snmp equivalent show mac-  int <my interface> command?

Bye

I have this problem too.
2 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
Joe Clarke Tue, 05/04/2010 - 13:27

You need to use community string indexing to walk the MAC address table for each VLAN configured on the switch.  For example, to get all the MAC address entries for VLAN 10, do:

snmwalk -c [email protected] -v 1  1.3.6.1.2.1.17.4.3.1.1

To get the MACs on a given switchport, you will need to add the dot1dBasePort index to the end of this OID.  That will be different for each port, and can be mapped back to an ifIndex (then back to an ifDescr) using the dot1dBasePortTable.

jonathanpereira.cruz Thu, 06/11/2015 - 10:30

Hi Guys, 

 

I need  to execute the same thing.  

 

how can i get  "show mac-  int <my interface>" result using snmp? 

Actions

This Discussion