I'm learning about fetching information via SNMP towards our HP switches. I'm trying to query a switch using the OID BRIDGE-MIB::dot1dTpFdbPort included with a known MAC address 50:65:f3:2e:c5:5c, as such .

$ snmpget -v3 -Oe my_switch .
BRIDGE-MIB::dot1dTpFdbPort.'Pe...\' = INTEGER: 31466

It returns the integer 31466. I'm then trying to query the same switch using the OID IF-MIB::ifType included with the integer 31466, as such .

$ snmpget -v3 -Oe my_switch .
IF-MIB::ifType.31466 = No Such Instance currently exists at this OID

Why can't the port with the integer 31466 be found on the switch? Am I missing something? I appreciate any help as I'm quite new to the SNMP and OID stuff.


I think you are missing a lookup in dot1dBasePortTable to convert from a dot1dBasePort to a dot1dBasePortIfIndex.

  • Thank you. I was indeed missing looking up the index of the port using dot1dBasePortIfIndex. /usr/bin/snmpbulkwalk -v3 -Oe my_switch . | grep 31466 returns INTEGER 31659 and /usr/bin/snmpget -v3 -Oe my_switch . now returns INTEGER 161 (in my case). Jun 4 at 6:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.