这是一篇CCNA基础实验,但知识点非常实用,关系到IOS文件的COPY和恢复,还有配置文件的COPY及恢复。简单但十分重要。高手放开手脚飘过,新手可以做下参考!
实验环境:
Cisco的PT模拟器。有条件的用真设备更好!
实验拓扑:
CCNA入门---备份和恢复IOS以及配置文件_IOS
TFTPServer的设置:
CCNA入门---备份和恢复IOS以及配置文件_CCNA_02
路由器的配置:
Router>en
Router#conf t
Router(config)#interface f0/0
Router(config-if)#ip add 100.1.1.100 255.0.0.0
Router(config-if)#no sh
Router(config-if)#exit
测试一下路由和TFTP的连通性:
CCNA入门---备份和恢复IOS以及配置文件_CCNA_03
OK!以够ping通。
下面,查看一下Flash信息,并把路由的IOS文件上传到TFTP  Server
CCNA入门---备份和恢复IOS以及配置文件_CCNA_04
Router#copy flash: tftp  --flash听文件copyTFTP服务器
Source filename []? c2800nm-advipservicesk9-mz.124-15.T1.bin
----指定源文件名
Address or name of remote host []? 100.1.1.1   ---指定目的IP地址(也就是TFTP的地址)
Destination filename [c2800nm-advipservicesk9-mz.124-15.T1.bin]? 2800.bin    ---目标文件名(也就是新的文件名)
CCNA入门---备份和恢复IOS以及配置文件_备份_05
Copy完成!再到TFTP服务器上查看一下:
 
CCNA入门---备份和恢复IOS以及配置文件_文件_06
 
OK!成功的将IOS文件复制到了TFTP服务器。
从TFTP服务器恢复IOS文件
Router#show flash:    ---查看flash
CCNA入门---备份和恢复IOS以及配置文件_入门_07
红线围起的就是IOS文件名,复制它,呆会要用到。
Router#delete flash:   ---删除flash内容
Delete filename []?c2800nm-advipservicesk9-mz.124-15.T1.bin
-------指定要删除的文件名(就是我们复制的文件名)
Delete flash:/c2800nm-advipservicesk9-mz.124-15.T1.bin? [confirm]
------提示是否确认删除,直接回车确认。
Router#show flash:    ---再次查看一下flash中的内容
CCNA入门---备份和恢复IOS以及配置文件_入门_08
Flash中已没有c2800nm-advipservicesk9-mz.124-15.T1.bin文件了,已成功删除!
Router#copy tftp: flash:    ---TFTP服务器下载IOSflash
Address or name of remote host []? 100.1.1.1  ---指定TFTP地址
Source filename []? 2800.bin    ---源文件名
Destination filename [2800.bin]?    ---指定目标文件名
c2800nm-advipservicesk9-mz.124-15.T1.bin
CCNA入门---备份和恢复IOS以及配置文件_IOS_09
完成注入!
Router#show flash:     ---重新查看flash中的内容
CCNA入门---备份和恢复IOS以及配置文件_CCNA_10
OK!成功注入!
配置文件的备份和恢复:
查看一下配置:
CCNA入门---备份和恢复IOS以及配置文件_文件_11
Router#copy running-config tftp  ---将配置文件copyTFTP
Address or name of remote host []? 100.1.1.1  ---指定目标IP地址
Destination filename [Router-confg]? ccxx   ---指定目标文件名
Writing running-config...!!    --OK!成功复制!
[OK - 573 bytes] 
TFTP服务器看下。
CCNA入门---备份和恢复IOS以及配置文件_备份_12
OK!已经复制过来了!
下面做配置文件的恢复:
先清除掉配置文件。
Router#erase startup-config     ---清除配置文件
Erasing the nvram filesystem will remove all configuration files! Continue? [confirm]
[OK]
Erase of nvram: complete
%SYS-7-NV_BLOCK_INIT: Initialized the geometry of nvram
Router#reload    ---重启设备
Proceed with reload? [confirm]   ---提示是否确认重启,直接回车
Router#copy tftp: running-config  ---TFTP复制文件到内存
Address or name of remote host []? 100.1.1.1 ---指定源IP地址
Source filename []? ccxx  ---指定源文件名
Destination filename [running-config]?  ---指定目标文件名,直接回车
CCNA入门---备份和恢复IOS以及配置文件_CCNA_13
OK!成功恢复路由的配置文件!实验完成!