12-17-2007 11:34 AM - edited 03-05-2019 08:02 PM
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
12-17-2007 05:47 PM
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.
01-03-2008 11:09 AM
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
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide