|

- 社区积分
- 127
- 技术积分
- 1220
- 阅读权限
- 40
- 注册时间
- 2007-7-21
论坛徽章 1 |
楼主
发表于 2007-8-19 15:22
| 只看该作者
(ios)cisco 2600/2500ios灾难恢复实战
也许大家感觉这是件经常不会发生的事,不过有的时候真的会出现。所以请大家注意在备份配置的时候别忘了
把IOS也顺手备份一下。以保万一。
-----------------
cisco 2600开机后出现如下画面
System Bootstrap, Version 11.3(2)XA4, RELEASE SOFTWARE (fc1)
Copyright (c) 1999 by cisco Systems, Inc.
TAC:Home:SW:IOS:Specials for info
C2600 platform with 32768 Kbytes of main memory
看好这几句系统提示!!!!
device does not contain a valid magic number
boot: cannot open "flash:"
boot: cannot determine first file name on device "flash:"
System Bootstrap, Version 11.3(2)XA4, RELEASE SOFTWARE (fc1)
Copyright (c) 1999 by cisco Systems, Inc.
TAC:Home:SW:IOS:Specials for info
C2600 platform with 32768 Kbytes of main memory
device does not contain a valid magic number
boot: cannot open "flash:"
boot: cannot determine first file name on device "flash:"
System Bootstrap, Version 11.3(2)XA4, RELEASE SOFTWARE (fc1)
Copyright (c) 1999 by cisco Systems, Inc.
TAC:Home:SW:IOS:Specials for info
C2600 platform with 32768 Kbytes of main memory
rommon 1 >
每次重起开机都会自动直接进入了rommon模式
rommon 2 > i ---〉初始化路由器
System Bootstrap, Version 11.3(2)XA4, RELEASE SOFTWARE (fc1)
Copyright (c) 1999 by cisco Systems, Inc.
TAC:Home:SW:IOS:Specials for info
C2600 platform with 32768 Kbytes of main memory
device does not contain a valid magic number
boot: cannot open "flash:"
boot: cannot determine first file name on device "flash:"
System Bootstrap, Version 11.3(2)XA4, RELEASE SOFTWARE (fc1)
Copyright (c) 1999 by cisco Systems, Inc.
TAC:Home:SW:IOS:Specials for info
C2600 platform with 32768 Kbytes of main memory
device does not contain a valid magic number
boot: cannot open "flash:"
boot: cannot determine first file name on device "flash:"
System Bootstrap, Version 11.3(2)XA4, RELEASE SOFTWARE (fc1)
Copyright (c) 1999 by cisco Systems, Inc.
TAC:Home:SW:IOS:Specials for info
C2600 platform with 32768 Kbytes of main memory
rommon 1 > ---〉还是失败
如果不知道这个路由器以前的版本可以在rommon 1 > 下 输入tftpdnld 就会看见具体的IOS版本信息!!
在2600上试过。
哎!!没办法只能重新灌入IOS 幸好网上有这个版本的IOS 万幸!!!重新灌入IOS有两种方法 1 TFTP
2 XMODEM (这不是指用moderm升级.你可以在rommon 1 > 打个 ? 就会看见 最后一个命令是xmodem)
用第2中方法实在是太慢,所以选择第1种方法来灌入。首先 作好准备工作,在PC机装一个TFTP SERVER 然后用一根交叉线连到
路由器的第一个以太口。
*********注意要安装的ios要和你的tftp在一个目录下面 *****************
继续
在 rommon 状态下输入:(注意大小写)
rommon 1 >IP_ADDRESS=10.0.0.57(路由器的ip地址)
rommon 2 >IP_SUBNET_MASK=255.255.255.0(路由器的掩码)
rommon 3 >DEFAULT_GATEWAY=10.0.0.55(网关,是pc机的ip地址)
rommon 4 >TFTP_SERVER=10.0.0.55(是pc机的ip地址)
rommon 5 >TFTP_FILE=c2600-i-mz.120-7.T.bin(上传文件的名称)
rommon 6 >sync(保存)
rommon 7 >set(查看)
rommon 8 >(传送文件)出现提示选择y
pc机的设置:
ip地址 10.0.0.55
掩码 255.255.255.0
网关 10.0.0.57
rommon 24 > tftpdnld
IP_ADDRESS: 10.0.0.57
IP_SUBNET_MASK: 255.255.255.0
DEFAULT_GATEWAY: 10.0.0.55
TFTP_SERVER: 10.0.0.55
TFTP_FILE: c2600-c-mz.122-4.T1.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.122-4.T1.bin from 192.168.0.2 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!
File reception completed.
Copying file c2600-c-mz.122-4.T1.bin to flash.
Erasing flash at 0x607c0000
program flash location 0x60520000
rommon 25 >
rommon 25 > i ---〉继续初始化(用超级终端的说,输出可能有些不全)
System Bootstrap, Version 11.3(2)XA4, RELEASE SOFTWARE (fc1)
Copyright (c) 1999 by cisco Systems, Inc.
TAC:Home:SW:IOS:Specials for info
C2600 platform with 32768 Kbytes of main memory
program load complete, entry point: 0x80008000, size: 0x52a07c
Self decompressing the image : ################################################]
Smart Init is enabled
smart init is sizing iomem
ID MEMORY_REQ TYPE
000092 0X000B9D00 C2600 Dual Ethe
000025 0X00033480 Eight port Async/Sync
rommon 1 > conf?
monitor:
0X000F3BB0 public buffer pools
rommon 2 > ?
alias
0X00211000 public particle pools
bo
TOTAL: 0X003F1D30n external process
If any of the above Memory Requirements are set/show/clear the breakpoin
"UNKNOWN", you may be using an unsupported
confreg configuration
configuration or there is a software problem and
cont continue e
system operation may be compromised.
Rounded IOMEM up to: 4Mb. display the context
Using 12 percent iomem. [4Mb/32Mb]
Restricted Rights Legendnts of cookie PROM in hex
Use, duplication, or disclosure by the Government is list the device table
Software clause at DFARS sec. 252.227-7013.
history monit
cisco Systems, Inc.
170 West Tasman Drivenformation
San Jose, California 95134-1706epeat a monitor command
Cisco Internetwork Operating System Softwarestem reset
s
IOS (tm) C2600 Software (C2600-C-M), Version 12.2(4)T1, RELEASE SOFTWARE (fc1)
stack produce a stack trace
TAC Support: http://ww
M860 processor: part number 0, mask 49mmon 3 > confreg ?
Bridging software.
usa
SuperLAT software (copyright 1990 by Meridian Technology Corp).
monitor: command "
X.25 software, Version 3.0.0.und
rommon 5
TN3270 Emulation software.
You must
2 Ethernet/IEEE 802.3 interface(s)g to take effect
2 Serial(sync/async) network interface(s)rommon 6 > reset
00:00:07: %LINK-3-UPDOWN: Interface Serial1/0, changed state to down
Copyright (c) 1999 by cisco Sys
00:00:07: %LINK-3-UPDOWN: Interface Serial1/1, changed state to downpecials for info
C2600 platform wit
00:00:07: %LINK-3-UPDOWN: Interface Serial1/2, changed state to down
rommon 1 >
rommon 1 > ?
alias
00:00:07: %LINK-3-UPDOWN: Interface Serial1/3, changed state to down
boot boot up an external process
00:00:07: %LINK-3-UPDOWN: Interface Serial1/4, changed state to downet/show/clear the breakpoint
00:00:08: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/3, changed stn
sync write monitor environment to NVRAM
00:00:08: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed stnnfo from last system return
00:00:08: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/1, changed stn
unalias unset an alias
unset
00:00:08: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/2, changed std
xmodem x/ymodem image download
00:00:10: %LINK-5-CHANGED: Interface Serial0/1, changed state to administrativen of main memory
device does not
00:00:10: %LINK-5-CHANGED: Interface Serial0/2, changed state to administrativennnot open "flash:"
boot: cannot determine first file n
00:00:10: %LINK-5-CHANGED: Interface Serial0/3, changed state to administrativenSystem Bootstrap, Version 11.3(2)XA4, RELEASE SOFTWARE (fc1)
00:00:10: %LINK-5-CHANGED: Interface Serial1/0, changed state to administrativen.
TAC:Home:SW:IOS:Specials for info
C2600 platform wit
User Access Verificationory
router> 大功告成!!!可以抽根烟了!!
下面在给大家发个cisco25系列路由器的口令恢复和IOS升级 虽然cisco25系列的路由器已经不常用了,不过一般的小型培训中心还是在使用。
我师傅让我做实验用的就是cisco的2501 哈哈哈哈!!!!
开机ena后要求password.... 没有
kouchengzhu>
kouchengzhu>ena
Password:
Password:
Password:
% Bad secrets
重开电源后 按ctrl-break *进入mini ios
HGXYATM01>
System Bootstrap, Version 5.2(8a), RELEASE SOFTWARE
Copyright (c) 1986-1995 by cisco Systems
2500 processor with 8192 Kbytes of main memory
Abort at 0x1050B3C (PC)
>? *mini下的帮助提示
Toggle cache state
B [filename] [TFTP Server IP address | TFTP Server Name]
Load and execute system image from ROM or from TFTP server
C [address] Continue execution [optional address]
D /S M L V Deposit value V of size S into location L with modifier M
E /S M L Examine location L with size S with modifier M
G [address] Begin execution
H Help for commands
I Initialize
K Stack trace
L [filename] [TFTP Server IP address | TFTP Server Name]
Load system image from ROM or from TFTP server, but do not
begin execution
O Show configuration register option settings
P Set the break point
S Single step next instruction
T function Test device (? for help)
Deposit and Examine sizes may be B (byte), L (long) or S (short).
Modifiers may be R (register) or S (byte swap).
Register names are: D0-D7, A0-A6, SS, US, SR, and PC
>
继续
>o/r 0x2042 *进入密码恢复模式
>i *初始化(也就是重启)
System Bootstrap, Version 5.2(8a), RELEASE SOFTWARE
Copyright (c) 1986-1995 by cisco Systems
2500 processor with 8192 Kbytes of main memory
F3: 8027360+98864+316548 at 0x3000060
Restricted Rights Legend
Use, duplication, or disclosure by the Government is
subject to restrictions as set forth in subparagraph
(c) of the Commercial Computer Software - Restricted
Rights clause at FAR sec. 52.227-19 and subparagraph
(c) (1) (ii) of the Rights in Technical Data and Computer
Software clause at DFARS sec. 252.227-7013.
cisco Systems, Inc.
170 West Tasman Drive
San Jose, California 95134-1706
Cisco Internetwork Operating System Software
IOS (tm) 2500 Software (C2500-JS-L), Version 11.2(21), RELEASE SOFTWARE (fc1)
Copyright (c) 1986-1999 by cisco Systems, Inc.
Compiled Wed 15-Dec-99 22:31 by ccai
Image text-base: 0x0304033C, data-base: 0x00001000
cisco 2505 (68030) processor (revision C) with 8192K/2048K bytes of memory.
Processor board ID 04876904, with hardware revision 00000000
Bridging software.
SuperLAT software copyright 1990 by Meridian Technology Corp).
X.25 software, Version 2.0, NET2, BFE and GOSIP compliant.
TN3270 Emulation software.
1 Ethernet/IEEE 802.3 interface(s)
8 Ethernet/IEEE 802.3 repeater port(s)
2 Serial network interface(s)
32K bytes of non-volatile configuration memory.
16384K bytes of processor board System flash (Read ONLY)
--- System Configuration Dialog ---
At any point you may enter a question mark '?' for help.
Use ctrl-c to abort configuration dialog at any prompt.
Default settings are in square brackets '[]'.
Would you like to enter the initial configuration dialog? [yes]: n *从这儿退出初始化配置
Press RETURN to get started!
%LINK-3-UPDOWN: Interface Ethernet0, changed state to up
%LINK-3-UPDOWN: Interface Serial0, changed state to down
%LINK-3-UPDOWN: Interface Serial1, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1, changed state to down
%SYS-5-RESTART: System restarted --
Cisco Internetwork Operating System Software
IOS (tm) 25
Router>
Router>
Router>00 Software (C2500-JS-L), Version 11.2(21), RELEASE SOFTWARE (fc1)
Copyright (c) 1986-1999 by cisco Systems, Inc.
Compiled Wed 15-Dec-99 22:31 by ccai
%LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0, changed state to down
%LINK-5-CHANGED: Interface Ethernet0, changed state to administratively down
%LINK-5-CHANGED: Interface Serial0, changed state to administratively down
%LINK-5-CHANGED: Interface Serial1, changed state to administratively down
Router>
Router>
OK!~~这样就没有密码的限制了
Router>ena
Router#
继续
Router#copy start run *把原来的配置重新载入
kouchengzhu(config)#no enable secret *然后取消密码限制
kouchengzhu#copy run start *再保存配置
Building configuration...
[OK]
HGXYATM01#
OK!~~现在可以重启了,不过要记得在开机的时候按ctrl-break
kouchengzhu#reload
Proceed with reload? [confirm]
%SYS-5-RELOAD: Reload requested
System Bootstrap, Version 5.2(8a), RELEASE SOFTWARE
Copyright (c) 1986-1995 by cisco Systems
2500 processor with 8192 Kbytes of main memory
Abort at 0x10EA820 (PC)
>o/r 0x2102 *把原来的值恢复了
>i
en!~~ 好了.现在就没有密码了
kouchengzhu>ena
kouchengzhu#
然后我sh version 看了看版本号
kouchengzhu#sh ver
Cisco Internetwork Operating System Software
IOS (tm) 2500 Software (C2500-JS-L), Version 12.2(21), RELEASE SOFTWARE (fc1)
Copyright (c) 1986-1999 by cisco Systems, Inc.
Compiled Wed 15-Dec-99 22:31 by ccai
Image text-base: 0x0304033C, data-base: 0x00001000
ROM: System Bootstrap, Version 5.2(8a), RELEASE SOFTWARE
BOOTFLASH: 3000 Bootstrap Software (IGS-RXBOOT), Version 10.2(8a), RELEASE
SOFTWARE (fc1)
HGXYATM01 uptime is 1 minute
System restarted by power-on
System image file is "flash:y", booted via flash
cisco 2505 (68030) processor (revision C) with 8192K/2048K bytes of memory.
Processor board ID 04876904, with hardware revision 00000000
Bridging software.
SuperLAT software copyright 1990 by Meridian Technology Corp).
X.25 software, Version 2.0, NET2, BFE and GOSIP compliant.
TN3270 Emulation software.
1 Ethernet/IEEE 802.3 interface(s)
8 Ethernet/IEEE 802.3 repeater port(s)
2 Serial network interface(s)
32K bytes of non-volatile configuration memory.
16384K bytes of processor board System flash (Read ONLY)
Configuration register is 0x2102
哦!~Version 11.2(21)..很老了哎 升级个ios吧,不过要注意最后2行
32K bytes of non-volatile configuration memory.
16384K bytes of processor board System flash (Read ONLY)
告诉你机器的flash和memory的容量的.要核对好IOS的使用要求哦!~
为了保险,我们还是先来给原来的IOS做个备份把
通常把路由器的E口和pc用交叉线连接起来,要在同一个网段。******
现在reload 进入mini ios (还是用ctrl-break)
Abort at 0x1050B3C (PC)
>o/r 0x2101 *进入boot
>i
kouchengzhu(boot)# *这是boot的提示符
为了保险起见,我们先备份一下原诗的IOS
kouchengzhu(boot)#sh flash *先确定原始IOS的文件名
System flash directory:
File Length Name/status
1 8126256 y *名称为 y
[8126320 bytes used, 8650896 available, 16777216 total]
16384K bytes of processor board System flash (Read/Write)
kouchengzhu(boot)#copy flash tftp *现在就开始备份吧
System flash directory:
File Length Name/status
1 8126256 y
[8126320 bytes used, 8650896 available, 16777216 total]
Address or name of remote host [255.255.255.255]? 192.168.1.110 *你的tftp的ip
Source file name? y *原始ios的名称
Destination file name [y]?
Verifying checksum for 'y' (file # 1)... OK
Copy 'y' from Flash to server
as 'y'? [yes/no]y
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Upload to server done
Flash copy took 0:01:46 [hh:mm:ss]
kouchengzhu(boot)#
然后就可以升级你的IOS了
kouchengzhu(boot)#copy tftp flash
System flash directory:
File Length Name/status
1 8126256 y
[8126320 bytes used, 8650896 available, 16777216 total]
Address or name of remote host [192.168.1.110]?
Source file name? c2500-i-l.121-25.bin *我们要更新的ios的名称
Destination file name [c2500-i-l.121-25.bin]?
Accessing file 'c2500-i-l.121-25.bin' on 192.168.1.110...
Loading c2500-i-l.121-25.bin from 192.168.1.110 (via Ethernet0): ! [OK]
Erase flash device before writing? [confirm]
Flash contains files. Are you sure you want to erase? [confirm]
Copy 'c2500-i-l.121-25.bin' from server
as 'c2500-i-l.121-25.bin' into Flash WITH erase? [yes/no]y *flash的容量太小了,所以我们
要erase掉原来的ios还有就是要安装的ios要和你的tftp在一个目录下面 (重点)
Erasing device... eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee ...erased
Loading c2500-i-l.121-25.bin from 192.168.1.110 (via Ethernet0):
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!
[OK - 8038440/16777216 bytes]
Verifying checksum... OK (0x9EE)
Flash copy took 0:04:41 [hh:mm:ss]
HGXYATM01(boot)#reload
Proceed with reload? [confirm]
System Bootstrap, Version 5.2(8a), RELEASE SOFTWARE
Copyright (c) 1986-1995 by cisco Systems
2500 processor with 8192 Kbytes of main memory
Abort at 0x10E1DB4 (PC)
>o/r 0x2102 *记得恢复初始值 (一定要记住)
>i
HGXYATM01# sh ver
Cisco Internetwork Operating System Software
IOS (tm) 2500 Software (C2500-I-L), Version 12.3(25), RELEASE SOFTWARE (fc1)
Copyright (c) 1986-2004 by cisco Systems, Inc.
Compiled Thu 29-Jul-04 10:37 by cmong
Image text-base: 0x03041FF0, data-base: 0x00001000
ROM: System Bootstrap, Version 5.2(8a), RELEASE SOFTWARE
BOOTLDR: 3000 Bootstrap Software (IGS-RXBOOT), Version 10.2(8a), RELEASE
SOFTWARE (fc1)
HGXYATM01 uptime is 1 minute
System returned to ROM by power-on
System image file is "flash:c2500-i-l.121-25.bin"
cisco 2505 (68030) processor (revision C) with 8192K/2048K bytes of memory.
Processor board ID 04876904, with hardware revision 00000000
Bridging software.
X.25 software, Version 3.0.0.
1 Ethernet/IEEE 802.3 interface(s)
8 Ethernet/IEEE 802.3 repeater port(s)
2 Serial network interface(s)
32K bytes of non-volatile configuration memory.
16384K bytes of processor board System flash (Read ONLY)
Configuration register is 0x2102
OK!~大功告成!~
其实从2600系列开始想升级ios已经不用这么麻烦了,可是25系列毕竟还是有在使用的.所以
给系统升级让他们工作的更好是个很不错的注意哦!~ |
|