I'm trying to accces the dynamic address table through SNMP, with a PowerConnect 6248. I tried to follow the instructions at [1], as other parts of BRIDGE-MIB are ok on this switch.
When snmpwalk'ing from BRIDGE-MIB::dot1dTpFdbEntry, I got nothing, while, on the switch's web interface there are entries in the table.
Hi Jean... here is a snip from a short script I use to pull all the MAC/IP combinations from my core 6000 and 6200 series switches and clean them up a little for easier viewing. It's not the best, but it can be helpful.
(this should all be on one line, but it is gonna wrp something ugly here. Sorry :)
Here's the OID you need to look at. (.1.3.6.1.2.1.17.7.1.2.2.1.2) I use the getnext, and scan through them using the return OID from one get as the OID for the next.
warlofski
1 Rookie
•
9 Posts
1204
0
Posted September 12th, 2008 23:00
Hi Jean... here is a snip from a short script I use to pull all the MAC/IP combinations from my core 6000 and 6200 series switches and clean them up a little for easier viewing. It's not the best, but it can be helpful.
(this should all be on one line, but it is gonna wrp something ugly here. Sorry :)
snmpwalk -v2c IP.Address -c private
ip.ipNetToMediaTable.ipNetToMediaEntry.ipNetToMediaPhysAddress
| cut -d'.' -f3- | sed -e 's/ \([0-9a-f]:\)/ 0\1/' -e 's/= STRING:/ -/' -e '/ff:ff:ff:ff:ff:ff/d'
| sort | awk 'BEGIN { FS=":"; OFS=FS } { for (i=1;i<=NF;i++) if (length($i)<2) $i="0"$i; print }'
--
Bill Arlofski
Reverse Polarity, LLC