cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

1033
Views
0
Helpful
1
Replies
Highlighted
Beginner

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

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. 

Everyone's tags (1)
1 REPLY 1
Engager

Hi,

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

CreatePlease to create content
Content for Community-Ad
July's Community Spotlight Awards