天天看点

在所有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
           

您必须重置或关机并重新开机为了新的配置寄存器能生效。

继续阅读