今天接到一个朋友电话,说新购的思科4507的交换机断电后配置丢失,他说以前没出现过,他联系了思科的tech,tech的一向要求就是:sh tech 把结果发给他们。html
恰好这位仁兄不懂思科的产品,让我帮忙把这个数据show发给他们。redis
我登陆上去看了一下:bootstrap
Cisco4507#sh ver
Cisco IOS Software, IOS-XE Software, Catalyst 4500 L3 Switch Software (cat4500e-UNIVERSAL-M), Version 03.07.03.E RELEASE SOFTWARE (fc3)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2016 by Cisco Systems, Inc.
Compiled Thu 14-Jan-16 11:12 by prod_rel_team网络
Cisco IOS-XE software, Copyright (c) 2005-2015 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.
(http://www.gnu.org/licenses/gpl-2.0.html) For more details, see the
documentation or "License Notice" file accompanying the IOS-XE software,
or the applicable URL provided on the flyer accompanying the IOS-XE
software.app
ROM: 15.0(1r)SG10
Cisco4507 uptime is 1 week, 6 days, 12 hours, 4 minutes
Uptime for this control processor is 1 week, 6 days, 12 hours, 7 minutes
System returned to ROM by power-on
Running default software
Jawa Revision 7, Winter Revision 0x0.0x41ide
Last reload reason: power-onthis
License Information for 'WS-X45-SUP7L-E'
License Level: lanbase Type: Permanent
Next reboot license Level: lanbasespa
cisco WS-C4507R+E (MPC8572) processor (revision 6) with 2097152K bytes of physical memory.
Processor board ID FXS2105Q0M6
MPC8572 CPU at 1.5GHz, Supervisor 7L-E
Last reset from PowerUp
3 Virtual Ethernet interfaces
112 Gigabit Ethernet interfaces
2 Ten Gigabit Ethernet interfaces
511K bytes of non-volatile configuration memory.code
Configuration register is 0x2141
component
发现他们寄存器的值为0x2141, 一看就不对,随手就改了0x2102
Cisco4507#
Cisco4507#conf t
Enter configuration commands, one per line. End with CNTL/Z
Cisco4507(config)#config-register 0x2102
Cisco4507(config)#exit
Cisco4507#wr
保存后,下次启动就变为0x2102了。
Configuration register is 0x2141 (will be 0x2102 at next reload)
让他重启一下,发现正常了,就是寄存器配置错误引发的,其实不少时间故障就是这么简单。
下面简单普及下思科寄存器值码:
思科路由器的寄存器值由16个比特位组成,从左到右依次为15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0。下面详细解释每一个比特位的意义。一、0-3位的比特位:启动域。它分三种可能。第一种全0,即0000 0000 00000000,用16进制表示就是0x0000,表示启动时停在system bootstrap 提示符下;第二种第0位为1,其余位为0,即00000000 0000 0001,用16进制表示就是0x0001,表示启动onboot flashmemory中的第一个镜像;第三种为第1位为1,其余位任意,即0000 0000 0000 0000xx1x(x为0或1),用16进制表示就是0x0002-0x000F,表示启动缺省文件。二、6位的比特位:当它为1时,即0000 0000 0100 0000,用16进制表示就是0x0040,表示系统忽略NVRAM的内容。三、7位的比特位:当它为1时,即0000 0000 1000 0000,用16进制表示就是0x0080,表示打开OEM bit位打开。四、8位的比特位:当它为1时,即0000 0001 0000 0000,用16进制表示就是0x0100,表示关闭Break。五、9位的比特位:当它为1时,即0000 0010 0000 0000,用16进制表示就是0x0200,表示使用第二个bootstrap。六、10位的比特位:当它为1时,即0000 0100 0000 0000,用16进制表示就是0x0400,表示使用全0进行IP广播。七、11位及12的比特位:规定console口的比特率,缺省为全0,即0000 0000 00000000,用16进制表示就是0x0000,表示9600bit;其余值分别是0000 1000 0000 0000,0001 0000 00000000,0001 1000 00000000,用16进制表示就是0x0800,0x1000,0x1800,表示另外三种比特率。大概是2400bit,4800bit,1200bit。具体怎么对应我忘了,知道的朋友能够补充。八、13位的比特位:当它为1时,即0010 0000 0000 0000,用16进制表示就是0x2000,表示若是网启动失败就启动缺省的Flash软件。九、14位的比特位:当它为1时,即0100 0000 0000 0000,用16进制表示就是0x4000,表示IP广播没有网络号。十、15位的比特位:当它为1时,即1000 0000 0000 0000,用16进制表示就是0x8000,表示启用诊断信息并忽略NVRAM内容。 如今举几个例子: 1、0x2102,表示13位、8位、1位的比特位被设成了1,其它为0,查阅上面的解释,它的意思就是若是网络启动失败就启动缺省的Flash软件、关闭Break、启动缺省文件; 2、0x2142,表示13位,8位、6位、1位的比特位被设成了1,其它为0,查阅上面的解释,它的意思就是若是网络启动失败就启动缺省的Flash软件、关闭Break、忽略NVRAM的内容、启动缺省文件;