Page 1 of 1

Get mac by switch port

Posted: Wed Sep 11, 2019 6:51 pm
by Ridddick
Hi. An ancient task without normal sulution. Having couple of d-link smart-switches and trying to know what mac on what port is for now. Proper oid for that is (1.3.6.1.2.1.17.7.1.2.2.1.2) and the answer is like this:
iso.3.6.1.2.1.17.7.1.2.2.1.2.1.[dec-mac]196.18.245.52.148.211[/dec-mac] = INTEGER: 27
iso.3.6.1.2.1.17.7.1.2.2.1.2.1.196.110.31.3.252.231 = INTEGER: 1
iso.3.6.1.2.1.17.7.1.2.2.1.2.1.204.45.224.141.88.68 = INTEGER: 14
iso.3.6.1.2.1.17.7.1.2.2.1.2.1.204.45.224.141.88.69 = INTEGER: 14
iso.3.6.1.2.1.17.7.1.2.2.1.2.1.208.80.153.70.12.140 = INTEGER: 1
iso.3.6.1.2.1.17.7.1.2.2.1.2.1.208.80.153.73.163.128 = INTEGER: 2
iso.3.6.1.2.1.17.7.1.2.2.1.2.1.224.213.94.32.230.139 = INTEGER: 32
So it doesn't allow to ask mac by port, it shows the whole FDB. Ok, so if i can put this into an array and filter by value i would get an oid that contains mac. But Dude can print out only values and not the oid itself. Is it possible with some function maybe? Any ideas?