# Snmp error

**URL:** <https://www.ruby-forum.com/t/snmp-error/107698>\
**Category:** Ruby\
**Created:** [June 25, 2007, 2:47pm UTC](https://www.ruby-forum.com/t/snmp-error/107698 "2007-06-25T14:47:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [June 25, 2007, 2:47pm UTC](https://www.ruby-forum.com/t/snmp-error/107698/1 "2007-06-25T14:47:05Z")

</div>

Hi,

I’m using the SNMP module to retrieve interfaces mac addresses (oid  
1.3.6.1.2.1.2.2.1.6). Snmpwalk works fine

snmpwalk -v 1 -r 1 -t 2 -c public 127.0.0.1 .1.3.6.1.2.1.2.2.1.6.1  
IF-MIB::ifPhysAddress.1 = STRING: 0:10:83:fd:dd:67

while using the ruby module

ifTable\_columns = [“1.3.6.1.2.1.2.2.1.6”,]  
SNMP::Manager.open(:Host =\> “#{host}”, :Version =\> :SNMPv1, :Community  
=\> ‘public’) do |manager|  
manager.walk(ifTable\_columns) do |row|  
row.each { |vb| puts “#{vb.name.to\_s} #{vb.value.to\_s}  
#{vb.value.asn1\_type}” }  
end  
end

the mac address is visualized as shown

1.3.6.1.2.1.2.2.1.6.1 Ã½Ãg OCTET STRING

instead of 0:10:83:fd:dd:67.

How can I fix it?  
Thank you very mych,

JC
