Cisco IOS软件中备份和升级
日期:2007-03-29 荐:
备份和升级是两个方向相反的过程。依照通常的约定,备份是指从网络设备向TFTP服务器中复制软件,而升级是指从TFTP服务器向网络设备复制软件。本文通过实验演示对Cisco路由器的IOS软件映像文件进行备份和升级。
首先启动Cisco TFTP Server,并把TFTP server root指定到目录"D:LCCNA LAB\IOS"下,保持其开启状态。
Router#sh flash
System flash directory:
File Length Name/status
1 c2501-d-1,121-8a.mz
[4289668 bytes used, 4098940 available, 8388608 total]
8192K bytes of processor board System flash (Read/Write)
Router#copy flash tftp
Source filename []? c2500-d-1.121-8a.mz
Address or name of remote host []? 172.16.162.58
Destination filename [c2500-d-1.121-8a.mz]? (按回车键确认)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!
4289602 bytes copied m 62.320 secs (69187 bytes/sec)
Router#
Router#copy tftp flash
Address or name of remote host []? 172.16.16258
Source filename []? c2500-d-1.121-8a.mz
Destination filename [c2500-d-1.121-8a.mz]? (按回车键确认)
%Waming:There is a file already existing with this name
Do you want to over write? [confirm] (按回车键确认)
Accessing tftp://172.16.162.58/c2500-d-1.121-8a.mz...
Erase flash: befeor copying?[confirm] (按回车键确认)
Erasing the flash filesystem will remove all files! Continue? [confirm] (按回车键确认)
Erasing.device...eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee...erased
Erase of flash:complete
Loading c2500-d-1.121-8a.mz from 172.16.162.58(via
Ethernet0):!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!
[OK-4289602/8579072bytes]
Verifying checksum,.. OK(OxC766)
4289602 bytes copied in 100.896secs(42896bytes/sec)
Router#reload
Proceed with reload? [confirm] (按回车键确认)
13:41:30: %SYS-5-RELOAD: Reload requested
System Bootstrap, Version 5.2(8a), RELEASE SOFTWARE
Copyright (c) 1986-1995 by cisco Systems
(1)用sh flash命令查看flash中的IOS文件名,以便进行下一步操作。
(2)使用copy flash tftp命令从flash向TFTP服务器备份IOS软件映像,根据提示依次键入源文件名(Flash中的IOS文件名)。TFTP服务器的IP地址(或主机名)以及目标文件名(可用与源文件相同的缺省文件名、如果使用主机名则路由器上必须配置主机表或启用DNS查找功能,使路由器通过主机名查找到TFTP服务器。一系列的"!"表示传输正常进行,文件复制完成后路由器报出文件长度、所用时间和每秒复制字节数的信息,表明备份过程顺利结束。
(3)用copy tftp flash向路由器中升级IOS软件时,与备份时相似需要键入TFTP服务器名、源文件(TFTP服务器上的文件)名、目标文件名 (复制到Flash中的文件名)。
系统提示是否在拷贝之前将Flash中的文件系统删除,按回车键确认后系统再次提示删除操作将把Flash中的所有文件清除,问是否继续,再次按回车键确认删除操作。一系列的"e"表示正在进行删除Flash上文件系统的操作。接下来是文件复制的进程,同样以一系列的"!"来表示,"!"的数目越多表示文件越大。
最后系统对IOS文件进行了校验,并确认传输没有错误,IOS软件升级操作即告完成。
IOS软件升级完成后,需要重新启动路由器,使得新软件进入运行状态。应该注意的是,IOS软件的升级对存放在NVRAM中的启动配置文件并不产生任何影响,路由器的启动配置文件还是原来的文件。
标签: