最新消息:阿啰哈,本人90后,目前单身,欢迎妹子们来撩!.(。→‿←。) 微信:frank01991

校验思科IOS文件的完整性

Cisco 林志斌 1011浏览

The verify command only performs a check on the integrity of the file after it has been saved in the file system. It is possible for a corrupt image to be transferred to the router and saved in the file system without detection.
To verify that a Cisco IOS software image was not corrupted while it was transfered to the router, copy the image from where it is stored on your router to a Unix server. Also copy the same image from CCO (Cisco.com) to the same Unix server. (The name may need to be modified if you try to save the image in the same directory as the image that you copied from the router.) Then run a Unix diff command on the two Cisco IOS software images. If there is no difference then the image stored on the router has not been corrupted.

路由器示例(无论是备份、还原还是升级IOS,都建议使用此命令校验一下IOS在传输过程中是否损坏了):
SH-VPN#verify flash:c2800nmc-advipservicesk9-mz.151-4.M.bin
.....Done!.....
Embedded Hash   MD5 : 9D655B85ADF994521F4D6FAFCB4D166C
Computed Hash   MD5 : 9D655B85ADF994521F4D6FAFCB4D166C
CCO Hash        MD5 : CA19514550BD2CF5BD467851B8DFB5F7

交换机示例:
Switch#verify /md5 flash:c2960-lanbasek9-mz.150-2.SE5/c2960-lanbasek9-mz.150-2.SE5.bin
................................................Done!
verify /md5 (flash:c2960-lanbasek9-mz.150-2.SE5/c2960-lanbasek9-mz.150-2.SE5.bin) = 00eaf26bfc7ffe0911fa71fb9525a2bf

在Ubuntu系统中使用md5sum校验备份下来的IOS是否完整:
[email protected]:~/tftp$ md5sum ./*.bin
00eaf26bfc7ffe0911fa71fb9525a2bf  ./c2960-lanbasek9-mz.150-2.SE5.bin

转载请注明:林志斌 » 校验思科IOS文件的完整性

发表评论
取消评论
表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址