plq
asked on
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.
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.
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
snmpwalk -v2c -c public 192.168.1.22 .1.3.6.1.2.1.47.1.1.1.1.11
ASKER
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
If I cut it back to the 47 I just get this..
SNMPv2-SMI::mib-2.47.1.4.1
Have you tried same command with snmp v1 ?
ASKER
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\mib s
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\mib s
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 ??
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\mib
snmpwalk -v2c -c public 192.168.1.22 1.3.6.1.2.1.47
SNMPv2-SMI::mib-2.47.1.4.1
SET mibdirs=C:\SNMPPublish\mib
snmpwalk -v1 -c public 192.168.1.22 1.3.6.1.2.1.47
SNMPv2-SMI::mib-2.47.1.4.1
Interesting that v1 used a v2 mib name, but still, mibs are just names arent they ??
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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.
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.
snmpwalk -v2c -c public .1.3.6.1.2.1.47.1.1.1.1.11