Monday, October 29, 2007

Checking the integrity of a copied file.

Question: I have to upload IOS images to tens of Cisco routers and switches for my company these days; sometimes after I upgrade an IOS and reboot the router (switch) the router (switch) boots in ROMMON. I think images are not copied to flash properly in these cases. Is there a way to see if the image is copied correctly to the flash?


Answer: To check the integrity of the file you copied use the MD5 signature.
Issue the following command to get the MD5 key of the copied file and compare it with the MD5 key provided by Cisco.

verify /md5 flash:filename

After you get the MD5 key go to Cisco.com and try to download the same image in Software Downloads part, just before you download the software you will be provided with a table containing some details about the image and in that table you will find the MD5 key of the file.
Compare it with the one you get as a result of verify command, if they are the same your file is copied properly.