路由器备份、删除、恢复iOS镜像

在这里插入图片描述
//从服务器恢复iOS镜像,路由器端口必须是以太网的最小端口f0/0

Router#show flash //查看iOS镜像名

System flash directory:
File Length Name/status
3 50938004 c2800nm-advipservicesk9-mz.124-15.T1.bin //路由器iOS镜像
2 28282 sigdef-category.xml
1 227537 sigdef-default.xml
[51193823 bytes used, 12822561 available, 64016384 total]
63488K bytes of processor board System flash (Read/Write)

Router#copy running-config flash //保存配置
Destination filename [running-config]?
Building configuration…
[OK]
Router#copy flash tftp // 将镜像备份至TFTP
Source filename []? c2800nm-advipservicesk9-mz.124-15.T1.bin //镜像名
Address or name of remote host []? 192.168.1.2 //TFTP服务器地址
Destination filename [c2800nm-advipservicesk9-mz.124-15.T1.bin]? R1 // iOS镜像以R1为名保存在服务器

Writing c2800nm-advipservicesk9-mz.124-15.T1.bin…!!!
[OK - 50938004 bytes]

50938004 bytes copied in 1.902 secs (1941831 bytes/sec)
Router#copy run tftp //将配置文件备份至TFTP
Address or name of remote host []? 192.168.1.2
Destination filename [Router-confg]? //配置文件以Router-confg为名保存在服务器

Writing running-config…!!
[OK - 631 bytes]

631 bytes copied in 0.001 secs (631000 bytes/sec)
Router#delete flash //删除iOS镜像
Delete filename []?c2800nm-advipservicesk9-mz.124-15.T1.bin //镜像名
Delete flash:/c2800nm-advipservicesk9-mz.124-15.T1.bin? [confirm]
Router#reload //重启
System configuration has been modified. Save? [yes/no]:no // 不保存
Proceed with reload? [confirm]
System Bootstrap, Version 12.1(3r)T2, RELEASE SOFTWARE (fc1)
Copyright © 2000 by cisco Systems, Inc.
Initializing memory for ECC

C2800 processor with 524288 Kbytes of main memory
Main memory is configured to 64 bit mode with ECC enabled

Readonly ROMMON initialized

Boot process failed…

The system is unable to boot automatically. The BOOT
environment variable needs to be set to a bootable
image.
//iOS镜像已删除,重启路由器无法从flash加载镜像文件将进入rommon模式
rommon 1 > IP_ADDRESS=192.168.1.3 //输入f0/0端口ip 不是之前设置的网关地址 这个地址另取
rommon 2 > IP_SUBNET_MASK=255.255.255.0
rommon 3 > DEFAULT_GATEWAY=192.168.1.1
rommon 4 > TFTP_SERVER=192.168.1.2 //服务器地址
rommon 5 > TFTP_FILE=R1 //要从服务器恢复的镜像名字
rommon 6 > tftpdnld //回车确认
//以上命令除tftpdnld都得大写

      IP_ADDRESS: 192.168.1.3
  IP_SUBNET_MASK: 255.255.255.0
 DEFAULT_GATEWAY: 192.168.1.1
     TFTP_SERVER: 192.168.1.2
       TFTP_FILE: R1

Invoke this command for disaster recovery only.
WARNING: all existing data in all partitions on flash will be lost!

Do you wish to continue? y/n: [n]: y //输入正确将会出现以上地址信息
rommon 7 >reset //重启
Would you like to enter the initial configuration dialog? [yes/no]: no

Press RETURN to get started!

Router>en
Router#
Router#

发布了15 篇原创文章 · 获赞 6 · 访问量 969

猜你喜欢

转载自blog.csdn.net/weixin_44369870/article/details/104828689