路由器備份、刪除、恢復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#

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章