#! /usr/bin/perl -w use lib '/path/to/modules'; use SNMP_util; use strict; &snmpLoad_OID_Cache("/path/to/file/with/oids"); # community string indexing my $community = 'community@1'; my $version = "2"; my $host = "192.168.1.1"; my $host_options = "$community" . "@" . "$host" . ":::::2"; my @results = &snmpwalk($host_options, "dot1dTpFdbAddress"); my ($result, $oid, @macs, $mac); foreach $result (@results) { ($oid, $result) = split(/\:/, $result); } foreach $result (@results) { $result = unpack("H*", $result); } foreach $result (@results) { print "$result\n"; } Example Output: 00065ecb6b36 00065ecb6b 00065ecb6b3d The second mac address in the list above is missing the last two hex digits which according to snmpwalk from net-snmp.org should be "a3".