简介
本文档介绍如何更新配置寄存器(config-register
)以更改路由器行为。
先决条件
要求
本文档没有任何特定的要求。
使用的组件
本文档不限于特定的软件和硬件版本。
本文档中的信息都是基于特定实验室环境中的设备编写的。本文档中使用的所有设备最初均采用原始(默认)配置。如果您的网络处于活动状态,请确保您了解所有命令的潜在影响。
规则
有关文档规则的详细信息,请参阅 Cisco 技术提示规则。
配置寄存器的用途
配置寄存器可用于以多种方式更改路由器行为,例如:
注:如果波特率设置为与默认速率不同,CLI上将显示奇数字符。检查“通用平台参数”表以设置不同值的波特confreg
率。
配置寄存器可以在配置模式下使用config-register命令进行设置。从ROMmon执行confreg命令。发出show version命令查看配置寄存器的当前设置:
Router#show version
Cisco IOS XE Software, Version 16.10.01a
Cisco IOS Software [Gibraltar], ASR1000 Software (X86_64_LINUX_IOSD-UNIVERSALK9-M), Version 16.10.1a, RELEASE SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2018 by Cisco Systems, Inc.
Compiled Thu 29-Nov-18 03:47 by mcpre
Cisco IOS-XE software, Copyright (c) 2005-2018 by cisco Systems, Inc.
All rights reserved. Certain components of Cisco IOS-XE software are
licensed under the GNU General Public License ("GPL") Version 2.0. The
software code licensed under GPL Version 2.0 is free software that comes
with ABSOLUTELY NO WARRANTY. You can redistribute and/or modify such
GPL code under the terms of GPL Version 2.0. For more details, see the
documentation or "License Notice" file accompanying the Cisco IOS-XE software,
or the applicable URL provided on the flyer accompanying the Cisco IOS-XE
software.
ROM: IOS-XE ROMMON
Router uptime is 2 minutes
Uptime for this control processor is 5 minutes
System returned to ROM by Reload Command
System image file is "bootflash:asr1002x-universalk9.16.10.01a.SPA.bin"
Last reload reason: Reload Command
This product contains cryptographic features and is subject to United
States and local country laws governing import, export, transfer and
use. Delivery of Cisco cryptographic products does not imply
third-party authority to import, export, distribute or use encryption.
Importers, exporters, distributors and users are responsible for
compliance with U.S. and local country laws. By using this product you
agree to comply with applicable laws and regulations. If you are unable
to comply with U.S. and local laws, return this product immediately.
A summary of U.S. laws governing Cisco cryptographic products may be found at:
http://www.cisco.com/wwl/export/crypto/tool/stqrg.html
If you require further assistance please contact us by sending email to
export@cisco.com.
License Type: Smart License is permanent
License Suite: AdvUCSuiteK9
Next reload License Suite: AdvUCSuiteK9
The current throughput level is 10000000 kbps
Smart Licensing Status: UNREGISTERED/EVAL MODE
cisco ASR1002-X (2RU-X) processor (revision 2KP) with 1189381K/6147K bytes of memory.
Processor board ID FOX1719GE28
14 Gigabit Ethernet interfaces
1 Ten Gigabit Ethernet interface
32768K bytes of non-volatile configuration memory.
4194304K bytes of physical memory.
6684671K bytes of eUSB flash at bootflash:.
0K bytes of WebUI ODM Files at webui:.
Configuration register is 0x2102
配置寄存器的出厂默认设置是0x2102。这表示路由器必须尝试从闪存加载Cisco IOS®软件映像,并以控制台速度9600波特加载启动配置。
配置寄存器值及其意义
configreg
如果您知道配置寄存器的值,则可以确定其重要性。有关配置寄存器、潜在问题和修复的信息,请收集show version命令或show tech-support命令的输出,然后输入到Cisco CLI Analyzer工具。
注意:只有注册的思科用户才能访问内部工具和漏洞信息。
此表包含一些在大多数平台上有效的通用参数。
注意:在将路由器上的配置寄存器更改为下表中的值之一之前,请检查相应的硬件安装指南以验证配置寄存器是否可用。
平台通用参数
配置寄存器集 |
路由器工作情况 |
0x102 |
|
0x1202 |
|
0x2101 |
- 引导进入引导程序
- 忽略中断
- 如果初始引导失败,则引导进入 ROM
- 9600控制台波特率
|
0x2102 |
- 忽略中断
- 如果初始引导失败,则引导进入 ROM
- 9600 控制台波特率默认值(对于大多数平台)
|
0x2120 |
|
0x2122 |
- 忽略中断
- 如果初始引导失败,则引导进入 ROM
- 19200控制台波特率
|
0x2124 |
- NetBoot
- 忽略中断
- 如果初始引导失败,则引导进入 ROM
- 19200 控制台速率
|
0x2142 |
- 忽略中断
- 如果初始引导失败,则引导进入 ROM
- 9600控制台波特率
- 忽略非易失性 RAM (NVRAM) 的内容(忽略配置)
|
0x2902 |
- 忽略中断
- 如果初始引导失败,则引导进入 ROM
- 4800控制台波特率
|
0x2922 |
- 忽略中断
- 如果初始引导失败,则引导进入 ROM
- 38400控制台波特率
|
0x3122 |
- 忽略中断
- 如果初始引导失败,则引导进入 ROM
- 57600控制台波特率
|
0x3902 |
- 忽略中断
- 如果初始引导失败,则引导进入 ROM
- 2400控制台波特率
|
0x3922 |
- 忽略中断
- 如果初始引导失败,则引导进入 ROM
- 115200控制台波特率
|
注意:另请注意,配置寄存器0x2142用于密码恢复过程,因为它可以忽略NVRAM的内容。
如果已有的配置寄存器值不在表里,则确定为计算该值设置了哪些位:
位顺序值
位编号 |
十六进制 |
重要性 |
00-03 |
0x0000-0x000F |
引导字段参数:
|
06 |
0040 |
|
07 |
0080 |
|
08 |
0x0100 |
|
09 |
0x0200 |
|
10 |
0x0400 |
|
5,11,12 |
0x0020、0x0800、0x1000 |
|
13 |
0x2000 |
|
14 |
0x4000 |
|
15 |
0x8000 |
|
配置寄存器问题故障排除
未正确设置配置寄存器可能导致许多问题,如:
-
配置文件被忽略。
-
控制台无输出或垃圾输出。
-
引导至ROMmon。
将配置寄存器更改为适当的参数,例如出厂默认值为0x2102,以便解决这些问题。
未知配置寄存器值故障排除
如果配置寄存器值未知,则尝试与路由器建立 Telnet 或控制台会话。然后检查 show version 的输出,确定配置寄存器的值:
Router#show version
Cisco IOS XE Software, Version 16.10.01a
Cisco IOS Software [Gibraltar], ASR1000 Software (X86_64_LINUX_IOSD-UNIVERSALK9-M), Version 16.10.1a, RELEASE SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2018 by Cisco Systems, Inc.
Compiled Thu 29-Nov-18 03:47 by mcpre
Cisco IOS-XE software, Copyright (c) 2005-2018 by cisco Systems, Inc.
All rights reserved. Certain components of Cisco IOS-XE software are
licensed under the GNU General Public License ("GPL") Version 2.0. The
software code licensed under GPL Version 2.0 is free software that comes
with ABSOLUTELY NO WARRANTY. You can redistribute and/or modify such
GPL code under the terms of GPL Version 2.0. For more details, see the
documentation or "License Notice" file accompanying the Cisco IOS-XE software,
or the applicable URL provided on the flyer accompanying the Cisco IOS-XE
software.
ROM: IOS-XE ROMMON
Router uptime is 1 minute
Uptime for this control processor is 4 minutes
System returned to ROM by Reload Command
System image file is "bootflash:asr1002x-universalk9.16.10.01a.SPA.bin"
Last reload reason: Reload Command
This product contains cryptographic features and is subject to United
States and local country laws governing import, export, transfer and
use. Delivery of Cisco cryptographic products does not imply
third-party authority to import, export, distribute or use encryption.
Importers, exporters, distributors and users are responsible for
compliance with U.S. and local country laws. By using this product you
agree to comply with applicable laws and regulations. If you are unable
to comply with U.S. and local laws, return this product immediately.
A summary of U.S. laws governing Cisco cryptographic products may be found at:
http://www.cisco.com/wwl/export/crypto/tool/stqrg.html
If you require further assistance please contact us by sending email to
export@cisco.com.
License Type: Smart License is permanent
License Level: adventerprise
Next reload license Level: adventerprise
The current throughput level is 10000000 kbps
Smart Licensing Status: UNREGISTERED/EVAL MODE
cisco ASR1002-X (2RU-X) processor (revision 2KP) with 1189381K/6147K bytes of memory.
Processor board ID FOX1719GE28
14 Gigabit Ethernet interfaces
1 Ten Gigabit Ethernet interface
32768K bytes of non-volatile configuration memory.
4194304K bytes of physical memory.
6684671K bytes of eUSB flash at bootflash:.
0K bytes of WebUI ODM Files at webui:.
Configuration register is 0x2142
如果不能建立控制台会话,或者只能看到垃圾字符,则可能是由路由器与终端仿真软件的速率不匹配引起的。尝试更改终端仿真软件的波特率。可能的速率包括1200、2400、4800、9600、19200、38400、57600和115200。建立会话后,您可以发出show version命令来确定设置。如果路由器处于 ROMmon 模式,则可尝试发出 boot 命令,手动引导操作系统。
rommon 4 > boot bootflash:asr1002x-universalk9.16.10.01a.SPA.bin
有关配置寄存器集的重要性以及潜在问题和修复的信息,请收集show version命令或show tech-support命令的输出,然后输入到Cisco CLI Analyzer工具。
注意:只有注册的思科用户才能访问内部工具和漏洞信息。
排除已知配置寄存器值的故障
如果您知道配置寄存器的值,请查看“配置寄存器”表以确定行为。 如果能通过 Telnet 访问路由器,则与路由器建立会话。如果不是,将终端仿真程序设置为配置寄存器集所指示的波特率以建立控制台会话,其中9600波特率是默认值。
设置配置寄存器
查看配置寄存器表以确定所需的配置寄存器集(通常为0x2102)。
从配置模式设置配置寄存器
发出 config-register 命令设置配置寄存器:
Router#
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#config-register 0x2102
Router(config)#end
Router#show version
Cisco IOS XE Software, Version 16.10.01a
Cisco IOS Software [Gibraltar], ASR1000 Software (X86_64_LINUX_IOSD-UNIVERSALK9-M), Version 16.10.1a, RELEASE SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2018 by Cisco Systems, Inc.
Compiled Thu 29-Nov-18 03:47 by mcpre
Cisco IOS-XE software, Copyright (c) 2005-2018 by cisco Systems, Inc.
All rights reserved. Certain components of Cisco IOS-XE software are
licensed under the GNU General Public License ("GPL") Version 2.0. The
software code licensed under GPL Version 2.0 is free software that comes
with ABSOLUTELY NO WARRANTY. You can redistribute and/or modify such
GPL code under the terms of GPL Version 2.0. For more details, see the
documentation or "License Notice" file accompanying the Cisco IOS-XE software,
or the applicable URL provided on the flyer accompanying the Cisco IOS-XE
software.
ROM: IOS-XE ROMMON
Router uptime is 6 minutes
Uptime for this control processor is 9 minutes
System returned to ROM by Reload Command
System image file is "bootflash:asr1002x-universalk9.16.10.01a.SPA.bin"
Last reload reason: Reload Command
This product contains cryptographic features and is subject to United
States and local country laws governing import, export, transfer and
use. Delivery of Cisco cryptographic products does not imply
third-party authority to import, export, distribute or use encryption.
Importers, exporters, distributors and users are responsible for
compliance with U.S. and local country laws. By using this product you
agree to comply with applicable laws and regulations. If you are unable
to comply with U.S. and local laws, return this product immediately.
A summary of U.S. laws governing Cisco cryptographic products may be found at:
http://www.cisco.com/wwl/export/crypto/tool/stqrg.html
If you require further assistance please contact us by sending email to
export@cisco.com.
License Type: Smart License is permanent
License Level: adventerprise
Next reload license Level: adventerprise
The current throughput level is 10000000 kbps
Smart Licensing Status: UNREGISTERED/EVAL MODE
cisco ASR1002-X (2RU-X) processor (revision 2KP) with 1189381K/6147K bytes of memory.
Processor board ID FOX1719GE28
14 Gigabit Ethernet interfaces
1 Ten Gigabit Ethernet interface
32768K bytes of non-volatile configuration memory.
4194304K bytes of physical memory.
6684671K bytes of eUSB flash at bootflash:.
0K bytes of WebUI ODM Files at webui:.
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 设置配置寄存器
如果路由器处于 ROMmon 模式,则使用 confreg 命令设置配置寄存器:
rommon 1 >confreg 0x2102
要让新的配置寄存器生效,必须进行重置或为其重新通电。
相关信息