简介
本文档介绍如何使用启动映像的TFTP功能从ROM监控器(ROMmon)提示符升级路由器。
先决条件
要求
本文档没有任何特定的要求。
使用的组件
本文档不限于特定的软件和硬件版本。
本文档中的信息都是基于特定实验室环境中的设备编写的。本文档中使用的所有设备最初均采用原始(默认)配置。如果您的网络处于活动状态,请确保您了解所有命令的潜在影响。
规则
有关文档规则的详细信息,请参阅 Cisco 技术提示规则。
什么是引导映像?(Rx-boot)
引导映像是Cisco IOS®软件的子集,用于在恢复情况下通过TFTP将主要Cisco IOS软件映像下载到路由器。用户可以通过由promptRouter(boot)#指示的命令行界面与此映像交互。
某些平台(Cisco 1600和2500)在ROM中拥有它;其他平台(高端路由器)在bootflash中拥有它。此映像可称为 xboot 映像、rxboot 映像、bootstrap 映像或者 boot loader 或 helper 映像,具体取决于您所用的平台。
引导映像的功能有限。例如,它不包含路由信息。
警告:在引导模式下从不保存配置,如果以这种方式保存,则部分配置(如路由部分)将丢失。
加载引导映像
如果路由器包含有效的启动映像,则可用于通过TFTP将有效的Cisco IOS软件映像下载到闪存中。为此,请执行下列步骤:
-
更改配置寄存器以启动引导映像,并按如下所示设置配置寄存器(基于您得到的提示):
rommon 1 > confreg 0x2101
or
> o/r 0x2101
You must reset or power cycle for the new configuration to take effect.
!--- This is the router output when a configuration register command is entered.
现在,配置寄存器已更改以启动引导映像。
-
要启动启动映像,请重置路由器:
rommon 2 > reset
or
> i
出现 System Bootstrap 消息,并且路由器启动其引导映像。在屏幕上,您必须看到如下内容:
System Bootstrap, Version 11.1(10)AA, EARLY DEPLOYMENT RELEASE SOFTWARE (fc1)
Copyright (c) 1997 by cisco Systems, Inc.
C1600 processor with 18432 Kbytes of main memory
program load complete, entry point: 0x4018060, size: 0x1e1568
Restricted Rights Legend
.
.
!--- Output omitted.
.
.
Router(boot)>
现在,您必须看到类似于Router(boot)>的提示。
-
如果您仍在ROMmon中,则意味着您的引导映像丢失或损坏。如果您的路由器在闪存或 Bootflash 中没有有效映像,也没有其他 ROMmon 升级程序,则恢复的唯一方法是配备一个带有兼容闪存卡的类似路由器,然后在该路由器上下载映像,并将闪存卡移至滞留的路由器。
-
有关闪存卡兼容性信息,请查看 PCMCIA 文件系统兼容性列表和文件系统信息。
-
将您的路由器的以太网接口0连接到网络,这样您便可以到达TFTP服务器。配置路由器的以太网接口的 IP 地址。
Router(boot)>enable
Router(boot)#configure terminal
Router(boot)(config)#interface ethernet 0
Router(boot)(config-if)#ip address 10.77.241.160 255.255.255.0
Router(boot)(config-if)#no shutdown
-
运行引导映像的路由器没有路由功能。因此,必须配置此路由器的默认网关。发出 ip default-gateway 全局配置命令以为此路由器设置适当的默认网关。该地址必须指向连接到以太网0接口所在子网的路由器的IP地址。
Router(boot)(config)#ip default-gateway 10.77.241.129
-
从 TFTP 服务器复制 Cisco IOS 映像之前,请确保路由器已连接到 TFTP 服务器。
Router(boot)#ping 10.77.233.94
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echoes to 10.77.233.94, timeout is 2 seconds:
.!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/4/4 ms
Router(boot)#
-
将 Cisco IOS 映像从 TFTP 服务器复制到路由器上的闪存。
Router(boot)#copy tftp flash
PCMCIA flash directory:
No files in PCMCIA flash
[0 bytes used, 16777216 available, 16777216 total]
Address or name of remote host [255.255.255.255]? 10.77.233.94
!--- Enter the IP address of the TFTP Server.
Source file name? c1600-y-l.122-10d.bin
!--- This is the filename of the Cisco IOS image that you want to copy from
!--- the TFTP server.
Destination file name [c1600-y-l.122-10d.bin]?
!--- Press 'Enter'.
Accessing file 'c1600-y-l.122-10d.bin' on 10.77.233.94...
Loading
c1600-y-l.122-10d.bin from 10.77.233.94 (via Ethernet0):
! [OK] Device needs erasure before copying new file Erase flash device before writing? [confirm]y
!--- Press 'y' or 'Enter'.
!--- On Class B Flash file systems, the router gives you the option of erasing
!--- the existing contents of Flash memory before writing to it. If no free Flash
!--- memory is available, or if no files have ever been written to Flash memory,
!--- the erase routine is required before new files can be copied. If there is
!--- enough free Flash memory, the router gives you the option of erasing the
!--- existing Flash memory before writing to it. The system will inform you
!--- of these conditions and prompt you for a response.
!--- If you enter 'n' after the "Erase flash before writing?" prompt, the copy
!--- process continues. If you enter 'y' and confirm the erasure, the erase
!--- routine begins. Make sure to have ample Flash memory space before entering "n"
!--- at the erasure prompt. Copy 'c1600-y-l.122-10d.bin' from server as 'c1600-y-l.122-10d.bin' into Flash WITH erase? [yes/no]yes
!--- Entering 'yes' erases all the files in Flash.
Erasing device... eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee ...erased Loading
c1600-y-l.122-10d.bin from 10.77.233.94 (via Ethernet0):
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!
[OK - 7220632/16777216 bytes]Verifying checksum... OK (0x6526) Flash device copy took 00:05:57 [hh:mm:ss] Router(boot)#
-
将配置寄存器的值改回2102,以便在下次重新加载时,路由器使用新下载的Cisco IOS映像启动。
Router(boot)#configure terminal
Router(boot)(config)#config-register 0x2102
Router(boot)(config)#exit
Router(boot)#
-
用 reload 命令重新加载路由器。
Router(boot)#reload
System configuration has been modified. Save? [yes/no]: no
Building configuration...
[OK]
Proceed with reload? [confirm]
!--- Press 'Enter'.
%SYS-5-RELOAD: Reload requested
System Bootstrap, Version 11.1(10)AA, EARLY DEPLOYMENT RELEASE SOFTWARE (fc1)
Copyright (c) 1997 by cisco Systems, Inc.
C1600 processor with 18432 Kbytes of main memory
program load complete, entry point: 0x4018060, size: 0x1e1568
.
.
!--- Output omitted.
.
.
Router>
-
要验证是否已将正确的映像加载到路由器中,请使用show version 命令检查路由器中的Cisco IOS映像版本。
Router>show version
Cisco Internetwork Operating System Software
Cisco IOS (tm) 1600 Software (C1600-Y-L), Version 12.2(10d), RELEASE SOFTWARE (fc1)
Copyright (c) 1986-2003 by cisco Systems, Inc.
Compiled Wed 14-May-03 01:04 by pwade
Image text-base: 0x0803A510, data-base: 0x02005000
ROM: System Bootstrap, Version 11.1(10)AA, EARLY DEPLOYMENT RELEASE SOFTWARE (fc1)
ROM: 1600 Software (C1600-BOOT-R), Version 11.1(10)AA, EARLY DEPLOYMENT RELEASE
SOFTWARE (fc1)
1603 uptime is 19 hours, 26 minutes
System returned to ROM by reload
System image file is "flash:c1600-y-l.122-10d.bin"
cisco 1603 (68360) processor (revision C) with 13824K/4608K bytes of memory.
Processor board ID 10240382, with hardware revision 00000000
Bridging software.
X.25 software, Version 3.0.0.
Basic Rate ISDN software, Version 1.1.
1 Ethernet/IEEE 802.3 interface(s)
1 ISDN Basic Rate interface(s)
System/IO memory with parity disabled
2048K bytes of DRAM onboard 16384K bytes of DRAM on SIMM
System running from FLASH
7K bytes of non-volatile configuration memory.
16384K bytes of processor board PCMCIA flash (Read ONLY)
Configuration register is 0x2102
Router>
从TFTP服务器加载的新Cisco IOS映像现在运行。
相关信息