1. 程式人生 > >Cisco MDS9222i光纖交換機最常用排錯命令

Cisco MDS9222i光纖交換機最常用排錯命令

minutes 一次 byte size pro vsa status tar iso

Cisco MDS9222i光纖交換機最常用排錯命令

1.檢查交換機端口

Show interface [interface-range]

查看指定端口運行狀態,WWN信息,配置參數,收發包統計信息。

示範:

MDS9222i-1# show interface fc1/1
fc1/1 is trunking -端口fc1/1運行狀態正常,是一個TE端口
Hardware is Fibre Channel, SFP is short wave laser w/o OFC (SN) -端口、SFP硬件信息
Port WWN is 20:01:00:05:73:ad:2a:00 -交換機端口WWN
Peer port WWN is 20:01:00:05:73:ad:26:00 -對端WWN
Admin port mode is auto, trunk mode is on -端口模式配置是自適應,開啟trunk
snmp link state traps are enabled -啟用snmp鏈路狀態變更告警
Port mode is TE -端口運行模式是TE
Port vsan is 4 -端口vsan號
Speed is 4 Gbps -端口運行速率
Rate mode is dedicated -帶寬模式是dedicated
Transmit B2B Credit is 250 -發送buffer是250
Receive B2B Credit is 250 -接受buffer是250
B2B State Change Number is 14 -b2b變更關聯的SCR號是14
Receive data field Size is 2112 -最大數據幀大小2112
Beacon is turned off -Beacon功能關閉
Belongs to port-channel 1 -端口屬於port-channel 1
Trunk vsans (admin allowed and active) (4) -trunk vsan是4
Trunk vsans (up) (4)
Trunk vsans (isolated) ()
Trunk vsans (initializing) ()
5 minutes input rate 0 bits/sec, 0 bytes/sec, 0 frames/sec -5分鐘收包統計信息
5 minutes output rate 0 bits/sec, 0 bytes/sec, 0 frames/sec -5分鐘發包統計信息
7468 frames input, 517940 bytes -總體收包統計信息,沒有報錯。
0 discards, 0 errors
0 CRC, 0 unknown class
0 too long, 0 too short
9141 frames output, 380372 bytes -總體發包統計,存在丟包現象。
3210 discards, 0 errors
330 input OLS, 240 LRR, 36 NOS, 57 loop inits -Primitive幀統計信息
340 output OLS, 271 LRR, 156 NOS, 19 loop inits
250 receive B2B credit remaining -b2b buffer信息
250 transmit B2B credit remaining
235 low priority transmit B2B credit remaining
Interface last changed at Fri Sep 7 10:59:02 2012 -端口狀態最後一次變更時間。

2. 檢查交換機所有端口運行狀態
show interface brief
Interface -端口名稱
Vsan -端口vsan號
Admin Mode -端口配置模式
Admin Trunk mode -端口是否配置trunk
Status -端口狀態
SFP Mode -sfp模塊信息
Oper Speed -運行速率
Port Channel -port channel號碼

示範

MDS9222i-1# show interface brief

-------------------------------------------------------------------------------
Interface Vsan Admin Admin Status SFP Oper Oper Port
Mode Trunk Mode Speed Channel
Mode (Gbps)
-------------------------------------------------------------------------------
fc1/1 4 auto on trunking swl TE 4 1
fc1/2 1 FX on notConnected swl -- --
fc1/3 1 FX on up swl F 4 --
fc1/4 4094 FX on down swl -- --
fc1/5 1 FX on notConnected swl -- --
fc1/6 1 FX on init swl -- --
fc1/7 4 auto on trunking swl TE 4 1
fc1/8 1 FX on notConnected swl -- --
fc1/9 1 FX on notConnected swl -- --
fc1/10 4094 FX on inactive swl -- --
fc1/11 1 FX on notConnected swl -- --
fc1/12 1 FX on sfpAbsent -- -- --
fc1/13 1 FX on notConnected swl -- --
fc1/14 1 FX on notConnected swl -- --
fc1/15 1 FX on notConnected swl -- --
fc1/16 1 FX on notConnected swl -- --
fc1/17 1 FX on notConnected swl -- --
fc1/18 1 FX on notConnected swl -- --

