At some point, it's a good idea to conduct a router inventory to determine which routers you have as well as their models, RAM, Flash, IOS versions, and serial numbers. I mention the serial number specifically because you need it to both track your routers and to register for a Cisco SMARTnet service contract.
- Cisco Switch Serial Number Command
- Cisco Switch Serial Number Location
- Cisco Switch Stack Serial Numbers
- Cisco Serial Number Lookup Tool
How do you collect these numbers without physically going to each and every router in your organization? Here's how to determine those serial numbers remotely.
Issues to consider
- The simple steps below will show you the easy way to locate Cisco catalyst switch serial numbers. Cisco Catalyst 6500/6000. In order to find the serial number of port adapters that plug into.
- Three ways to remotely determine your Cisco router's serial number. A newer router in which the output of the serial number from the IOS matches the physical router serial number, that you have.
Number of ports on the switch. Amount of flash memory. Serial number. The management interface that you use is the console connection.
One challenge with determining the serial number of your router is that there are so many different serial numbers — the processor board ID, serial numbers on every interface card, the chassis serial number, and many others.
In some cases, you may even find that none of the serial numbers that you find by connecting to the router actually match the serial number on the sticker on the outside of the router. In addition, the results that you get will vary from router platform to router platform.
On newer routers such as the Cisco 2800 Series and 3800 Series, the serial number on the outside of the router, the processor ID, and the hardware chassis serial number are all the same. Even better, you can access this unique number via Telnet, SSH, or SNMP.
On the other hand, older routers make things more confusing. For example, if you have a Cisco 2500 Series router, you can't find the number on the sticker on the outside of the router by connecting to the device over the network. In fact, I opened up a Cisco TAC case, and they told me this was 'by design.'
One workaround to this issue is to manually enter the physical serial number from the outside of the router into the configuration of the router. That way, you can access it via SNMP.
You can manually set the chassis serial number using the following command:
For more information, check out 'How To Collect Chassis Information (including the Chassis Serial Number) For Routers And Catalyst Switches Using SNMP' on Cisco's Web site.
How do I find the serial numbers?
Here are three options for remotely retrieving serial numbers over the network. These solutions assume that you have a newer router in which the output of the serial number from the IOS matches the physical router serial number, that you have programmed the serial number into the IOS, or that you are comfortable using the serial number that the IOS provides.
Due to the varied number of routers and the varied functionality in the router IOS between versions and router models, I can't guarantee that the following steps will work on your router or in your IOS. While I have searched for a slick, easy method to retrieve router serial numbers across all router models and IOS versions, I haven't come across a solution yet.
Option 1: Telnet or SSH
The easiest way to retrieve the serial numbers from your router is to Telnet or SSH to the router and use the show inventoryCisco Switch Serial Number Command
command. Here's a sample of the output:The chassis hw serial# section designates the serial number that is physically on the router.
Option 2: Use SNMP from the command line
You can retrieve the same chassis hardware serial number from the command line using simple network management protocol (SNMP). I did this in Windows XP by downloading two free utilities, using a text file as my source list of routers, and writing a short windows .bat file to process it for me. (If you have Linux, you should already have the snmp-get command and awk command available.)
To begin, download the Net-SNMP tools so you can use the snmpget command. You can use this tool to get the chassis hw serial# information from a single router with a single command. Here's an example:
The output looks like this:
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:
The output might look something like this:
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.
For more information on the SNMP string I used, check out the Cisco's Unique Device Identifier Retrieval Web page.
Option 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 (freeware for up to five devices) does a fine job of retrieving the serial number of routers and provides a nice inventory. Figure A offers a snapshot of the Kiwi CatTools output.Figure A
In addition, I checked with PacketTrap, and its pt360 Tool Suite will begin supporting this feature in the next release. Perhaps there are other applications out there that you've used before. If so, please share them in the discussion area.
Cisco Switch Serial Number Location
Another thought I had was to write a TCL script to retrieve serial numbers. However, since I'm not a TCL programmer, this probably isn't the best option for me.
Conclusion
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.
Cisco Switch Stack Serial Numbers
Inventorying your routers' serial numbers is an important activity that every network administrator needs to be able to do — both to keep track of what you have and to properly register for support and maintenance from Cisco Systems.
Cisco Serial Number Lookup Tool
Want to learn more about router and switch management? Automatically sign up for our free Cisco Routers and Switches newsletter, delivered each Friday!