Welcome, Guest. Please login or register.

Author Topic: Serial numbers on Cisco C2940-8TF  (Read 9114 times)

gumba

  • Guest
Serial numbers on Cisco C2940-8TF
« on: May 05, 2009, 09:10:31 AM »
I've problems with correctly retrieving serial numbers from Cisco C2940-8TF switches. We've a couple of them in our network, with the most of them showing up with correct serial numbers in NeDi. However, some of them are showing up with serial number '0x17'. The strange thing about that is, while the same definition file is used for all of them, devices with correct serial numbers as well as devices without both have even the same versions of boot images. Totally everything is equal, except the fact that when I snmpget the OID that is expected to hold the serial number it in fact returns '0x17' from the switches in question, so this is not a problem with NeDi but somehow with the devices themselves.
Does anyone own Cisco C2940-8TF and has seen this problem before? Anyone with a suggested solution?

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2712
    • View Profile
    • NeDi
Re: Serial numbers on Cisco C2940-8TF
« Reply #1 on: May 05, 2009, 06:09:27 PM »
I have a WS-C2940-8TT and never saw such behaviour. What's the response with cli snmpget? What do you see with wireshark? On rare occasions the perl snmp lib behaves differently than with the ucd commands...
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

gumba

  • Guest
Re: Serial numbers on Cisco C2940-8TF
« Reply #2 on: May 06, 2009, 07:10:58 AM »
cli snmpget also returns '0x17' from those devices. I guess the problem is the devices SNMP tables, even though they run the same IOS version as device the return a correct serial number. And it's not always the same IOS version. It's certainly not a NeDi problem, but I couldn't figure out yet what's going wrong on these switches.

ralto

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Serial numbers on Cisco C2940-8TF
« Reply #3 on: May 06, 2009, 08:51:36 AM »
Hi,

i could not help you with this problem, but i saw this i would say output also at SPECTRUM. Some of our WS-C29590C-24 or WS-C2924-XL-EN report this valuve insted of the serialnumber. And other devices with the same boot image and hw report the serialnumber.

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2712
    • View Profile
    • NeDi
Re: Serial numbers on Cisco C2940-8TF
« Reply #4 on: May 06, 2009, 11:45:03 PM »
How about the config? I remember entering something in the SN field on a AP1230 overwrites the actual SN...
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

GuyMontag

  • Guest
Re: Serial numbers on Cisco C2940-8TF
« Reply #5 on: May 11, 2009, 10:07:44 AM »
Got the same behaviour here. 8 of our 251 Cisco 3550 and 2 of our 20 Cisco 4006 show up with 0x17.
snmpget (OID 1.3.6.1.2.1.47.1.1.1.1.11.1) returns the serial number.

e.g.

10.67.5.10 FOXXXXXXXX Cat4006 cat4500-entservicesk9-mz.122-31.SGA.bin
10.77.5.10 0x17 Cat4006 cat4500-entservicesk9-mz.122-31.SGA.bin

vusrtnedi01:~# snmpget -v 2c -c mysecret 10.67.5.10 1.3.6.1.2.1.47.1.1.1.1.11.1
SNMPv2-SMI::mib-2.47.1.1.1.1.11.1 = STRING: "FOXXXXXXXX"

vusrtnedi01:~# snmpget -v 2c -c mysecret 10.77.5.10 1.3.6.1.2.1.47.1.1.1.1.11.1
SNMPv2-SMI::mib-2.47.1.1.1.1.11.1 = STRING: "FOXXXXXXXX"




rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2712
    • View Profile
    • NeDi
Re: Serial numbers on Cisco C2940-8TF
« Reply #6 on: May 11, 2009, 12:56:45 PM »
Can anyone unpack the SN in question, to verify whether it's interpreted as HEX instead of a string?

E.g. add this at line 269 of libsnmp.pl:
print "Serialstring:$main::dev{$_[0]}{sn}=" . unpack('H32', $main::dev{$_[0]}{sn});

Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

GuyMontag

  • Guest
Re: Serial numbers on Cisco C2940-8TF
« Reply #7 on: May 13, 2009, 02:53:00 PM »
I added at line 267
print "Serialstring:$main::dev{$_[0]}{sn}=" . unpack('H32', $main::dev{$_[0]}{sn});

Output:
Code: [Select]
DP-Discovery with 3 seed(s) on Wed May 13 14:31:07 2009
====================================================================================
Device                          Status                               Todo/Done-Time
------------------------------------------------------------------------------------
10.77.5.10      ROSWRR01        Serialstring:0x17=30783137v46 i254     j65     p26/2 m6         a721    PuFp1 Fp989 f533         28/1-14s



rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2712
    • View Profile
    • NeDi
Re: Serial numbers on Cisco C2940-8TF
« Reply #8 on: May 13, 2009, 03:28:49 PM »
Hmm, so so it returns 0x17 (ascii 30,78,31,37) and doesn't seem to be just misinterpreted. What does wireshark reveal (snmpwalk and nedi wise)?
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

gumba

  • Guest
Re: Serial numbers on Cisco C2940-8TF
« Reply #9 on: May 13, 2009, 03:39:05 PM »
Wireshark on snmpget to OID 1.3.6.1.4.1.9.3.6.3.0 says in get-response:
Code: [Select]
Value (OctetString): 30783137202020202020202020202020202020202020202020202020202020
which is 0x17 and a bunch of spaces.

Weird thing is, on most devices this works great. Is just a (small) number of devices that return this stuff. I would guess its a problem with the devices itself, but I can't see anything that would distinguish the problematic devices from the "normal" ones.

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2712
    • View Profile
    • NeDi
Re: Serial numbers on Cisco C2940-8TF
« Reply #10 on: May 13, 2009, 03:46:12 PM »
Anything special in the config? Is it possible to exchange a switch in question and try it again after erasing the config (and set the needed bits again)? Of course this is just a suggestion if anyone has some time to spare at work ;)
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

gumba

  • Guest
Re: Serial numbers on Cisco C2940-8TF
« Reply #11 on: May 13, 2009, 03:55:28 PM »
Unfortunately no, at least not in this moment, since all of the switches in question are in use in a productive environment. But I have this on my task list.

But as I see right now, the problems seems to get weird. The problem is not related to the C2940-8TF any more, at the moment I have 3 more Cisco models (C2960-24TC-L, Catalyst 2960-48 and Catalyst 3560-24TS) with single devices returning 0x17 as serial number.

GuyMontag

  • Guest
Re: Serial numbers on Cisco C2940-8TF
« Reply #12 on: May 13, 2009, 05:32:02 PM »
solved  :D

Code: [Select]
ESKKPS002#sh snmp chassis
0x17

on the bottom of the devices config was an entry: snmp-server chassis-id 0x17

to restore the default value (SN of the chassis)
Code: [Select]
ESKKPS002(config)#no snmp-server chassis-id
ESKKPS002#sh snmp chassis
CAT0XXXXXX



gumba

  • Guest
Re: Serial numbers on Cisco C2940-8TF
« Reply #13 on: May 13, 2009, 05:44:09 PM »
Why the ...?!?
I can confirm that. no snmp-server chassis-id solves the issue and the serial number appears correctly in NeDi. Guess I have to investigate why this is on some switches and not on others. Doesn't seem a very helpful feature to me.

Thanks GuyMontag!