0

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 .1.3.6.1.2.1.17.4.3.1.2.80.101.243.46.197.92.

$ snmpget -v3 -Oe my_switch .1.3.6.1.2.1.17.4.3.1.2.80.101.243.46.197.92
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 .1.3.6.1.2.1.2.2.1.3.31466.

$ snmpget -v3 -Oe my_switch .1.3.6.1.2.1.2.2.1.3.31466
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.

0

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

1
  • Thank you. I was indeed missing looking up the index of the port using dot1dBasePortIfIndex. /usr/bin/snmpbulkwalk -v3 -Oe my_switch .1.3.6.1.2.1.17.1.4.1.2 | grep 31466 returns INTEGER 31659 and /usr/bin/snmpget -v3 -Oe my_switch .1.3.6.1.2.1.2.2.1.3.31659 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.