25系列路由器
备份,将ios从flash保存到tftp中
1、安装TFTP软件,并打开,在试验阶段保持启动状态
2、查看ios的名字并记录下来:
show flash/  show version/ dir flash:
3、查看tftp的网络地址,一般为主机的网络地址
4、
show进入特权模式:
Router#copy flash tftp
Source filename []? aliang8.bin
Address or name of remote host []? 192.168.200.2
Destination filename [aliang8.bin]?!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!
7657768 bytes copied in 143.404 secs (53550 bytes/sec)

恢复,将ios从tftp中恢复到flash中
1、查看保存在tftp中ios的名字并记录下来
2、给路由器接口配置ip地址,该地址和tftp的地址在同一个网络
ip address 192.168.200.200
3、查看flash的性质
Router#show flash
System flash directory:
File  Length   Name/status
  1   7657768  /aliang8.bin
[7657832 bytes used, 730776 available, 8388608 total]
8192K bytes of processor board System flash (Read ONLY)
因为flash为只读模式,所以要更改寄存器的值。
3、修改寄存器的值
在全局模式下
config-register 0x2101  //将路由器的启动顺序改为从ROM启动
4、重启路由器
在特权模式下:
reload                  //此时是启动了在ROM中的mini ios ,此时flash为可读写模式
5、再次查看flash:
Router(boot)#show flash
System flash directory:
File  Length   Name/status
  1   7657768  /aliang8.bin
[7657832 bytes used, 730776 available, 8388608 total]
8192K bytes of processor board System flash (Read/Write)
此时的flash已经变为可读写模式
6、在该启动模式的特权模式下:
Router(boot)#copy tftp flash
System flash directory:
File  Length   Name/status
  1   7657768  /aliang8.bin
[7657832 bytes used, 730776 available, 8388608 total]
Address or name of remote host [255.255.255.255]? 192.168.200.2
Source file name? aliang8.bin
Destination file name [aliang8.bin]?
Accessing file 'aliang8.bin' on 192.168.200.2...
Loading aliang8.bin from 192.168.200.2 (via Ethernet0): ! [OK]
Erase flash device before writing? [confirm]
Flash contains files. Are you sure you want to erase? [confirm]
Copy 'aliang8.bin' from server                                    //aliang8.bin为ios的名字
  as 'aliang8.bin' into Flash WITH erase? [yes/no]y
Erasing device... eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee ...erased
Loading aliang8.bin from 192.168.200.2 (via Ethernet0): !!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!
[OK - 7657768/8388608 bytes]
Verifying checksum...  OK (0x8E6B)
Flash copy took 0:03:44 [hh:mm:ss]
Router(boot)#
7、进入全局模式,将寄存器的值修改回默认值
Router(boot)(config)#config-register 0x2102
8、重启路由器:
Router(boot)#reload

PS:
1、在26系统的路由器中,flash默认是可读写模式,所以不必修改寄存器值直接可以将tftp中的ios复制到tftp中