实验5: IOS的升级与恢复
实验5: IOS的升级与恢复
实验目的
通过本实验可以掌握
1) 掌握IOS 正常的情况下升级IOS
2) IOS 丢失的情况下使用TFTP恢复IOS
3) IOS 丢失的情况下使用Xmodem恢复IOS
拓扑结构
实验步骤
n IOS 正常的情况下升级IOS (TFTP)
Router#conf t //进入配置模式
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int f0/0 //进入接口
Router(config-if)#ip add 1.1.1.1 255.255.255.0 //配置 IP 地址
Router(config-if)#no shut //启用接口
Router(config-if)#end //退到特权模式
Router#copy tftp: flash: //从 tftp 服务器拷贝 flash
Address or name of remote host []? 1.1.1.2 //指定服务器地址
Source filename []? c2600-d-mz.122-1.bin
Destination filename [c2600-d-mz.122-1.bin]?
Loading c2600-d-mz.122-1.bin from 1.1.1.2:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[OK - 50938004 bytes]
n IOS 丢失的情况下使用TFTP恢复IOS
1) 通过tftpdnld命令升级IOS
rommon 3 >IP_ADDRESS=10.32.10.1 (路由器的ip地址)
rommon 4 >IP_SUBNET_MASK=255.255.255.0 (路由器的掩码)
rommon 5 >DEFAULT_GATEWAY=10.32.10.32 (缺省网关,是pc机的ip)
rommon 6 >TFTP_SERVER=10.32.10.32 (是pc机的ip地址)
rommon 7 >TFTP_FILE=C2600-I-MZ.122-11.BIN (上传ios文件的名称)
rommon 8 >tftpdnld
执行tftpdnld命令进行ios升级,有时可能会报错或命令不执行,这时只要用sync命令保存配置后,重新启动路由器(最好关掉电源再开机)后,再执行tftpdnld命令就可以了。
rommon 9 >tftpdnld(传送文件)出现提示选择y
IP_ADDRESS: 10.32.10.1
IP_SUBNET_MASK: 255.255.255.0
DEFAULT_GATEWAY: 10.32.10.32
TFTP_SERVER: 10.32.10.32
TFTP_FILE: C2600-I-MZ.122-11.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-I-MZ.122-11.BIN from 10.32.10.3
…
File reception completed.Copying file C2600-I-MZ.122-11.BIN to flash.
Erasing flash at 0x607c0000
ogram flash location 0x605b0000
rommon 10 >
在rommon 13 >提示符下键入reset,或重新启动路由器(power-cycle),进入正常引导状态
2) IOS 丢失的情况下使用Xmodem恢复IOS
通过Xmodem命令(注:Xmodem与实际的modem没有任何联系 只是一个传输协议 数据是通过终端的串口和路由器的Console口灌进去的)升级IOS,具体步骤如下:
1、用Cisco原配的线缆连接路由器的console口与PC机的COM1,使用PC机的超级终端软件访问路由器,这时不需要对PC和路由器配置任何地址。
2、在这个模式下,输入Xmodem命令,即:
rommon 2 > xmodem -c c2600-i-mz.122-11.bin
(-c是带校验,c2600-i-mz.122-11.bin为存放在PC机上的IOS映像文件)
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 c2600-i-mz.122-11.bin ……
(此时在超级终端的传送栏目=> 选择发送文件选项 => 再选择Xmodem 并指明IOS映像文件所在的路径,按发送即开始上传IOS,等待时间很长,视IOS的大小和传输速度。)Erasing flash at 0x607c0000
program flash location 0x605b0000
Download Complete!
传完以后,对整个系统初始化 显示如下:
program load complete, entry point: 0x80008000, size: 0x5b85e0
Self decompressing the image :[OK]
…..
注释:Router采用这种方法时,由于使用console口来传送,速率为9600bps,需要时间较长。因此可修改console口速率利用xmodem命令实现快速升级IOS.具体方法如下:
rommon 1 > 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 (选择 yes)
enable "diagnostic mode"? y/n [n]: n (选择 no)
enable "use net in IP brocast 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 console 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,用最大的11520速率的xmodem传输)
change the boot characteristics? y/n [n]: n (选择 no)
Configuration Summary
enabled are:
load rom after netboot fails
console baud: 115200
boot: image specified by the boot system commandsor 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
注释: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等传输速率为9600bps.
方法如下:
Router>en 进入新IOS的特权模式
Router#reload 重启系统
Proceed with reload? [confirm] 回车
00:01:04: %SYS-5-RELOAD: Reload requested System Bootstrap, Version 11.3(2)XA4, RELEASE SOFTWARE (fc1)Copyright (c) 1999 by cisco Systems, Inc.TAC:Home:SW:IOS:Specials for info PC = 0xfff0a530, Vector = 0x500, SP = 0x680127b0 C2600 platform with 24576 Kbytes of main memory PC = 0xfff0a530, Vector = 0x500, SP = 0x8000468 monitor: command "boot" aborted due to user interrupt
30秒内按ctrl+break键
rommon 1 > confreg ( 输入“confreg”命令)
Configuration Summary
enabled are:load rom after netboot fails
console 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]: y (选择 yes)
enable "diagnostic mode"? y/n [n]: n (选择 no)
enable "use nn IP brocast 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 console 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 [7]: 0 (选择 0,改回用标准速率速率9600的xmodem传输)
change the boot characteristics? y/n [n]: n (选择 no)
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
You must reset or power cycle for new config to take effect
rommon 2 >
此时手工改回计算机串口与超级终端2者传输速率为9600然后敲入
rommon 2 >reset最好关掉电源后,重新启动。利用xmodem命令实现路由器IOS升级速度较慢,往往等上很长时间,为了快速升级,可以采用下列方法。
实验5: IOS的升级与恢复的更多相关文章
- cisco ASA ios升级或恢复
cisco ASA ios升级或恢复 一.升级前准备工作 1.准备好所要升级的IOS文件及对应的ASDM文件 2.在一台电脑上架设好tftp,设置好目录,与防火墙进行连接(假设电脑IP为192.168 ...
- iOS 9 升级过程汇中白苹果 iPhone或iPad 解决方案
最近想必有很多朋友升级了iOS 9,不过有部分朋友在升级过程中遇到了白苹果问题.也就是卡在升级过程中,不限重启.这时,你只能通过dfu进行升级了. ios9怎么进入dfu模式: 1.将你的iPhone ...
- iOS高版本备份恢复到低版本系统的方法
一般来说,在更新iOS系统的时候我们都会建议大家先用iTunes对系统进行完整备份.但时不时都会有人偷懒,或者使用手机OTA升级而没有对系统备份,最终导致不满意新系统了,想降级却无备份可以恢复的尴尬局 ...
- iOS cocoapods升级及问题
安装 安装RubyCocoaPods基于Ruby语言开发而成,因此安装CocoaPods前需要安装Ruby环境.幸运的是Mac系统默认自带Ruby环境,如果没有请自行查找安装.检测是否安装Ruby:$ ...
- iOS 10 升级后无法真机测试 Could not find Developer Disk Image
---2016年9月20日更新 iOS 升级到10之后,你会发现无法进行真机测试了.这种情况我在iOS 8.4 .9.3更新的时候也遇到过.原因是Xcode 的DeviceSupport里面缺少了iO ...
- 真机iOS SDK升级后xcode不能进行真机调试 怎么办
今天升级了一下iPod的SDK到iOS8,xcode仅仅能支持到7.1,真机调试遇到问题???以下是解决的方法! 找到xcode,点击右键.打开显示包内容,按路径Contents/Develpoer/ ...
- 微信iOS客户端升级内核对自定义分享的影响
上周,业务同学反应,公司的商品详情页,在有的Iphone手机上自定义分享信息失效.在自己手机上一直无法重现,在一个同事的手机上也重现了. 后来看到<微信iOS客户端将升级为WKWebview内核 ...
- Oracle12c功能增强新特性之维护&升级&恢复&数据泵等
1. 内容提要 1) 表分区维护的增强. 2) 数据库升级改善. 3) 跨网络还原/恢复数据文件. 4) 数据泵的增强. 5) 实时ADDM. 6) 并发统计信息收集. 2 ...
- CISCO-路由器交换机IOS被删,恢复方法
方式一,tftpdnld方式恢复Router 2600 IOS 1) 将计算机串口和路由器console口相连 一定将计算机网口与路由器第一个以太口f0/0相连. 2) 启动TFTP服务器,并将要下载 ...
随机推荐
- DataX-MysqlReader 插件文档
:first-child{margin-top:0!important}.markdown-body>:last-child{margin-bottom:0!important}.markdow ...
- 《带你装B,带你飞》pytest修仙之路3 - setup/teardown
1. 简介 学过unittest的都知道里面用前置和后置setup和teardown非常好用,在每次用例开始前和结束后都去执行一次.当然还有更高级一点的setupClass和teardownClass ...
- spring之为什么要使用事务?
问题描述:现在我们有一个数据库:spring 三张表:account.book.book_stock account存储着用户以及账户余额.book存储着书号.名字和 购买一本所需金额.book_st ...
- 个人博客-vue-blog
http://47.100.126.169/zmengBlog/
- 基于Arduino的红外遥控
1.红外接收头介绍 一.什么是红外接收头? 红外遥控器发出的信号是一连串的二进制脉冲码.为了使其在无线传输过程中免受其他红外信号的干扰,通常都是先将其调制在特定的载波频率上,然后再经红外发射二极管 ...
- es6 面向对象选项卡(自动轮播功能)
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- 快速回顾MySQL:简单查询操作
利用空闲时间花几分钟回顾一下 7.1 检索数据 为了查询出数据库表中的行(数据),使用SELECE语句. 格式: # 第一种 SELECT * FROM <table_name>; # 第 ...
- js字符数组转化为数字数组
先谈一谈需求,我有一个字符串数组,数组内容是字符类型的数字,需要把字符类型的数字转换为数字类型,找了找资料,发现牛人真是多,把前辈的经验总结一下. 例子 ['1','2','3'] => [1, ...
- Scala实践4
一.数组 在Scala中,用()来访问元素,数组声明的语法格式如下 : var z:Array[String] = new Array[String](3) 或 var z = new Array[S ...
- szTom's Code Style
介绍szTom在C++中使用的代码风格. 头文件 必须使用using namespace std; 如果是C头文件,必须使用c前缀文件名. #include <cstdio> 而不是 #i ...