恢复CISCO的FLASH方法一
如果你不小心使用了命令erase flash 那么发生什么就可想而知了。因此,建议在你拿到路由器等网络设备时 最好先将它的IOS等操作系统备份出来,以备万一!
本篇主要介绍通过Xmodem上传IOS的过程(以2610为例,不过这个方法用在其他设备上没什么太大区别)
准备工作,只要有Cisco原配的线缆就可以(注:Xmodem与实际的modem没有任何联系 只是一个传输协议 数据是通过终端的串口和路由器的Console口灌进去的)
在没有IOS的情况下 系统只能进入Rommon状态,在这个状态下只能见到如下命令:
rommon 8 > ?
alias set and display aliases command
boot boot up an external process
break set/show/clear the breakpoint
confreg configuration register utility
cont continue executing a downloaded image
context display the context of a loaded image
cookie display contents of cookie PROM in hex
dev list the device table
dir list files in file system
dis display instruction stream
dnld serial download a program module
frame print out a selected stack frame
help monitor builtin command help
history monitor command history
meminfo main memory information
repeat repeat a monitor command
reset system reset
set display the monitor variables
stack produce a stack trace
sync write monitor environment to NVRAM
sysret print out info from last system return
tftpdnld tftp image download
unalias unset an alias
unset unset a monitor variable
xmodem x/ymodem image download
在这个模式下,输入Xmodem
rommon 9 > xmodem
会提示如下警告:
WARNING: All existing data in bootflash will be lost!
Invoke this application only for disaster recovery.
Do you wish to continue? y/n [n]: y
Ready to receive file ? ...
然后在超级终端的传送栏目=> 选择发送选项 => 再选择Xmodem 并指明IOS所在的路径即开始上传IOS,等待时间很长,视IOS的大小和传输速度。对于初次做IOS上传,建议不要去修改什么传输速率。传完以后 对整个系统初始化 界面如下:
Erasing flash at 0x603c0000
program flash location 0x602f0000
Download Complete!
program load complete, entry point: 0x80008000, size: 0x2f0074
Self decompressing the image : #################################################
################################################################################
################################################################################
################################################################# [OK]
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) C2600 Software (C2600-I-M), Version 11.3(6)T, RELEASE SOFTWARE (fc1)
Copyright (c) 1986-1998 by cisco Systems, Inc.
Compiled Tue 06-Oct-98 18:42 by ccai
Image text-base: 0x80008084, data-base: 0x80554578
cisco 2610 (MPC860) processor (revision 0x202) with 12288K/4096K bytes of memory
.
Processor board ID JAB0233005Z (3677578902)
M860 processor: part number 0, mask 32
Bridging software.
X.25 software, Version 3.0.0.
1 Ethernet/IEEE 802.3 interface(s)
1 Serial network interface(s)
32K bytes of non-volatile configuration memory.
4096K bytes of processor board System flash (Read/Write)
Press RETURN to get started!
00:00:06: %LINK-3-UPDOWN: Interface Ethernet0/0, changed state to up
00:00:06: %LINK-3-UPDOWN: Interface Serial0/0, changed state to up
00:00:06: %SYS-5-CONFIG_I: Configured from memory by console
00:00:06: %SYS-5-RESTART: System restarted --
Cisco Internetwork Operating System Software
IOS (tm) C2600 Software (C2600-I-M), Version 11.3(6)T, RELEASE SOFTWARE (fc1)
Copyright (c) 1986-1998 by cisco Systems, Inc.
Compiled Tue 06-Oct-98 18:42 by ccai
00:00:07: %LINEPROTO-5-UPDOWN: Line protocol on
WL_bank_2610_2>Interface Ethernet0/0, changed state to up
00:00:07: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed sta
te to up
00:00:07: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed sta
te to up
2610_2>
恢复CISCO的FLASH方法二
tftpdnld方式
2.1.1将计算机串口和路由器CONSLE口相连,将计算机网口与路由器以太口(一定要与第一个以太口)相连
2.1.2 启动TFTP服务器,并将要下载的版本放于指定目录下面。
2.1.3 开启路由器电源,由于没有有效版本,路由器启动后将直接进入监控模式。
Rommon1>
2.1.4按如下命令设置参数。
Rommon2>IP_ADDRESS=168.1.32.207
Rommon3>IP_SUBNET_MASK=255.255.0.0
Rommon4>DEFAULT_GATEWAY=168.1.32.206
Rommon5>TFTP_FILE=c2600-i-mz.121-3.T
Rommon6>tftpdnld
以上假定计算机地址为168.1.32.206 255.255.0.0,命令IP_ADDRESS=168.1.32.207
在监控模式下将168.1.32.207地址配置到路由器的第一个以太端口,从而建立起路由器与TFTP服务器之间的连接,正常下载版本。
请放心使用
对于cisco2600系列可以在rommon状态下用tftpdnld命令
对于cisco3600系列不支持rommon状态下的tftpdnld命令时,可以考虑
xmodem方式
1、平时备用一个最基本的ios( 只要能识别你的以太口即可),一个正常使用的ios
2、在rommon状态下,执行如下命令
confreg
安提示,只修改速率一项,选7 (115200),重启router
3、修改超级终端的速率也为115200
这时即可看到
rommon> 状态,然后执行命令
rommon>xmodem -y -r 超级终端使用ymodem 协议,传输你的基本ios, 这时并不写入flash, 而只是将ios读入dram内运行,传输一个5M的ios大概10分钟。传输完毕后即可看到正常的启动状态
4、使用copy tftp flash命令,传输你正常使用的ios
5、更改console的端口速率为9600,重启router, 更改超级终端的速率为9600即可。整个过程所用的时间也很短呀,用得着的朋友请放心使用
要恢复,首先你要有此款交换机的ios。
1、长按交换机mode开关,在配置界面(使用超级终端)会出现三个提示:flash_init、load_helper、boot,先输入flash_init回车,再输入load_helper回车,接着输入copy xmodem: flash:c2900XL-hs-mz-112.8-SA5.bin(注意这里要输入你的ios版本)回车,这是你要快速打开发送菜单,选择发送文件选项,然后输入你的ios的位置,确定后就开始了(整个过程大概要30到45分钟)。完成之后输入set BOOT flash:c2900XL-hs-mz-112.8-SA5.bin,回车,再输入boot flash:c2900XL-hs-mz-112.8-SA5.bin,回车后一切搞定!!!有一点值得注意:在前面输入的第三个命令中flash和它前面的冒号之间的空格不能少!!!!