首页 > 代码库 > Cisco MDS9222i光纤交换机最常用排错命令
Cisco MDS9222i光纤交换机最常用排错命令
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光纤交换机最常用排错命令