簡介
本檔案介紹如何從開機載入器提示和開機模式復原多層資料中心交換器(MDS)。
必要條件
需求
思科建議您瞭解以下主題:
- MDS9000 CLI配置命令
- 如何設定與MDS交換機的控制檯連線。
- 如何透過管理埠將MDS交換機設定或連線到網路。
- 熟悉TFTP。
採用元件
本檔案中的資訊是根據軟體需求版本6.2(9)及更新版本。 本文檔使用的是支援12到48個線速16 Gbps光纖通道埠的MDS9148S交換機,交換機名稱是tempest。
本文中的資訊是根據特定實驗室環境內的裝置所建立。文中使用到的所有裝置皆從已清除(預設)的組態來啟動。如果您的網路運作中,請確保您瞭解任何指令可能造成的影響。
背景資訊
為了正常運作,MDS交換器需要有效且未損毀的Kickstart和系統映像才能完全啟動。無效、損毀或遺失Kickstart影像,導致交換器無法開機,並在開機載入程式提示時停止。具有有效Kickstart映像,但系統映像無效或丟失的交換機最終處於引導模式。
交換機啟動順序
BIOS > Loader > Kickstart Image > System Image
- 基本輸入輸出系統(BIOS)會載入載入載入器。
- 載入器將啟動映像載入到RAM中並啟動啟動映像。
- 啟動映像載入並啟動系統映像。
- 系統映像讀取啟動配置檔案。
交換機提示
Phase |
提示 |
說明 |
BIOS |
不可開機 |
BIOS會開始開機自我測試和記憶體測試。 |
載入器 |
載入器> |
開機載入器解壓縮載入的軟體,以啟動開機映像。 Ctrl + C (Control Key和C Key)進入引導載入程式提示符。 |
啟動 |
switch(boot)# |
當引導載入程式階段結束時,按Ctrl + ](Control鍵和右括弧鍵)進入引導模式。 |
系統 |
登入: |
系統映像載入啟動配置檔案並返回交換機登入提示。 |
復原程式
從交換機控制檯會話。
載入器>
步驟 1.下載交換機的Kickstart和System映像,並將其放入TFTP伺服器目錄中。
在本例中,TFTP伺服器IP地址為10.104.204.100。
步驟 2.配置交換機管理IP地址、子網掩碼及其預設網關。
Check config options in loader prompt using help option
loader> help
help - print online help
boot - Boot image
cmdline - <arguments>
dir - List Directory
help - print online help
network - Set network communication settings
reload - Reboot the board.
serial - Set serial console settings
show - Show loader configuration
loader> net --ip=10.66.78.80 --nm=255.255.255.128 --gw=10.66.78.4
在此範例中:
- 交換機介面mgmt0 IP地址為10.66.78.80 255.255.255.128
- 交換機預設網關IP地址為10.66.78.4
或
載入器提示中的IP指派語法,會因交換器硬體型號而稍有不同。
此處列出的示例適用於T&V系列交換矩陣交換機。
loader> set ip 10.66.78.80 255.255.255.128
loader> set gw 10.66.78.4
註:如果這是首次啟動交換機(對於RMA交換機),或者交換機已經過write erase boot,則需要執行步驟2配置。
步驟 3.引導位於TFTP伺服器目錄中的Kickstart映像,以使交換機進入引導模式。
loader> boot tftp://10.104.204.100/m9100-s5ek9-kickstart-mz.8.3.1.bin
eTSEC2: Speed 1000, full duplex
Using eTSEC2 device
TFTP from server 10.104.204.100; our IP address is 10.66.78.80; sending through gateway 10.66.78.4
Filename 'm9100-s5ek9-kickstart-mz.8.3.1.bin'.
Load address: 0x8000000
Loading: *#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#######
done
Bytes transferred = 26027008 (18d2400 hex)
NBI at 08000000 size 26027008
Booting image at addr 0x00800000 ...
Memory <- <0x0 0x0 0x1 0x0> (4096MB)
ethernet0: local-mac-address <- 10:05:ca:b6:c5:a0
ethernet1: local-mac-address <- 00:e0:0c:00:01:fd
ethernet2: local-mac-address <- 00:e0:0c:00:02:fd
CPU clock-frequency <- 0x3f941f80 (1067MHz)
CPU timebase-frequency <- 0x3f941f8 (67MHz)
CPU bus-frequency <- 0x1fca0fc0 (533MHz)
zImage starting: loaded at 0x00800000 (sp: 0x7fedc620)
Allocating 0x620d88 bytes for kernel ...
gunzipping (0x00000000 <- 0x00817000:0x00de3838)...done 0x5bc060 bytes
Using loader supplied ramdisk at 0x2800000-0x3de8e00
initrd head: 0x1f8b0808
Linux/PowerPC load: rw root=/dev/ram0 rdbase=0x7000000 card_index=9046 maxcpus=2 ip=off ramdisk_size=262144 noquiet obfl_type_ide=1 kgdboc=ttyS0,9600,B console=ttyS0,9600n8nn loader_ver="02.01.17" card_index=9046 quiet bootdev=mgmt0 server_ip=64.104.204.100 ksimg=m9100-s5ek9-kickstart-mz.8.3.1.bin isanimg= Finalizing device tree... flat tree at 0xdf0140
Ísetup_arch: bootmem
mpc85xx_ds_setup_arch()
arch: exit
[ 0.060378] Host controller irq 26
[ 0.103390] Assign root port irq 26
[ 0.144046] Host controller irq 24
[ 0.193691] Assign root port irq 24
[ 0.810630] physmap-flash physmap-flash.0: Could not reserve memory region
[ 1.084751] Enabling all PCI devices
INIT: Checking all filesystems..r.r.r.retval=[1]
r done
WARNING: Image sync is going to be disabled after a loader netboot.
Loading system software
No system image is specified
/etc/init.d/functions: li
INIT: Sending processes the KILL signal
Cisco Nexus Operating System (NX-OS) Software
TAC support: http://www.cisco.com/tac
Copyright (c) 2002-2018, Cisco Systems, Inc. All rights reserved.
The copyrights to certain works contained in this software are
owned by other third parties and used and distributed under
license. Certain components of this software are licensed under
the GNU General Public License (GPL) version 2.0 or the GNU
Lesser General Public License (LGPL) Version 2.1. A copy of each
such license is available at
http://www.opensource.org/licenses/gpl-2.0.php and
http://www.opensource.org/licenses/lgpl-2.1.php
switch(boot)#
步驟 4.從引導模式恢復交換機。
1. 檢查交換機引導提示符中的IP配置。
switch(boot)# sh ip
ip routing is disabled
Management Interface: ip address 10.66.78.80/25
ip default-gateway 10.66.78.4
如果找不到IP配置,則再次配置介面管理IP地址和預設網關IP地址,如下所示。
switch(boot)# config t
Enter configuration commands, one per line. End with CNTL/Z.
switch(boot)(config)# interface mgmt 0
switch(boot)(config-if)# ip address 10.66.78.80 255.255.255.128
switch(boot)(config-if)# no shut
switch(boot)(config-if)# exit
switch(boot)(config)# ip default-gateway 10.66.78.4
switch(boot)(config)# exit
-
測試TFTP伺服器和交換機之間的IP連線(載入程式提示符中沒有ping響應)。
從TFTP伺服器ping交換機管理IP地址。
C:\Users\mpandika> ping 10.66.78.80
Pinging 10.66.78.80 with 32 bytes of data:
Reply from 10.66.78.80: bytes=32 time=2ms TTL=60
Reply from 10.66.78.80: bytes=32 time=3ms TTL=60
Reply from 10.66.78.80: bytes=32 time=3ms TTL=60
Reply from 10.66.78.80: bytes=32 time=3ms TTL=60
Ping statistics for 10.66.78.80:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 2ms, Maximum = 3ms, Average = 2ms
C:\Users\mpandika>
- 將Kickstart和System映像從TFTP伺服器下載到交換機的bootflash中。
switch(boot)# copy tftp://10.104.204.100/m9100-s5ek9-kickstart-mz.8.3.1.bin bootflash:
Trying to connect to tftp server......
Connection to server Established. Copying Started.....
TFTP get operation was successful
Copy complete, now saving to disk (please wait)...
switch(boot)#
switch(boot)#copy tftp://10.104.204.100/m9100-s5ek9-mz.8.3.1.bin bootflash:
Trying to connect to tftp server......
Connection to server Established. Copying Started.....
TFTP get operation was successful
Copy complete, now saving to disk (please wait)...
switch(boot)#
4. 驗證Kickstart和System映像是否已成功下載到交換機的bootflash中。
switch(boot)# dir bootflash:
4096 Dec 22 2002 01:38:31 .partner/
297 Nov 09 2017 07:18:54 MDS201711091818530370.lic
297 Nov 09 2017 07:28:42 MDS201711091828418770.lic
4096 Jul 23 2018 14:44:25 lost+found/
26027008 Aug 08 2018 02:55:31 m9100-s5ek9-kickstart-mz.8.3.1.bin
109635731 Aug 08 2018 02:53:38 m9100-s5ek9-mz.8.3.1.bin
3430222 Feb 01 2000 02:31:30 moonlake.1.f.xsvf
23467 Jul 30 2018 12:40:56 mts.log
347607 Jul 28 2017 04:46:31 portchannel
4096 Dec 22 2002 02:38:54 scripts/
31812 Jun 30 2018 05:07:27 snmp.pcap
Usage for bootflash: filesystem
1264746496 bytes used
2106781696 bytes free
3371528192 bytes total
switch(boot)#
5. 載入系統影像。
switch(boot)# load bootflash:m9100-s5ek9-mz.8.3.1.bin
Uncompressing system image: bootflash:/m9100-s5ek9-mz.8.3.1.bin
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
Load plugins that defined in image conf: /isan/plugin_img/img.conf
No Patching support on this platform
Loading plugin 0: core_plugin...
No Patching support on this platform
Enter pboot_chk_compatibility
num srgs 1
0: swid-core-s5ek9m, swid-core-s5ek9m
num srgs 1
0: swid-sup-mini-ks, swid-sup-mini-ks
INIT: Switching to runlevel: 3
INIT: Sending processes the TERM signal
switch(boot)#
INIT:
2018 Aug 8 03:13:03 %SYSLOG-2-SYSTEM_MSG : Syslogs wont be logged into logflash until logflash is online
2018 Aug 8 03:13:06 %KERN-0-SYSTEM_MSG: [ 1.084751] Enabling all PCI devices - kernel
2018 Aug 8 03:14:13 switch %CARDCLIENT-2-REG: OK
System is coming up ... Please wait ...
System is coming up ... Please wait ...
2018 Aug 8 03:14:22 switch %ASCII-CFG-2-CONFIG_REPLAY_STATUS: Bootstrap Replay Started.
System is coming up ... Please wait ...
User Access Verification
10.66.78.80 login: 2018 Aug 8 03:14:41 switch %ASCII-CFG-2-CONFIG_REPLAY_STATUS: Bootstrap Replay Done.
2018 Aug 8 03:14:44 switch %PMON-SLOT1-2-PMON_CRIT_INFO: Port Monitor Critical Information: Config download success .
2018 Aug 8 03:14:45 switch %ASCII-CFG-2-CONFIG_REPLAY_STATUS: Ascii Replay Started.
2018 Aug 8 03:14:45 switch %PMON-SLOT1-2-PMON_CRIT_INFO: Port Monitor Critical Information: Policy (slowdrain) activation is successfull .
2018 Aug 8 03:14:46 switch %PLATFORM-2-PS_OK: Power supply 1 ok(Serial number QCS18242L8D)
2018 Aug 8 03:14:46 switch %PLATFORM-2-PS_FANOK: Fan in Power supply 1 ok
2018 Aug 8 03:14:46 switch %PLATFORM-2-PS_FAIL: Power supply 2 failed or shut down(Serial number QCS18242L0H)
2018 Aug 8 03:14:46 switch %PLATFORM-2-FAN_OK: Fan module ok
2018 Aug 8 03:14:46 switch %PLATFORM-2-FAN_OK: Fan module ok
2018 Aug 8 03:14:46 switch %PLATFORM-2-FAN_OK: Fan module ok
2018 Aug 8 03:14:46 switch %PLATFORM-2-FAN_OK: Fan module ok
2018 Aug 8 14:15:35 tempest %ASCII-CFG-2-CONFIG_REPLAY_STATUS: Ascii Replay Done.
User Access Verification
tempest login:
註:交換機以前配置有switchname tempest。
6. 登入交換機。
tempest login: admin
Password:
Last login: Wed Aug 8 14:20:01 on pts/0
Cisco Nexus Operating System (NX-OS) Software
TAC support: http://www.cisco.com/tac
Copyright (c) 2002-2018, Cisco Systems, Inc. All rights reserved.
The copyrights to certain works contained in this software are
owned by other third parties and used and distributed under
license. Certain components of this software are licensed under
the GNU General Public License (GPL) version 2.0 or the GNU
Lesser General Public License (LGPL) Version 2.1. A copy of each
such license is available at
http://www.opensource.org/licenses/gpl-2.0.php and
http://www.opensource.org/licenses/lgpl-2.1.php
tempest#
7. 驗證引導變數。
tempest# show boot
Current Boot Variables:
kickstart variable = bootflash:/m9100-s5ek9-kickstart-mz.8.1.1.bin
system variable = bootflash:/m9100-s5ek9-mz.8.1.1.bin
Boot POAP Disabled
No module boot variable set
Boot Variables on next reload:
kickstart variable = bootflash:/m9100-s5ek9-kickstart-mz.8.1.1.bin
system variable = bootflash:/m9100-s5ek9-mz.8.1.1.bin
Boot POAP Disabled
No module boot variable set
tempest#
8. 將啟動變數設定為正確的映像。
tempest# show version
Cisco Nexus Operating System (NX-OS) Software
TAC support: http://www.cisco.com/tac
Documents: http://www.cisco.com/en/US/products/ps9372/tsd_products_support_series_home.html
Copyright (c) 2002-2018, Cisco Systems, Inc. All rights reserved.
The copyrights to certain works contained herein are owned by
other third parties and are used and distributed under license.
Some parts of this software are covered under the GNU Public
License. A copy of the license is available at
http://www.gnu.org/licenses/gpl.html.
Software
BIOS: version 2.1.17
loader: version N/A
kickstart: version 8.3(1)
system: version 8.3(1)
BIOS compile time: 01/08/14
system image file is: bootflash:///m9100-s5ek9-mz.8.3.1.bin
system compile time: 7/30/2018 12:00:00 [07/12/2018 19:32:46]
Hardware
cisco MDS 9148S 16G 48 FC (1 Slot) Chassis ("2/4/8/16 Gbps FC/Supervisor")
Motorola, e500v2 with 4088556 kB of memory.
Processor Board ID JAE18250A8C
Device name: tempest
bootflash: 4018896 kB
Kernel uptime is 0 day(s), 0 hour(s), 47 minute(s), 44 second(s)
Last reset at 362296 usecs after Wed Aug 8 13:02:31 2018
Reason: Reset Requested by CLI command reload
System version: 8.1(1)
Service:
plugin
Core Plugin
tempest# config t
Enter configuration commands, one per line. End with CNTL/Z.
tempest(config)# boot kickstart bootflash:m9100-s5ek9-kickstart-mz.8.3.1.bin
Performing image verification and compatibility check, please wait....
tempest(config)# boot system bootflash:m9100-s5ek9-mz.8.3.1.bin
Performing image verification and compatibility check, please wait....
tempest(config)#
9. 驗證設定的啟動變數。
tempest# show boot
Current Boot Variables:
kickstart variable = bootflash:/m9100-s5ek9-kickstart-mz.8.3.1.bin
system variable = bootflash:/m9100-s5ek9-mz.8.3.1.bin
Boot POAP Disabled
No module boot variable set
Boot Variables on next reload:
kickstart variable = bootflash:/m9100-s5ek9-kickstart-mz.8.1.1.bin
system variable = bootflash:/m9100-s5ek9-mz.8.1.1.bin
Boot POAP Disabled
No module boot variable set
10. 儲存交換機的運行配置。
tempest# copy running-config startup-config
[########################################] 100%
Copy complete.
tempest#
11. 驗證copy running-config startup-config後設定引導變數。
tempest# show boot
Current Boot Variables:
kickstart variable = bootflash:/m9100-s5ek9-kickstart-mz.8.3.1.bin
system variable = bootflash:/m9100-s5ek9-mz.8.3.1.bin
Boot POAP Disabled
No module boot variable set
Boot Variables on next reload:
kickstart variable = bootflash:/m9100-s5ek9-kickstart-mz.8.3.1.bin
system variable = bootflash:/m9100-s5ek9-mz.8.3.1.bin
Boot POAP Disabled
No module boot variable set