簡介
本文說明如何使用啟動映像的TFTP功能從ROM monitor (ROMmon)提示字元升級路由器。
必要條件
需求
本文件沒有特定需求。
採用元件
本文件所述內容不限於特定軟體和硬體版本。
本文中的資訊是根據特定實驗室環境內的裝置所建立。文中使用到的所有裝置皆從已清除(預設)的組態來啟動。如果您的網路運作中,請確保您瞭解任何指令可能造成的影響。
慣例
如需文件慣例的詳細資訊,請參閱思科技術提示慣例。
什麼是引導映像?(Rx-boot)
引導映像是Cisco IOS®軟體的一個子集,用於在恢復情況下使用TFTP將主Cisco IOS軟體映像下載到路由器。使用者可以透過由promptRouter(boot)#指示的命令列介面與此映像互動。
某些平台(Cisco 1600、2500)在ROM中具有它,而其它平台(高端路由器)在bootflash中才具有它。此映像可以稱為xboot映像、rxboot映像、bootstrap映像或引導載入程式或幫助程式映像,具體取決於您的平台。
引導映像具有有限的功能。例如,它不包含路由資訊。
警告:請勿在啟動模式下儲存組態,否則以這種方式儲存的組態(例如路由零件)將會遺失。
載入開機映像
如果路由器包含有效的引導映像,則可以使用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映像現在運行。
相關資訊