Menu
Any network administrators who work with Cisco devices are more than likely familiar with the show version command. The most common use of this command is to determine which version of the Cisco IOS a device is running. However, the show version command does much more than that—it actually offers several different uses.
Oct 16, 2016 - 'How do I find a Cisco serial number remotely through the command line?' This is one of those frequently asked questions that I see over.
In my opinion, show version is an underrated and underappreciated command. Its name just doesn't adequately explain all of its uses.
This week, I want to take an in-depth look at the many uses of the show version command, offer examples of the command's output on a variety of Cisco devices, and discuss what information you can gather from that output.
Learn the many uses of the show version command
As I mentioned, the show version command does much more than just display the version of the operating system. Here's a laundry list of other statistics that this powerful command can display:
- The version of the IOS operating system
- The version of the ROM bootstrap
- The version of the boot loader
- How someone last powered on the device (In addition to powering on in the usual manner, you can also power on a device with a system reset (i.e., warm reboot) or by a system panic.)
- The time and date the system last started
- The 'uptime' for the system (i.e., how much time has passed since the last power-on)
- The image file that the device last started (i.e., the actual path to the IOS software)
- How much RAM the device has
- The processor board ID, which you can use to determine the version of the device's motherboard
- The number and type of each interface on the device (e.g., Qty 2 Ethernet, Qty 6 Serial, etc.)
- The number of terminal lines on the router if a router has asynchronous serial lines attached
- The amount of nonvolatile RAM (NVRAM), used to hold the SAVED version of the configuration file, also known as the startup-configuration
- The amount and type of Flash on the device (except on a switch), used to hold the operating system when it isn't in use (Think of it as the equivalent to a hard drive on a PC.)
- The configuration register on the device, which is a hexadecimal number used to tell the device what to do when it boots. (Typically, this only changes when you need to bypass the configuration file because of a lost password, but you can also change it for other special cases.)
- The hostname of the device
In addition, the show version command will display specific information on switches:
- The number of Ethernet switching interfaces
- The serial numbers of the device and its power supplies
- The MAC address of the switch
- The revision number of the motherboard
- The model number of the switch
- Whether you've enabled password recovery
On some switches, you can even use this command to return the power supply part number and the motherboard part number. In addition, you can determine whether the switch has the standard or enterprise version of the IOS. (These two IOS types are specific to switches.)
On PIX firewalls, you can use the show versioncommand to display other specific information:
- The MAC addresses for the interfaces
- Which licenses you've enabled for which features (such as failover, 3DES encryption, or number of hosts)
- The activation key for those licenses
- The last time someone modified the configuration file
Working with the show version command's output
Now that we've covered the various uses of the show version command, let's look at some examples of working with its output. We'll look at sample output from two routers, two switches, and a firewall.
Using the show version command on routers
Listing A shows sample output of the show version command on a Cisco 3845 router, and Listing B shows sample output of this command on a Cisco 2511 router. From this output, we can tell that these routers have different types of Flash memory. The 3845 router, the newer one, has 64 MB of ATA System Compact Flash, as shown in this line:
Listing A shows sample output of the show version command on a Cisco 3845 router, and Listing B shows sample output of this command on a Cisco 2511 router. From this output, we can tell that these routers have different types of Flash memory. The 3845 router, the newer one, has 64 MB of ATA System Compact Flash, as shown in this line:
On the 2511 router, the older one, we can see that it has only 16 MB of onboard read-only flash, as shown in this line:
![Cisco show serial number command Cisco show serial number command](/uploads/1/2/5/2/125297417/848470980.jpg)
Using the show version command on switches
Listing C shows sample output of the show version command on a Cisco 2950 switch, and Listing D shows sample output of the show version command on a Cisco 3750 switch. On the Cisco 3750 switch, the output shows the amount of RAM on the switch, but you need to add the two numbers shown in this line:
Listing C shows sample output of the show version command on a Cisco 2950 switch, and Listing D shows sample output of the show version command on a Cisco 3750 switch. On the Cisco 3750 switch, the output shows the amount of RAM on the switch, but you need to add the two numbers shown in this line:
If you add 118784 K and 12280 K, you get 131,064 K—the equivalent of 128 MB.
In addition, on the Cisco 3750 switch, you can use the show version command to display the device's serial number remotely, as shown below. This offers a big benefit when it comes to locating switches for lease replacement or renewing Cisco maintenance contracts on devices by serial number.
Using the show version command on firewalls
Listing E offers an example of this command's output on a PIX 501 firewall. The output is very different from the routers and the switches. For example, you can see the list of licenses that this firewall has enabled and disabled, as shown below:
Listing E offers an example of this command's output on a PIX 501 firewall. The output is very different from the routers and the switches. For example, you can see the list of licenses that this firewall has enabled and disabled, as shown below:
In addition, this output tells us that there's limited throughput on this firewall and that there can only be 10 hosts on the inside of the interface.
These are just some examples of the many uses of the show version command. It's important to remember that this command's output varies from platform to platform. So, the next time someone asks you what the show version command does, you can demonstrate how this command does a lot more than what its name suggests.
Miss a column?
Check out the Cisco Routers and Switches Archive, and catch up on David Davis' most recent columns.
Want to learn more about router and switch management? Automatically sign up for our free Cisco Routers and Switches newsletter, delivered each Friday!
David Davis has worked in the IT industry for 12 years and holds several certifications, including CCIE, MCSE+I, CISSP, CCNA, CCDA, and CCNP. He currently manages a group of systems/network administrators for a privately owned retail company and performs networking/systems consulting on a part-time basis.
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.
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
Cisco Serial Number Lookup
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 inventorycommand. Here's a sample of the output:The chassis hw serial# Fender musicmaster serial number. 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:
Intel(r) ich10 family usb universal host controller - 3a64 driver. 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.
![Serial Serial](/uploads/1/2/5/2/125297417/231008105.jpg)
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.
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.
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 Ios Serial Number Command
Want to learn more about router and switch management? Automatically sign up for our free Cisco Routers and Switches newsletter, delivered each Friday!