-------------------------------------------------------------------------------
Interface Status Speed
(Gbps)
-------------------------------------------------------------------------------
sup-fc0 up 1

-------------------------------------------------------------------------------
Interface Status IP Address Speed MTU

-------------------------------------------------------------------------------
vsan1 up -- 1 Gbps 1500
vsan2 up -- 1 Gbps 1500
vsan3 up -- 1 Gbps 1500

3.fcping

fcping類似於以太網的ping命令,可以使用fcping fcid檢測交換機到指定端口的鏈路通信狀態,並且可以得到鏈路延時信息。

示範:

MDS9222i-1# fcping fcid 0x7500ef vsan 1 count 4 -fcping執行4次,對象是0x7500ef,vsan 1
28 bytes from 0x7500ef time = 1283 usec
28 bytes from 0x7500ef time = 1256 usec
28 bytes from 0x7500ef time = 1256 usec
28 bytes from 0x7500ef time = 1243 usec

4 frames sent, 4 frames received, 0 timeouts

Round-trip min/avg/max = 1243/1259/1283 usec -最小延時1243u秒,平均延時1259u秒,最大延時1283u秒。

4.檢查交換機狀態

show environment [clock|power|fan|temperature]命令查看交換機clock、電源、風扇、溫度傳感器這些模塊的運行狀態。show environment後面可以接一個參數,用於查看指定模塊的狀態。

示範:

MDS9222i-1# show environment
Clock: -始終模塊。每個交換機有兩個,一個active,一個standby。兩個狀態都是正常。
----------------------------------------------------------
Clock Model Hw Status
----------------------------------------------------------
A 0.0 Ok/Active
B 0.0 Ok/Standby

Fan: -風扇模塊正常。一個三個風扇,一個交換機自帶,另外兩個有電源模塊提供,一個電源模塊自帶一個風扇。
------------------------------------------------------
Fan Model Hw Status
------------------------------------------------------
ChassisFan1 DS-2SLOT-FAN 4.0 Ok
Fan_in_PS1 -- -- Ok
Fan_in_PS2 -- -- Ok
Fan Air Filter : NotSupported

Temperature: -進風口和出風口溫度。
--------------------------------------------------------------------
Module Sensor MajorThresh MinorThres CurTemp Status
(Celsius) (Celsius) (Celsius)
--------------------------------------------------------------------
1 Outlet1 75 60 38 Ok
1 Outlet2 75 65 45 Ok
1 Intake1 65 50 27 Ok

Power Supply: -電源正常。電壓42V,一共兩個電源模塊,每個提供800w功率,每個現使用掉19.05w。
Voltage: 42 Volts
-----------------------------------------------------
PS Model Power Power Status
(Watts) (Amp)
-----------------------------------------------------
1 DS-CAC-845W 800.10 19.05 Ok
2 DS-CAC-845W 800.10 19.05 Ok

5.查看交換機整體信息,包括微碼版本和配置信息,各個模塊的硬件參數和序列號,以及運行狀態。

示範:

MDS9222i-1# show hardware |less
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-2010, 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 1.0.19 -BIOS版本
loader: version N/A
kickstart: version 5.0(4b) -kickstart版本
system: version 5.0(4b) -微碼版本,正常和kickstart版本相同
BIOS compile time: 02/01/10
kickstart image file is: bootflash:/m9200-s2ek9-kickstart-mz.5.0.4b.bin -kickstart文件路徑
kickstart compile time: 11/16/2010 23:00:00 [01/13/2011 15:06:13]
system image file is: bootflash:/m9200-s2ek9-mz.5.0.4b.bin -微碼文件路徑。這兩個image文件機器啟動必須用到。
system compile time: 11/16/2010 23:00:00 [01/13/2011 16:19:01]

Hardware -交換機型號
cisco MDS 9222i ("4x1GE IPS, 18x1/2/4Gbps FC/Sup2")
Motorola, e500v2 with 1036300 kB of memory.
Processor Board ID JAF1446AQAJ

Device name: MDS9222i-1 -交換機名字
bootflash: 1023120 kB
Kernel uptime is 13 day(s), 19 hour(s), 45 minute(s), 45 second(s) -交換機啟動時間

