Image Verification
The Image Verification feature allows users to automatically verify the integrity of Cisco IOS images. Thus, users can be sure that the image is protected from accidental corruption, which can occur at any time during transit, starting from the moment the files are generated by Cisco until they reach the user. The efficiency of Cisco IOS routers is also improved because the routers can now automatically detect when the integrity of an image is accidentally corrupted as a result of transmission errors or disk corruption.
- Finding Feature Information
- Restrictions for Image Verification
- Information About Image Verification
- How to Use Image Verification
- Configuration Examples for Image Verification
- Additional References
- Feature Information for Image Verification
Finding Feature Information
Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table.
Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.
Restrictions for Image Verification
Cisco IOS Release 12.2(18)S and 12.0(26)S Only
Image Verification is applied to and attempted on any file; however, if the file is not an image file, image verification will not occur and you will see the following error, “SIGNATURE-NOT-FOUND.”
Cisco IOS Release 12.3(4)T Only
Image Verification is applied only to image files. If any other file type is copied or verified, you will not receive a warning that image verification did occur, and the command (copy or verify) will silently succeed.
Note | The Image Verification feature can only be used to check the integrity of a Cisco IOS software image that is stored on a Cisco IOS device. It cannot be used to check the integrity of an image on a remote file system or an image running in memory. |
Information About Image Verification
How Image Verification Works
Because a production image undergoes a sequence of transfers before it is copied into the memory of a router, the integrity of the image is at risk of accidental corruption every time a transfer occurs. When downloading an image from Cisco.com, a user can run a message-digest5 (MD5) hash on the downloaded image and verify that the MD5 digest posted on Cisco.com is the same as the MD5 digest that is computed on the user’s server. However, many users choose not to run an MD5 digest because it is 128-bits long and the verification is manual. Image verification using SHA-512 digital signature allows the user to automatically validate the integrity of all downloaded images, thereby, significantly reducing user interaction.
How to Use Image Verification
- Globally Verifying the Integrity of an Image
- Verifying the Integrity of an Image That Is About to Be Copied
- Verifying the Integrity of an Image That Is About to Be Reloaded
Globally Verifying the Integrity of an Image
The file verify auto command enables image verification globally; that is, all images that are to be copied (via the copy command) or reloaded (via the reload command) are automatically verified. Although both the copy and reload commands have a /verify keyword that enables image verification, you must issue the keyword each time you want to copy or reload an image. The file verify auto command enables image verification by default, so you no longer have to specify image verification multiple times.
If you have enabled image verification by default but prefer to disable verification for a specific image copy or reload, the /noverify keyword, along with either the copy or the reload command, will override the file verify auto command.
Use this task to enable automatic image verification.
1.
enable
2.
configure
terminal
3.
file
verify
auto
4.
exit
DETAILED STEPS
What to Do Next
After issuing the file verify auto command, you do not have to issue the /verify keyword with the copy or the reload command because each image that is copied or reloaded will be automatically verified.
Verifying the Integrity of an Image That Is About to Be Copied
When issuing the copy command, you can verify the integrity of the copied file by entering the /verify keyword. If the integrity check fails, the copied file will be deleted. If the file that is about to be copied does not have an embedded hash (an old image), you will be prompted whether or not to continue with the copying process. If you choose to continue, the file will be successfully copied; if you choose not to continue, the copied file will be deleted.
Without the /verify keyword, the copy command could copy a file that is not valid. Thus, after the copy command has been successfully executed, you can issue the verify command at any time to check the integrity of the files that are in the storage of the router.
Use this task to verify the integrity of an image before it is copied onto a router.
1.
enable
2.
copy
[/erase] [/verify| /noverify] source-url destination-url
3.
verify
[/md5 [md5-value]] filesystem: file-url]
DETAILED STEPS
Verifying the Integrity of an Image That Is About to Be Reloaded
By issuing the reload command with the /verify keyword, the image that is about to be loaded onto your system will be checked for integrity. If the /verify keyword is specified, image verification will occur before the system initiates the reboot. Thus, if verification fails, the image will not be loaded.
Note | Because different platforms obtain the file that is to be loaded in various ways, the file specified in BOOTVAR will be verified. If a file is not specified, the first file on each subsystem will be verified. On certain platforms, because of variables such as the configuration register, the file that is verified may not be the file that is loaded. |
Use this task to verify the integrity of an image before it is reloaded onto a router.
1.
enable
2.
reload
[[warm] [/verify| /noverify]
text
| [warm] [/verify| /noverify] in [hh : mm [text] | [warm] [/verify| /noverify] at hh : mm [month day | day month] [text] |
[warm] [/verify| /noverify] cancel]
DETAILED STEPS
Command or Action | Purpose | |||
---|---|---|---|---|
Step 1 |
enable
Example: Router> enable |
Enables privileged EXEC mode.
| ||
Step 2 |
reload
[[warm] [/verify| /noverify]
text
| [warm] [/verify| /noverify] in [hh : mm [text] | [warm] [/verify| /noverify] at hh : mm [month day | day month] [text] |
[warm] [/verify| /noverify] cancel]
Example: Router# reload /verify |
Reloads the operating system.
|
Configuration Examples for Image Verification
- Global Image Verification Example
- Image Verification via the copy Command Example
- Image Verification via the reload Command Example
- Verify Command Sample Output Example
Global Image Verification Example
The following example shows how to enable automatic image verification. After enabling this command, image verification will automatically occur for all images that are either copied (via the copy command) or reloaded (via the reload command).
Device(config)# file verify auto
Image Verification via the copy Command Example
The following example shows how to specify image verification before copying an image:
Device# copy /verify tftp://10.1.1.1/jdoe/c7200-js-mz disk0: Destination filename [c7200-js-mz]? Accessing tftp://10.1.1.1/jdoe/c7200-js-mz... Loading jdoe/c7200-js-mz from 10.1.1.1 (via FastEthernet0/0):!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! [OK - 19879944 bytes] 19879944 bytes copied in 108.632 secs (183003 bytes/sec) Verifying file integrity of disk0:/c7200-js-mz .................................................................................. .................................................................................. .................................................................................. .........................Done! Embedded Hash MD5 :CFA258948C4ECE52085DCF428A426DCD Computed Hash MD5 :CFA258948C4ECE52085DCF428A426DCD CCO Hash MD5 :44A7B9BDDD9638128C35528466318183 Signature Verified
Image Verification via the reload Command Example
The following example shows how to specify image verification before reloading an image onto the Device:
Device# reload /verify Verifying file integrity of bootflash:c7200-kboot-mz.121-8a.E %ERROR:Signature not found in file bootflash:c7200-kboot-mz.121-8a.E. Signature not present. Proceed with verify? [confirm] Verifying file disk0:c7200-js-mz .......................................................................... ............................................................Done! Embedded Hash MD5 :CFA258948C4ECE52085DCF428A426DCD Computed Hash MD5 :CFA258948C4ECE52085DCF428A426DCD CCO Hash MD5 :44A7B9BDDD9638128C35528466318183 Signature Verified Proceed with reload? [confirm]n
Verify Command Sample Output Example
The following example shows how to specify image verification via the verify command:
Device# verify disk0:c7200-js-mz %Filesystem does not support verify operations Verifying file integrity of disk0:c7200-js-mz....................................... ...............................................................................Done! Embedded Hash MD5 :CFA258948C4ECE52085DCF428A426DCD Computed Hash MD5 :CFA258948C4ECE52085DCF428A426DCD CCO Hash MD5 :44A7B9BDDD9638128C35528466318183
Signature Verified
Additional References
Related Documents
Related Topic |
Document Title |
---|---|
Configuration tasks and information for loading, maintaining, and rebooting system images |
Using the Cisco IOS Integrated File System feature module in the Cisco IOS Configuration Fundamentals and Network Management Configuration Guide , Release 12.4T. |
Additional commands for loading, maintaining, and rebooting system images |
Cisco IOS Configuration Fundamentals Command Reference , Release 12.4T |
Standards
Standard |
Title |
---|---|
None |
-- |
MIBs
MIB |
MIBs Link |
---|---|
|
To locate and download MIBs for selected platforms, Cisco IOS releases, and feature sets, use Cisco MIB Locator found at the following URL: |
RFCs
RFC |
Title |
---|---|
None |
-- |
Technical Assistance
Description |
Link |
---|---|
The Cisco Support website provides extensive online resources, including documentation and tools for troubleshooting and resolving technical issues with Cisco products and technologies. To receive security and technical information about your products, you can subscribe to various services, such as the Product Alert Tool (accessed from Field Notices), the Cisco Technical Services Newsletter, and Really Simple Syndication (RSS) Feeds. Access to most tools on the Cisco Support website requires a Cisco.com user ID and password. |
Feature Information for Image Verification
The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature.
Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.
Feature Name |
Releases |
Feature Information |
---|---|---|
Image Verification |
Cisco IOS 12.2(25)S Cisco IOS 12.0(26)S Cisco IOS 12.3(4)T |
The Image Verification feature allows users to automatically verify the integrity of Cisco IOS images. The following commands were introduced or modified: copy, file verify auto, reload, verify. |