今天接到一個朋友電話,說新購的思科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的內容、啓動缺省文件;