Verifing IOS images

Verifing the IOS image is a smart thing to do. It’s relatively easy for the image to get corrupt, especially if you use TFTP across a WAN link. You should verify the image once you download it from Cisco. That way you don’t send a bad image to a router. I use a free program called HashCalc to verify the image.

When you download IOS from Cisco they provide the MD5 hash so you can verify the image doesn’t get corrupt during the download. Here you can see the MD5 hash.

Once you transfer the image to flash, you should verify it again on the router. Here’s how to do that.

3745RTR#dir
Directory of flash:/

1 -rw- 37576908 Jun 13 2008 09:07:40 -05:00 c3745-advipservicesk9-mz.124-18b.bin

63864832 bytes total (26284032 bytes free)

MAD2#verify /md5 flash:/c3745-advipservicesk9-mz.124-18b.bin
……………………………………………………………………………..
……………………………………………………………………………..
……………………………………………………………………………..
……………………………………………………………………………..
……………………………………………………………………………..
……………………………………………………………………………..
verify /md5 (flash:/c3745-advipservicesk9-mz.124-18b.bin) = 98f47ca4de03a28a7c6988469e99ef8f

3745RTR#

I have also created a spreadsheet so you can paste in values and have it verify the hash values and give you nice visual confirmation. Download it here.

Leave a Reply

Your email address will not be published. Required fields are marked *