Last reset
Reason: Unknown
System version:
Service:
--------------------------------
Switch hardware ID information
--------------------------------
Switch is booted up
Switch type is : MDS 9222i
Model number is DS-C9222I-K9
H/W version is 1.1
Part Number is 73-11019-01 -交換機part number
Part Revision is B0
Manufacture Date is Year 14 Week 38
Serial number is FOX1438GH5A -交換機序列號
CLEI code is COM9310ARA
--------------------------------
Chassis has 2 Module slots
--------------------------------

Module1 ok
Module type is : 4x1GE IPS, 18x1/2/4Gbps FC/Sup2
0 submodules are present
Model number is DS-X9222I-K9
H/W version is 1.5
Part Number is 73-11018-09
Part Revision is A0
Manufacture Date is Year 14 Week 46
Serial number is JAF1446AQAJ
CLEI code is COUIAMCCAE

Module2 empty

---------------------------------------
Chassis has 2 PowerSupply Slots -電源模塊信息
---------------------------------------
PS1 ok
Power supply type is: 800.10W 110v AC
Model number is DS-CAC-845W
H/W version is 1.2
Part Number is 341-0052-03
Part Revision is B0
Manufacture Date is Year 14 Week 47
Serial number is QCS144710PL
CLEI code is CNUPAA8AAA

PS2 ok
Power supply type is: 800.10W 110v AC
Model number is DS-CAC-845W
H/W version is 1.2
Part Number is 341-0052-03
Part Revision is B0
Manufacture Date is Year 14 Week 47
Serial number is QCS144710RJ
CLEI code is CNUPAA8AAA
----------------------------------
Chassis has 1 Fan slots
----------------------------------
Fan1 ok
Model number is DS-2SLOT-FAN
H/W version is 4.0
Part Number is 800-24478-02
Part Revision is B0
Manufacture Date is Year 14 Week 31
Serial number is DCH143100S5
CLEI code is CNUQABBAAC

-----------------------------------------
Chassis has 1 Interface slot
-----------------------------------------
Interface module ok
Model number is DS-X9222-MGT
H/W version is 1.0
Part Number is 73-11488-02
Part Revision is A0
Manufacture Date is Year 14 Week 44
Serial number is JAF1444BJMQ
CLEI code is 0

6.檢查交換機日誌

show logging [logfile|nvram] 查看交換機日誌信息,可以查看日誌文件內容,或者nvram裏面的日誌信息。

7.檢查zone

show zoneset [active|vsan]

查看zoneset信息,可以是當前生效zone或者是制定vsan的zone信息。

8.檢查flogi

show flogi database

查看所有設備flogi信息。

MDS9222i-1# show flogi database
--------------------------------------------------------------------------------
INTERFACE VSAN FCID PORT NAME NODE NAME
--------------------------------------------------------------------------------
fc1/3 1 0x7500ef 50:06:01:64:3c:e0:32:e7 50:06:01:60:bc:e0:32:e7
sup-fc0 1 0x750000 10:00:00:05:73:ad:2a:01 20:00:00:05:73:ad:2a:00
sup-fc0 2 0x0a0000 10:00:00:05:73:ad:2a:01 20:00:00:05:73:ad:2a:00
sup-fc0 3 0x8b0000 10:00:00:05:73:ad:2a:01 20:00:00:05:73:ad:2a:00
sup-fc0 4 0xc00000 10:00:00:05:73:ad:2a:01 20:00:00:05:73:ad:2a:00

每行包含接口,VSAN,FCID,端口WWN,節點WWN信息。Fc代表光纖口,sup-fc0代表帶內管理接口,每個VSAN一個。

9.檢查name server

show fcns database [vsan number]

查看所有設備的plogi信息。

MDS9222i-1# show fcns database vsan 1

VSAN 1:
--------------------------------------------------------------------------
FCID TYPE PWWN (VENDOR) FC4-TYPE:FEATURE
--------------------------------------------------------------------------
0x750000 N 10:00:00:05:73:ad:2a:01 (Cisco) ipfc
0x7500ef N 50:06:01:64:3c:e0:32:e7 (Clariion) scsi-fcp:target

VSAN 1一共包含2條name server信息。0X750000是Cisco用於交換機帶內管理; 0x7500ef是一個Clariion存儲的前端端口。

10.重置端口

shutdown -禁用端口
no shutdown -啟用端口

Cisco MDS9222i光纖交換機最常用排錯命令