天天看點

在所有Cisco路由器上使用配置寄存器

配置寄存器的用途

配置寄存器可用于以多種方式更改路由器行為,例如:

路由器如何啟動(進入ROMmon,NetBoot)

引導時的選項(忽略配置,禁用引導消息)

控制台速度(終端仿真會話的波特率)

注意:如果波特率設定為不同于預設速率,則在CLI上可以看到奇數字元。檢查table1以設定不同Confreg值的波特率。

可以使用config-register指令從配置模式設定配置寄存器。從ROMmon中,使用confreg指令。發出show version指令以檢視配置寄存器的目前設定:

Router#show version
Cisco Internetwork Operating System Software 
IOS (tm) 2500 Software (C2500-JS-L), Version 12.1(5), RELEASE SOFTWARE (fc1)
Copyright (c) 1986-2000 by cisco Systems, Inc.
Compiled Wed 25-Oct-00 05:18 by cmong
Image text-base: 0x03071DB0, data-base: 0x00001000
ROM: System Bootstrap, Version 5.2(8a), RELEASE SOFTWARE
BOOTFLASH: 3000 Bootstrap Software (IGS-RXBOOT), Version 10.2(8a),
 RELEASE SOFTWARE (fc1)
Router uptime is 7 minutes
System returned to ROM by reload
System image file is "flash:c2500-js-l_121-5.bin"
cisco 2500 (68030) processor (revision D) with 16384K/2048K bytes of memory.
Processor board ID 03867477, with hardware revision 00000000
Bridging software.
X.25 software, Version 3.0.0.
SuperLAT software (copyright 1990 by Meridian Technology Corp).
TN3270 Emulation software.
1 Token Ring/IEEE 802.5 interface(s)
2 Serial network interface(s)
32K bytes of non-volatile configuration memory.
16384K bytes of processor board System flash (Read ONLY)
Configuration register is 0x2102
           

配置寄存器的出廠預設設定為0x2102。這表明路由器應該試圖加載的Cisco IOS ®從閃存軟體映像,并與9600波特率的控制台速度加載啟動配置。

排除配置寄存器問題故障

不适當地設定的配置寄存器能引起許多問題,例如:

配置檔案被忽略。

沒有輸出或垃圾從控制台輸出了。

引導到ROMmon裡。

更改配置寄存器到一個适當的設定,例如預設值0x2102,為了解決這些問題。

排除故障,當配置寄存器值不知道

如果配置寄存器值不知道,請設法設立Telnet或控制台會話用路由器。您能然後檢查show version輸出确定配置寄存器的值:

Router#show version
Cisco Internetwork Operating System Software 
IOS (tm) 2500 Software (C2500-JS-L), Version 12.1(5), RELEASE SOFTWARE (fc1)
Copyright (c) 1986-2000 by cisco Systems, Inc.
Compiled Wed 25-Oct-00 05:18 by cmong
Image text-base: 0x03071DB0, data-base: 0x00001000
ROM: System Bootstrap, Version 5.2(8a), RELEASE SOFTWARE
BOOTFLASH: 3000 Bootstrap Software (IGS-RXBOOT), Version 10.2(8a), RELEASE SOFTWARE (fc1)
Router uptime is 7 minutes
System returned to ROM by reload
System image file is "flash:c2500-js-l_121-5.bin"
cisco 2500 (68030) processor (revision D) with 16384K/2048K bytes of memory.
Processor board ID 03867477, with hardware revision 00000000
Bridging software.
X.25 software, Version 3.0.0.
SuperLAT software (copyright 1990 by Meridian Technology Corp).
TN3270 Emulation software.
1 Token Ring/IEEE 802.5 interface(s)
2 Serial network interface(s)
32K bytes of non-volatile configuration memory.
16384K bytes of processor board System flash (Read ONLY)
Configuration register is 0x2142
           

如果不能設立控制台會話,或者,如果看到僅垃圾字元,路由器和終端仿真軟體之間的速度不比對可能是原因。設法更換波特率您的終端仿真軟體。可能的設定包括1200, 2400, 4800, 9600, 19200, 38400, 57600和115200。一旦建立一個會話,您能發出show version指令确定設定。如果路由器在ROMmon模式,您能設法發出boot指令手工引導作業系統。關于您的配置寄存器設定的資訊含義,包括潛在問題和修正,請收集輸出的show version指令或者show tech-support指令和輸入到Cisco CLI分析器(僅限注冊使用者)工具。為了使用Cisco CLI分析器(僅限注冊使用者),您必須是一個注冊的使用者,登陸,并且安排Javascript被啟用。

排除故障,當配置寄存器值知道

如果認識您的配置寄存器的值,請使用表在配置寄存器設定和他們的含義确定工作情況。關于您的配置寄存器設定的資訊含義,包括潛在問題和修正,請收集輸出的show version指令或者show tech-support指令和輸入到Cisco CLI分析器(僅限注冊使用者)工具。為了使用Cisco CLI分析器(僅限注冊使用者),您必須是一個注冊的使用者,登陸,并且安排Javascript被啟用。如果能通過Telnet通路路由器,請建立一個會話用路由器。否則,請設定您的終端仿真程式為配置寄存器設定表示的波特率設立控制台會話。

設定從配置模式的配置寄存器

發出config-register指令設定配置寄存器:

Router#configure terminal 
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#config
Router(config)#config-register 0x2102
Router(config)#end
Router#show version
Cisco Internetwork Operating System Software 
IOS (tm) 2500 Software (C2500-JS-L), Version 12.1(5), RELEASE SOFTWARE (fc1)
Copyright (c) 1986-2000 by cisco Systems, Inc.
Compiled Wed 25-Oct-00 05:18 by cmong
Image text-base: 0x03071DB0, data-base: 0x00001000
ROM: System Bootstrap, Version 5.2(8a), RELEASE SOFTWARE
BOOTFLASH: 3000 Bootstrap Software (IGS-RXBOOT), Version 10.2(8a),
 RELEASE SOFTWARE (fc1)
Router uptime is 11 minutes
System returned to ROM by reload
System image file is "flash:c2500-js-l_121-5.bin"
cisco 2500 (68030) processor (revision D) with 16384K/2048K bytes of memory.
Processor board ID 03867477, with hardware revision 00000000
Bridging software.
X.25 software, Version 3.0.0.
SuperLAT software (copyright 1990 by Meridian Technology Corp).
TN3270 Emulation software.
1 Token Ring/IEEE 802.5 interface(s)
2 Serial network interface(s)
32K bytes of non-volatile configuration memory.
16384K bytes of processor board System flash (Read ONLY)
Configuration register is 0x2142 (will be 0x2102 at next reload)
           

新的配置寄存器設定一次變得激活路由器重新載入。

Router#reload
System configuration has been modified. Save? [yes/no]: n
Proceed with reload? [confirm]
           

設定從ROMmon的配置寄存器

設定配置寄存器用confreg指令路由器是否在ROMmon模式:

rommon 1 >confreg 0x2102
           

您必須重置或關機并重新開機為了新的配置寄存器能生效。

繼續閱讀