Problem
When you are dealing with MAC addresses, systems like to print them out as hexadecimal numbers:
# arp -an
? (10.0.10.200) at 00:80:F0:56:46:30 [ether] on eth0
...but OID values in SNMP are decimal.
Solution:
I call this script
hexmac2decoid#!/usr/bin/perl$in=shift @ARGV;
@elements=split(/:/,$in);
for $element (@elements)
{
print ".".hex($element);
}
Example
# snmpwalk -v 1 -c public procurve1 .1.3.6.1.2.1.17.7.1.2.2.1.2.1 | grep `hexmac2decoid 00:10:DB:35:41:55`
SNMPv2-SMI::mib-2.17.7.1.2.2.1.2.1.0.16.219.53.65.85 = INTEGER: 1
This tells us that MAC address 00:10:DB:35:41:55 is reachable through port 1 on procurve1 (ref:
Switching Tables).