博威---云架构决胜云计算

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 2635|回复: 1

ios误删除后恢复(tftp)

[复制链接]
发表于 2008-1-12 06:47:44 | 显示全部楼层 |阅读模式
ios误删除后恢复(tftp)

本来想保存配置,没想到cisco早先也是不那么厚道啊,居然暗中下套

r7#copy startup-config x.cfg
Destination filename [x.cfg]?
Erase flash: before copying? [confirm]n
Verifying checksum... OK (0x1376)
1248 bytes copied in 0.232 secs

r7#dir
Directory of flash:/
    1 -rw-     4467540              <no date> c2600-c-mz.121-9.bin
    2 -rw-        1248                 <no date> x.cfg
8388608 bytes total (3919692 bytes free)
注意看红色字体,这是我恢复ios后的保存startup-config的步骤。因为当时没注意,直接回车了,直接造成ios被删除,正确的方法是 输入"n”,切记啊!!!

好了,恢复开始,在net130找了个12.1的ios

首先将路由器eth0口与笔记本用交叉线连接,通过concle口登录路由器,设置tftp的环境
rommon 1 >IP_ADDRESS=192.168.1.2      //路由器默认第一个口的ip
rommon 2 >IP_SUBNET_MASK=255.255.255.0
rommon 3 >DEFAULT_GATEWAY=192.168.1.1    //注意,虽然直连,也要设网关,否则tftp无法成功
rommon 4 >TFTP_SERVER=192.168.1.104      //笔记本ip
rommon 5 >TFTP_FILE=c2600-c-mz.121-9.bin
设置tftp完环境后,可以用set命令在看一下
rommon 6 > set
PS1=rommon ! >
RET_2_RTS=
IP_ADDRESS=192.168.1.2
IP_SUBNET_MASK=255.255.255.0
DEFAULT_GATEWAY=192.168.1.1
TFTP_SERVER=192.168.1.104
TFTP_FILE=c2600-c-mz.121-9.bin
核对无误后,开始tftp
rommon 7 > tftpdnld

          IP_ADDRESS: 192.168.1.2
      IP_SUBNET_MASK: 255.255.255.0
     DEFAULT_GATEWAY: 192.168.1.1
         TFTP_SERVER: 192.168.1.104
           TFTP_FILE: c2600-c-mz.121-9.bin
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
Receiving c2600-c-mz.121-9.bin from 192.168.1.104
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
File reception completed.
Copying file c2600-c-mz.121-9.bin to flash.
Erasing flash at 0x607c0000
program flash location 0x60120000

路由器下载ios完毕,设置寄存器的值
rommon 28 > confreg
      Configuration Summary
enabled are:
load rom after netboot fails
console baud: 9600
boot: image specified by the boot system commands
      or default to: cisco2-C2600
do you wish to change the configuration? y/n [n]: y
enable "diagnostic mode"? y/n [n]: n
enable "use net in IP bcast address"? y/n [n]: n
disable "load rom after netboot fails"? y/n [n]: n
enable "use all zero broadcast"? y/n [n]: n
enable "break/abort has effect"? y/n [n]: n
enable "ignore system config info"? y/n [n]: n
change console baud rate? y/n [n]: n
change the boot characteristics? y/n [n]: y
enter to boot:
0 = ROM Monitor
1 = the boot helper image
2-15 = boot system
    [2]:2
    Configuration Summary
enabled are:
load rom after netboot fails
console baud: 9600
boot: image specified by the boot system commands
      or default to: cisco2-C2600
do you wish to change the configuration? y/n [n]:n
rommon 28 > reset
发表于 2008-1-12 09:36:30 | 显示全部楼层
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|boway Inc. ( 冀ICP备10011147号 )

GMT+8, 2024-11-28 01:49 , Processed in 0.085272 second(s), 16 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表