cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
330
Views
0
Helpful
2
Replies

Extra Characters with SNMP CDP

bdjones
Level 1
Level 1

I am trying to grab phone IP address information from a 4506 switch via the CISCO-CDP-MIB. A number of the phones are returning extra "garbage" characters along with the data. Any idea what is going on?

70 lfarm15 > snmpwalk -v 2c -c PUBLIC ca09-c4506-1 .1.3.6.1.4.1.9.9.23.1.2.1.1.4

enterprises.9.9.23.1.2.1.1.4.2.59 = Hex: 0A 2C 07 12

enterprises.9.9.23.1.2.1.1.4.3.60 = Hex: 0A 2C 07 12

enterprises.9.9.23.1.2.1.1.4.4.56 = Hex: 0A 2C 07 19

enterprises.9.9.23.1.2.1.1.4.102.68 = ".,.3" Hex: 0A 2C 0D 33

enterprises.9.9.23.1.2.1.1.4.103.62 = ".,.#" Hex: 0A 2C 0D 23

enterprises.9.9.23.1.2.1.1.4.106.54 = ".,.\"" Hex: 0A 2C 0D 22

enterprises.9.9.23.1.2.1.1.4.114.66 = ".,.Y" Hex: 0A 2C 0D 59

Any assistance would be appreciated.

Thanks

Brad

2 Replies 2

David Stanford
Cisco Employee
Cisco Employee

Looks like this could be a switch code bug, but I would run a packet capture to make sure the raw snmp packets are sending the same garbage characters and that is not just the snmp tool interpreting something incorrectly.

You might want to open a TAC service request to confirm if this is a new or existing bug. I did a quick search and didn't see anything.

So it turns out that some of the characters that are being sent but the switch are "packed". The perl Net::SNMP module was not handling these correctly.

From the command line snmpwalk shows both the packet characters and the unpacked characters:

enterprises.9.9.23.1.2.1.1.4.2.59 = Hex: 0A 2C 07 12

enterprises.9.9.23.1.2.1.1.4.3.60 = Hex: 0A 2C 07 12

enterprises.9.9.23.1.2.1.1.4.4.56 = Hex: 0A 2C 07 19

enterprises.9.9.23.1.2.1.1.4.101.71 = ".,.a" Hex: 0A 2C 0D 61

enterprises.9.9.23.1.2.1.1.4.102.68 = ".,.3" Hex: 0A 2C 0D 33

enterprises.9.9.23.1.2.1.1.4.103.62 = ".,.#" Hex: 0A 2C 0D 23

So remedy this in the script I called unpack('H*',$_) on the packet variables (note: I check to see if they had "x" in them to determine if they were packed)

Brad

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card