今天要做的测试是模拟cisco路由器的IOS文件丢失,如何恢复路由器的IOS文件
实验环境:
cisco2611路由器,PC机装上TFTP软件搭建TFTP服务器。
在删除路由器IOS文件之前,要把路由器的IOS文件先备份到TFTP服务器上。
1、首先删除路由器上的flash文件
Router#erase flash:
Erasing the flash filesystem will remove all files! Continue? [confirm]
Erasing device... eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
ee ...erasedee
Erase of flash: complete
Router#dir
Directory of flash:/
No files in directory
16252928 bytes total (16252928 bytes free)
Router#dir nv
Router#dir nvram:
Directory of nvram:/
27 -rw- 508 startup-config
28 ---- 5 private-config
1 -rw- 0 ifIndex-table
29688 bytes total (28099 bytes free)
2、IOS文件删除完成后reload重启一下路由器。
Router#reload
Proceed with reload? [confirm]
00:02:35: %SYS-5-RELOAD: Reload requested
System Bootstrap, Version 12.2(7r) [cmong 7r], RELEASE SOFTWARE (fc1)
Copyright (c) 2002 by cisco Systems, Inc.
C2600 platform with 32768 Kbytes of main memory
device does not contain a valid magic number
boot: cannot open "flash:"
boot: cannot determine first file name on device "flash:"
System Bootstrap, Version 12.2(7r) [cmong 7r], RELEASE SOFTWARE (fc1)
Copyright (c) 2002 by cisco Systems, Inc.
C2600 platform with 32768 Kbytes of main memory
3、到这里,可以看到,路由器启动过程被中断了,因为找不到IOS文件。
device does not contain a valid magic number
boot: cannot open "flash:"
4、现在,该是我们大显身手的时候了,按Ctrl+Break进入rommon模式,
输入set查看路由器的配置情况。
rommon 1 set
PS1=rommon !
BSI=0
RET_2_RTS=