cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3167
Views
0
Helpful
1
Replies

Issue Retrieving Hex-String Values via SNMP(SNMP_utils & net SNMP) on Cisco Swithces

Adan Zuniga
Level 1
Level 1

All, 

I am running into issues when retrieving Hex-String Values from IOS switches with perl, snmp_utils perl module, and net-snmp. For example, when I walk the following OID 1.3.6.1.2.1.17.4.3.1.1 on a particular Vlan, my result is literally "180.20.137.96.107.0:▒▒`k' " The issue is those funny characters after 107.0. This is supposed to be a Hex-String representing a MAC address. I am able to retrieve the value just fine natively from a shell command. Please let me know if additional info is required. I am new to perl, linux, and snmp, but I am more knowledgeable on IOS. 

1 Reply 1

Rolf Fischer
Level 9
Level 9

Hi,

this object is called dot1dTpFdbAddress, and you're correct: The return value is a MAC address. This MAC address is also the last part of the OID on the left side of the equal sign, in decimal.

I haven't worked with the perl module so far but net-snmp allows you to change the output options:

snmpbulkwalk -v2c -c public -OQs 192.168.1.23 1.3.6.1.2.1.17.4.3.1.1
mib-2.17.4.3.1.1.156.78.32.64.192.120 = "9C 4E 20 40 C0 78 "

snmpbulkwalk -v2c -c public -OQas 192.168.1.23 1.3.6.1.2.1.17.4.3.1.1
mib-2.17.4.3.1.1.156.78.32.64.192.120 = ".N @.x" (ASCII)

You can find more information about the output options of your implementation in the man pages (man snmpcmd) or here: http://www.net-snmp.org/docs/man/snmpcmd.html

HTH
Rolf

Review Cisco Networking for a $25 gift card