1.7. 以另一个IOS镜像文件启动
提问:使用另外的IOS镜像启动
回答:
Router1(config)#boot system flash:c3620-jk9o3s-mz.122-7a.bin
Router1(config)#boot system flash:c3620-jos56i-l.120-11.bin
Router1(config)#boot system slot0:c3620-ik9s-mz.122-13.bin
Router1(config)#boot system rom 注释:
当路由器中有超过一个IOS镜像,则要指定用来启动的IOS镜像
boot system命令的顺序非常重要,如果使用新的IOS,建议先 Router1(config)#no boot system取消所有的boot system
从IOS 12.3(4)T 后思科引入了boot markers的概念,所有的boot systme命令都会放在boot markers之间
Router1#show running-config | include ^boot boot-start-marker
boot system slot0:c3745-ipbasek9-mz.124-6.T.bin
boot system slot0:c3745-ipbasek9-mz.124-7.bin
boot system flash: boot-end-marker
1.8. 通过网络启动
提问:IOS太大本地Flash无法保存,使用保存在网络上的IOS启动
回答:
Router1(config)#boot system tftp c2500-io-l.122-7a.bin 172.25.1.1
Router1(config)#boot system flash 注释:
从tftp启动可以作为从路由器IOS镜像启动失败的备份
1.9. 拷贝IOS镜像文件到服务器
提问:保存一份IOS到TFTP服务器作为备份
回答:
Router1#copy flash:c2600-ik9o3s-mz.122-12a.bin tftp
Address or name of remote host []? 172.25.1.1
Destination filename [c2600-ik9o3s-mz.122-12a.bin]? <enter>
!!!!!!
11135588 bytes copied in 52.588 secs (211752 bytes/sec) 注释:
强烈推荐在将IOS镜像上传到TFTP服务器后,去掉文件的可写属性
1.10. 通过控制台口拷贝IOS镜像文件
提问:通过控制台口和AUX端口来加载IOS
回答:
Router1#copy xmodem: slot1:
Proceed? [confirm] <enter>
Destination filename [ ]? c3620-ik9s-mz.122-12a.bin
Erase slot1: before copying? [confirm] <enter>
Use crc block checksumming? [confirm] <enter>
Max Retry Count [10]: <enter>
Perform image validation checks? [confirm] <enter>
Xmodem download using crc checksumming with image validation
Continue? [confirm] <enter>
Ready to receive file...........CC <start xmodem file transfer here>
4294967295 bytes copied in 1450.848 secs (1271445669961 bytes/sec)
注释:
思科建议使用AUX口进行此步骤,因为AUX口支持硬件流控。为了提高拷贝速度,建议提前设置端口速度为115200来提高传输速度
Router1(config)#line aux 0
Router1(config-line)#speed 115200
可用verifyslot1:c3620-ik9s-mz.122-12a.bin来校验传输的文件
1.11. 删除Flash中的文件
提问:删除Flash中的文件
回答:
删除整个flash
Router1#erase slot1:
Erasing the slot1 filesystem will remove all files! Continue? [confirm] <enter>
Erasing device... eeeeeeeeeeee ...erased
Erase of slot1: complete
或者删除单个文件
Router1#delete slot1:c3620-ik9s-mz.122-13.bin
Delete filename [c3620-ik9s-mz.122-13.bin]? <enter>
Delete slot1:c3620-ik9s-mz.122-13.bin? [confirm] <enter> 注释:
并不是所有的路由器都支持erase命令,不同的文件系统有不同的删除文件方法
Command
Filesystem
Description
Delete
All
Marks the file as deleted, but does not permanently remove it from flash
Squeeze
A
Permanently removes all files that have been marked as deleted
Format
A & C
Erases the entire flash device
Verify
All
Verifies that the IOS file's checksum matches the value encoded in the image
Undelete
A & B
Recovers deleted files
Erase
A & B
Erases the entire flash device 1.12. 对Flash进行分区
提问:对Flash进行分区
回答:
Router1(config)#partition slot1: 2 8 8 注释: