[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2185
  • Last Modified:

Cannot get the serial number via SNMPGET/SNMPWALK for a Cisco 2900XL Switch

I've got an old cisco2900xl which seems to be working ok and in the http interface I can do "show version" and it comes up with three serial numbers

Motherboard serial number: FAB045240RT
Power supply serial number: PHI044501NM
Model number: WS-C2924M-XL-EN
System serial number: FAB0452P1GQ

Now I want to get this information from SNMP. I do an snmpwalk ...

     snmpwalk -v2c -c public 192.168.1.22 >zx.txt

and get back a 300k text file, but none of those serial numbers are in there. Its the same problem whether I set the mibdirs to a mibs folder or not.


0
plq
Asked:
plq
  • 3
  • 3
1 Solution
 
MysidiaCommented:
Try

snmpwalk -v2c -c public  .1.3.6.1.2.1.47.1.1.1.1.11
0
 
MysidiaCommented:
With the ip, I mean

  snmpwalk -v2c -c public 192.168.1.22  .1.3.6.1.2.1.47.1.1.1.1.11
0
 
plqAuthor Commented:
Yes, it doesnt return anything

If I cut it back to the 47 I just get this..

  SNMPv2-SMI::mib-2.47.1.4.1.0 = Timeticks: (0) 0:00:00.00

0
 The Evil-ution of Network Security Threats

What are the hacks that forever changed the security industry? To answer that question, we created an exciting new eBook that takes you on a trip through hacking history. It explores the top hacks from the 80s to 2010s, why they mattered, and how the security industry responded.

 
lrmooreCommented:
Have you tried same command with snmp v1 ?
0
 
plqAuthor Commented:
Here's all combinations of v1, v2, mibdirs set, no mibdirs, all about the same...

SET mibdirs=
snmpwalk -v2c -c public 192.168.1.22 1.3.6.1.2.1.47
iso.3.6.1.2.1.47.1.4.1.0 = Timeticks: (0) 0:00:00.00

SET mibdirs=
snmpwalk -v1 -c public 192.168.1.22 1.3.6.1.2.1.47
iso.3.6.1.2.1.47.1.4.1.0 = Timeticks: (0) 0:00:00.00

SET mibdirs=C:\SNMPPublish\mibs
snmpwalk -v2c -c public 192.168.1.22 1.3.6.1.2.1.47
SNMPv2-SMI::mib-2.47.1.4.1.0 = Timeticks: (0) 0:00:00.00

SET mibdirs=C:\SNMPPublish\mibs
snmpwalk -v1 -c public 192.168.1.22 1.3.6.1.2.1.47
SNMPv2-SMI::mib-2.47.1.4.1.0 = Timeticks: (0) 0:00:00.00

Interesting that v1 used a v2 mib name, but still, mibs are just names arent they ??


0
 
MysidiaCommented:
It may also be worthwhile to try   The Cisco OLD-CHASSIS-MIB
snmpwalk -v1 -c public 192.168.1.22  1.3.6.1.4.1.9.3.6.3

What software and version is the switch running?
If you run a "show snmp", do you see a chassis ID?


You may have an unusual situation where you need something like a
snmp-server chassis-id  serial-number  FAB0452P1GQ

configuration

Depending on your actual configuration; a switch may expose no chassis ID over SNMP, or a chassis ID that differs from the device's  actual serial number.

Certainly the output of 'show version'  is more reliable than the result of a snmp query, for that reason.
0
 
plqAuthor Commented:
That seems to be the answer

SNMPWALK defaults to 1.3.6.1.2.1 and not scan 1.3.6.1.4.1 - that caught me out, I thought it was scanning the whole lot.

When I scanned the whole of .1.4.1 I got another text file 400kb in size (on top of the 300kb from 1.2.1)

1.3.6.1.4.1.9.3.6.3.0 was the Serial Number was and its the same as "show version". "show inventory" doesnt work on this switch ?. "show snmp" also gives the same serial.

0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now