|
|
1 备份
1.1 路由器备份 PC装TFTPServer 设根目录 服务器与路由连接端口IP同网段 互ping通
show flash
show version 查看配置文件,IOS及版本,记录IOS名称
copy flash tftp
source filename
server address
destination filename
1.2 交换机备份
1900IOS不可备份,配置文件可备份 copy NVRAM tftp://tftpserver/Switch conf filename
2900 copy flash: tftp:
2 升级
2.1 路由器升级
Router2500: config-register 0x2102
wr
reload
ping tftpserver
copy tftp: flash:
2.2 交换机升级
1900: U(Xmodem=C**ole)改快速率9600改为57600
为客户端发送Xmodem文件
2900: copy tftp: flash:
3 恢复IOS
3.1 路由器
2600: rommon 1>tftp dnld 查看IP与TFTP IP正确选yes
不正确更改:IP_address=<IP>
TFTP_server=<TFTP IP>
TFTP_FILE=<filename>
2500和3640 (boot)>copy tftp flash
3.2 交换机
2900:
flash_init
进安全模式使用
copy Xmodem: c3550.bin flash: c3550.bin
copy tftp: flash: c3550-ipservicesk9-mz.122-44.SE.bin
首先找到一份小一点的3550ios文件(因为要用很慢的xmodem传输ios文件,所以先传输一个小的ios文件,然后用tftp再传输一个你需要的ios文件)
然后再你的超级终端中输入命令:copy xmodem: flash:xxxx (xxxx是你的ios文件名字)
等到出现出现如下提示:
Begin the Xmodem or Xmodem-1K transfer now...
在你的超级终端菜单栏里面点击transfer ----然后选择send file ,在出现的窗口中
filename 选择你要传输的ios文件。在protocol中选择1k xmodem ,点击send 按钮
等待…………成功!!
switch: set BAUD 57600
可以更改速率,使Xmodem传输加快。
完成之后建议switch: unset BAUD
恢复默认的9600
4 恢复配置文件
备份 启动TFTPserver
copy startup-config tftp 备份NVRAM
copy running-config tftp 备份RAM
交换机1900备份 copy NVRAM tftp://TFTPserver/filename
恢复 copy tftp://TFTPserver/filename nvram
5 口令恢复
5.1 交换机
1900 先按mode键,后加电,进入选C继续引导
U升级
S系统编辑接口,F恢复出厂值,yes,X,C
2900 先加电后按mode键,1x灯灭时松开
flash_init 进入获取权限
dir flash:/ 查看
delete flash:/config.text
不留配置
reset 清除设置
只删密码
rename flash:/config.text flash:/config.old 改名
boot 重引导
rename flash:/config.old flash:/config.text 改回名字
copy startup-config running-config 调出配置
enable secret cisco 重设密码
wr 保存
5.2 路由器
show version 查默认0x2102改为0x2142
开机60秒内按ctrl+Break
进入rom monitor>
2500: o/r 0x2142 之后的:confreg 0x2142
i或reset重启
进入命令行copy star run
修改口令 wr保存
config-register 0x2102
激活端口 show run查看是否有shutdown的将之激活
wr保存
6 3640恢复先用confreg把c**ole的speed调到115200,再找一个小一点的IOS放到内存中(不要直接写到Flash中,Rmon下写Flash非常慢),再用TFTP就可以了。 另外记得用Ymodem,大文件比Xmodem要快10%以上。
相关命令是 xmodem -y(Ymodem) -r(直接运行、不写Flash)这是在没有Flash卡的情况下最快的修复方法。
最后提醒大家对36系列要尽量注意不要删IOS,因为它不支持在RMON下TFTP,只能用Xmodem。
先打开超级终端,进入rommon 模式(Ctrl+Break组合键),键入confreg, 如下:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rommon 1 > confreg 回车
Configuration Summary
enabled are:
load rom after netboot fails
c**ole 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 (选择 yes)
enable "diagnostic mode"? y/n [n]: n (选择 no)
enable "use net in IP bcast address"? y/n [n]: n (选择 no)
disable "load rom after netboot fails"? y/n [n]: n (选择 no)
enable "use all zero broadcast"? y/n [n]: n (选择 no)
enable "break/abort has effect"? y/n [n]: n (选择 no)
enable "ignore system config info"? y/n [n]: n (选择 no)
change c**ole baud rate? y/n [n]: y (选择 yes)
enter rate: 0 = 9600, 1 = 4800, 2 = 1200, 3 = 2400
4 = 19200, 5 = 38400, 6 = 57600, 7 = 115200 [0]: 7 (选择 7,用最大的115200速率的xmodem传输)
change the boot characteristics? y/n [n]: n (选择 no)
Configuration Summary
enabled are:
load rom after netboot fails
c**ole baud: 115200
boot: image specified by the boot system commands
or default to: cisco2-C2600
do you wish to change the configuration? y/n [n]: n (选择 no)
You must reset or power cycle for new config to take effect
rommon 2 > reset 回车
注意:在此时键入 reset键之前,开始定义串口速度(我的电脑---端口属性----串口速度调为115200),然后再修改超级终端里设置速率为115200,记住,一定这么做!否则出现乱码! 然后关闭这个超级终端,重新建立一个超级终端连接,(期间系统重新启动)启动后,出现
rommon 1> 提示符
然后,输入
rommon 1> xmodem -r
Do not start the sending program yet...
Invoke this application only for disaster recovery.
Do you wish to continue? y/n [n]: y (选择 yes)
Ready to receive file ...
此时,在超级终端的菜单上的“传送”---“发送文件”----选择IOS镜像文件所在地以及选择使用“xmodem”协议,点击“发送”即可
然后等待10-20分钟左右就把3-6M的IOS灌进去了!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(修改回计算机串口与超级终端、路由器confreg下的xmodem等9600的传输速率)
(videre注:实际用的时候,我发现这个命令总是改不成功,后来发现在line con 0下面有了一个speed 115200,所以即使改register成功,启动以后router又执行speed 115200,还是不行,所以如果有这个问题,记得把这个语句no掉)
Router>en 进入新IOS的特权模式
Router#reload 重启系统
|
|