Solved

Retrieve serial numbers from SNMP snmpget

Posted on 2008-10-15
1
9,544 Views
Last Modified: 2012-05-05
I want to retrieve serial numbers from multiple devices using SNMP. I'm just using the net-snmp.org snmpget/snmpwalk tools

I am finding that the SNMP OID for serial numbers is different on different hardware, even with cisco, for example:

Cisco Aironet    1.3.6.1.4.1.9.9.92.1.1.1.2.1
Cisco 2950       1.3.6.1.4.1.9.3.6.3
Xerox printer    1.3.6.1.2.1.43.5.1.1.17.1

I dont really understand MIBS, but is there any way of constructing a MIB file or getting existing MIB files to extract serial numbers that would cover all SNMP products? Any comments and discussion which helps me understand how snmp works in this regard would also be appreciated

thanks

0
Comment
Question by:plq
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 7

Accepted Solution

by:
dkarpekin earned 500 total points
ID: 22727806
MIB's - it is manufactureie devoped file, support certain functionality.
You need to check with manufacturies , if they do have MIB's  allowing to pull serial#.

snmpwalk - basicly will show you available MIB's on particular hardware- therefore given you idea, what kind of info/statistics, you get retrive from device.
1.By telnet
Router# show inventory
2.snmpget -v1 -c communitystring hostorIP mib-2.47.1.1.1.1.11.1The output looks like this:

SNMPv2-SMI::mib-2.47.1.1.1.1.11.1 = STRING: "FDC01235PAN"If you want to write a batch file to automate the process, follow these steps:

Download Gawk for Windows (awk) to parse the output from the snmpget command.
Install both tools in the same directory.
Create a text file that lists the router hostnames or IP addresses; name it Routers.txt.
Put the following in a batch file (I called mine Getsnscript.tx) and run it:
@echo off
for /F %%1 in ('type routers.txt') do snmpget -v1 -c
cisco %%1 mib-2.47.1.1.1.1.11.1 | awk -F" " "{ print $4 }"The output might look something like this:

C:netsnmpbin> getsnscript.bat
"FO234C35PXN"    

"FTX093431P13    

"FO234C35PXN"If you want, you can redirect it to a text file and import that text file to a spreadsheet. Of course, you can also get much more complex with the script and retrieve more information.

3.Use SNMP from a GUI application
Of course, there are always GUI applications that can accomplish the same thing as CLI scripts. I've found that Kiwi CatTools- http://www.kiwisyslog.com/kiwi-cattools-overview/  (freeware for up to five devices) does a fine job of retrieving the serial number of routers and provides a nice inventory.


If your routers are newer and the results of the show inventory command are accurate, you should be able to easily retrieve your router's proper chassis serial number remotely over the network. However, with older models, you may have to first manually enter the router serial number into the IOS to be able to remotely retrieve it.

For Cisco in particular:

http://www.cisco.com/warp/public/477/SNMP/chassis.shtml
http://www.cisco.com/en/US/docs/ios/12_3t/12_3t4/feature/guide/gtpepudi.html

Other hardware needs to be confirm , if they can do so.
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Broadband over Power Lines Broadband over Power Lines is the technology of transmitting computer data through power lines. This method of connectivity allows the user to have access to the internet without having to rely on additional cables, suc…
Arrow Electronics was searching for a KVM  (Keyboard/Video/Mouse) switch that could display on one single monitor the current status of all units being tested on the rack.
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question