I want to get MAC address of machines directly connected to a switch using SNMP. I am querying dot1qTpFdbPort for this. But this returns all the MAC addresses learned by switch which includes machines which are not physically connected to this switch but are learned by switch.
How do get MAC addresses of only those machines which are physically connected to ports on switch?
My goal is to figure out all the machines which are physically connected to a switch.
I am using a non cisco switch. But I want to implement a generic method for all boxes.
[root@dani ~]# snmpwalk -c public -v 2c 192.168.48.1 **sysDescr** SNMPv2-MIB::sysDescr.0 = STRING: **3Com Baseline Switch 2928-SFP Plus** Software Version 5.20 Release 1101P10