Cisco 路由器上传IOS

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Cisco 路由器上传IOS相关的知识,希望对你有一定的参考价值。

    如果工作中不慎误删路由器ios,或者升级了错误版本IOS,导致路由器不能正常启动,可以通过TFTP恢复IOS,还可以采用Xmodem方式通过console口恢复IOS。然而由于Console接口速率很慢,很少有人会采用。

(1)当路由器加载flash中IOS失败以后,开机就将进入rommon(ROM)监控模式。
技术分享图片
(2)恢复IOS之前请确保本地主机上启动TFTP服务,并将IOS放置到正确的目录。
打开tftp软件3CDaemon,同时关闭电脑系统防火墙。
技术分享图片
(3)路由器上配置TFTP。
准备console线和网线一条。连接线缆,就电脑com口与路由器console口连接,网线一头接电脑,一头接路由器的F0/0口(只能用F0/0,路由器没有系统,给路由器配置的IP地址默认是给F0/0口的)
(4)路由器上配置TFTP。
rommon 1 > IP_ADDRESS=10.8.3.1 //路由器以太网IP地址
rommon 2 > IP_SUBNET_MASK=255.255.255.0 //掩码
rommon 3 > DEFAULT_GATEWAY=10.8.3.134 //默认网关地址
rommon 4 > TFTP_SERVER=10.8.3.134 //TFTP服务器IP地址
rommon 5 > TFTP_FILE=c1841-adventerprisek9-mz.151-3.T2.bin //IOS文件名
rommon 6 > set //查看配置信息
IP_ADDRESS=10.8.3.1
IP_SUBNET_MASK=255.255.255.0
DEFAULT_GATEWAY=10.8.3.134
TFTP_SERVER=10.8.3.134
TFTP_FILE=c1841-adventerprisek9-mz.151-3.T2.bin
rommon 7 > tftpdnld //该命令从TFTP服务器恢复IOS

      IP_ADDRESS: 10.8.3.1
  IP_SUBNET_MASK: 255.255.255.0
 DEFAULT_GATEWAY: 10.8.3.134
     TFTP_SERVER: 10.8.3.134
       TFTP_FILE: c1841-adventerprisek9-mz.151-3.T2.bin
    TFTP_MACADDR: 00:1f:6c:eb:a1:a8
    TFTP_VERBOSE: Progress
TFTP_RETRY_COUNT: 18
    TFTP_TIMEOUT: 7200
   TFTP_CHECKSUM: Yes
         FE_PORT: 0 
   FE_SPEED_MODE: Auto Detect

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 c1841-adventerprisek9-mz.151-3.T2.bin from 10.8.3.134 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

File reception completed.
Validating checksum.
Copying file c1841-adventerprisek9-mz.151-3.T2.bin to flash:.
program load complete, entry point: 0x8000f000, size: 0xcb80

Format: Drive communication & 1st Sector Write OK...
Writing Monlib sectors.
.......................................................................................................
Monlib write complete

Format: All system sectors written. OK...
Format: Operation completed successfully.

Format of flash: complete
program load complete, entry point: 0x8000f000, size: 0xcb80
(5)TFTP查看IOS是否上传完成。
技术分享图片
(6)rommon 8 > reset //重启路由器
技术分享图片

以上是关于Cisco 路由器上传IOS的主要内容,如果未能解决你的问题,请参考以下文章

Cisco 路由器上传IOS

CISCO-更新路由器IOS

Cisco的互联网络操作系统IOS和安全设备管理器SDM__路由器软硬件知识

cisco路由器IOS恢复方法之ROMMON恢复

CISCO-从TFTP上上传/下载配置文件

如何移植openwrt系统