IBM的雙機雙櫃,兩光纖交換機分別引一根光纖到另外一樓光纖交換機,插上無反應,後得知須要更改交換機的domain id 默認出廠爲1。需改成不一樣號。下面是博科的交換機命令轉。http://maka113.blog.163.com/blog/static/12110329720129254116675/服務器
Brocade SAN交換機經常使用命令dom
使用電腦鏈接管理網口,默認IP地址爲:192.168.0.1,掩碼:255.255.255.0ssh
默認用戶名:admin,默認密碼passwordide
1. switchStatusShowoop
查看交換機的整體健康狀態ui
switch:admin> switchstatusshowspa Switch Health Report日誌 Switch Name: SWFCRorm IP address: 10.33.54.176router SwitchState: MARGINAL Duration: 863:23 Power supplies monitor MARGINAL Temperatures monitor HEALTHY Fans monitor HEALTHY WWN servers monitor HEALTHY Standby CP monitor HEALTHY Blades monitor HEALTHY Flash monitor HEALTHY Marginal ports monitor HEALTHY Faulty ports monitor HEALTHY Missing SFPs monitor HEALTHY All ports are healthy switch:admin> |
2. switchShow
查看交換機基本配置信息
Enter the switchShow command, which displays the following information for a switch: - switchname - The switch name. - switchtype - The switch model and firmware version numbers. - switchstate - The switch state: Online, Offline, Testing, or Faulty. - switchrole - Displays the switch role: Principal, Subordinate, or Disabled. - switchdomain - Displays the switch Domain ID. - switchid - The embedded port D_ID of the switch. - switchwwn - The switch World Wide Name. - switchbeacon - The switch beaconing state: either ON or OFF. The switchShow command also displays the following information for ports on the specified switch: - Module type - The SFP type if an SFP is present. - Port speed - The speed of the Port (1G, 2G, 4G, N1, N2, N4, or AN). The speed can be fixed, negotiated, or auto-negotiated. - Port state - The port status. - Comment - About the port. This section may be blank or display the WWN for an F_Port or an E_Port, the trunking state, or upstream or downstream status |
3. portShow
查看端口狀態
switch:admin> switch:user> portshow 0 portName: portHealth: OFFLINE Authentication: None portDisableReason: None portCFlags: 0x1 portFlags: 0x4001 PRESENT U_PORT LED portType: 4.1 portState: 2 Offline portPhys: 2 No_Module portScn: 0 port generation number: 0 portId: 010000 portIfId: 43020020 portWwn: 20:00:00:60:69:00:02:53 portWwn of device(s) connected: Distance: normal portSpeed: N2Gbps LE domain: 0 Interrupts: 0 Link_failure: 0 Frjt: 0 Unknown: 0 Loss_of_sync: 0 Fbsy: 0 Lli: 0 Loss_of_sig: 0 Proc_rqrd: 0 Protocol_err: 0 Timed_out: 0 Invalid_word: 0 Rx_flushed: 0 Invalid_crc: 0 Tx_unavail: 0 Delim_err: 0 Free_buffer: 0 Address_err: 0 Port part of other ADs: Yes |
4. fanShow
查看交換機散熱風扇的狀態
Enter the fanShow command: switch:admin> fanshow Fan 1 is OK speed is 7010 RPM Fan 2 is OK speed is 7180 RPM Fan 3 is OK speed is 7068 RPM Fan 4 is OK speed is 7116 RPM Fan 5 is OK speed is 7155 RPM Fan 6 is OK speed is 7001 RPM switch:admin> |
5. psShow
查看交換機的電源狀態
注:若是安裝FR4-18i、FC4-16IP、FC10-六、FC8-48板,須要滿配4個電源
Enter the psShow command: switch:admin> psshow Power Supply #1 is OK 0335,FF2Z0007161,60-0000739-02, B,,DCJ3002-01P, B,FF2Z0007161 Power Supply #2 is faulty 0335,FF2Z0007176,60-0000739-02, B,,DCJ3002-01P, B,FF2Z0007176 switch:admin> |
6. tempShow
查看交換機的環境溫度
Enter the tempShow command: switch:admin> tempshow Index Status Centigrade Fahrenheit ---------------------------------------------------- 1 OK 21 70 2 OK 22 72 3 OK 29 84 4 OK 24 75 5 OK 25 77 switch:admin> |
7. errDump、errShow、errClear
查看交換機的內部消息日誌
To display the system message log, with no page breaks Enter the errDump command. To display the system message log one at a time Enter the errShow command. To clear the system message log Enter the errClear command. |
8. supportShow、supportSave、pdShow
收集交換機的診斷數據
supportShow 顯示診斷信息和狀態信息 supportSave 將數據打包、上傳至指定的FTP服務器 The command prompts for an FTP server, packages the following files, and sends them to the specified server: ? The output of the supportShow command ? The contents of any trace dump files on the switch ? System message logs (for Brocade directors, supportSave saves the system message logs from both of the CP blades) pdShow 顯示panic dump文件的內容,幫助診斷系統panic的緣由 |
9. nsShow、nsAllShow、fabricShow
檢查鏈接到交換機的設備
nsShow 顯示鏈接到交換機的全部設備 nsAllShow 顯示鏈接到Fabric的全部設備 fabricShow 顯示Fabric中的全部交換機 |
10. licenseShow、wwn
檢查license文件和交換機的WWN號
11. version
檢查Fabric OS的版本,將顯示以下信息:
- Kernel: displays the version of switch kernel operating system. - Fabric OS: displays the version of switch Fabric OS. - Made on: displays the build date of firmware running in switch. - Flash: displays the install date of firmware stored in nonvolatile memory. - BootProm: displays the version of the firmware stored in the boot PROM. |
12. haShow
查看Control Blade的狀態
swDir: admin> haShow Local CP (Slot 6, CP1): Active Remote CP (Slot 5, CP0): Standby HA Enabled, Heartbeat Up, State Synchronized |
13. slotShow
查看各個Blade的狀態
14. portCfgSpeed
修改端口的速率
15. portEnable或portCfgPersistentEnable
Reset端口
16. 檢查WWN卡狀態
下列命令若是不能正確執行,則說明WWN卡須要更換:
www,chassisShow:顯示交換機的WWN號
chassisShow:顯示chassis和WWN卡的狀態
ipAddrShow,ipAddrSet:顯示CP Blades的IP地址
historyShow、historyLastShow:顯示歷史日誌信息
switchName:顯示交換機的名字
修改Domain ID
1. 查看當前的Domain ID
輸入命令fabricShow,輸出結果中的Switch ID即包括交換機的Domain ID。
2. 先關閉交換機
輸入命令swichDisable
3. 配置Domain ID
輸入命令configure
Enter y after the Fabric Parameters prompt: Fabric parameters (yes, y, no, n): [no] y Enter a unique domain ID at the Domain prompt. Use a domain ID value from 1 through 239 for normal operating mode (FCSW compatible): Domain: (1..239) [1] 3 Respond to the remaining prompts, or press Ctrl-d to accept the other settings and exit. |
4. 從新啓用交換機
輸入命令swichEnable
升級Firmware
FC10-6 Blade須要Firmware Version 5.3以上
FC4-16IP Blade、FC4-48 Port Blade須要Firmware Version 5.2以上
FR4-18i router blade須要Firmware Version 5.1以上
若是M48有主備Control Processor,且主備CP處於synchronized狀態,則升級過程可在線進行,不干擾數據流量。
若是M48只有一個CP,則升級微碼過程當中須要reboot交換機來激活新的Firmware,數據訪問會中斷。
升級M48 Firmware約需15分鐘
1. 保存交換機的配置信息
configUpload
2. 保存主備Control Processor Blade的supportsave
使用命令ipAddrShow,查看主備CP的IP地址
使用telent分別登陸主備CP,使用命令supportSave分別收集主備CP的supportsave文件。
3. 查看supportsave中的XXX_SUPPORTSHOW文件,查找以下字段:
/bin/df: Filesystem 1k-blocks Used Available Use% Mounted on /dev/root 120112 61128 58984 51% / /dev/hda2 120128 72356 47772 60% /mnt |
確認Flash存儲器的使用率不超過90%。不然需聯繫二線Support。
4. 清除交換機中當前保存的error report信息
errClear
5. 檢查當前各個CP Blades的Firmware版本
firmwareShow
6. 檢查主備CP狀態,是否處於同步狀態
haShow:查看主備CP是否處於Synchronized狀態
若是主備CP不處於同步狀態,則使用命令haSyncStart同步主備CP。
switch:admin> hashow Local CP (Slot 5, CP0): Active, Warm Recovered Remote CP (Slot 6, CP1): Standby, Healthy HA enabled, Heartbeat Up, HA State synchronized |
7. 升級Firmware
若是SAN交換機支持HA,則使用命令firmwareDownload,同時升級主備Control Blade。
若是SAN交換機不支持HA,則使用命令firmwareDownload -s,分別升級每一個Control Blade。
8. 檢查Firmware升級是否完成
firmwareDownloadStatus
9. 再次檢查當前各個CP Blades的Firmware版本
firmwareShow
激活軟件License
1. 查看當前已經激活的License
licenseShow
swDir:admin> licenseShow AAbbccDDeeFFeeGG: Web license Zoning license Extended Fabric license Fabric Watch license Performance Monitor license Trunking license Security license |
2. 獲取和激活License時須要提供64位的Chasis ID,查看Chasis ID:
licenseIdShow
3. 激活新的License
licenseAdd 「key」
4. 刪除舊的License
licenseRemove 「key」
刪除License後須要reboot交換機,或者switchDisable/switchEnable重啓交換機,以使須要刪除的License失效。
備份交換機的配置信息
1. 使用configUpload命令,將配置文件保存在本身的電腦上
注:configUpload沒法保存用戶的密碼信息。
2. 使用Telnet命令查看配置信息,並作Session Log
configShow
ipaddrShow
licenseShow
switchShow
3. 保存SupportSave文件
supportSave
安裝/更換Port Blade
1. 查看當前Port Blade的狀態
switchShow
2. 查看須要更換的Port Blade的備件號
chassisShow
包含有Port Blade的備件號、序列號和狀態。
3. 確認須要更換的Port Blade上已經沒有數據流量
查看Port Blade狀態LED,確保全部的Port Speed和Port Status狀態燈處於OFF狀態。
4. 安裝/更換完畢後檢查
nsShow
nsAllShow
fabricShow
更換M48 CP(Control Processor) Blade
估計用時30分鐘
注意事項:
1. 在拿到新CP Blade備件,能夠開始物理更換前,不要將故障CP Blade取出,以避免影響散熱。
2. Acitve狀態的CP Blade將自動把配置信息鏡像到Standby狀態的CP Blade上。必須在線更換CP Blade,才能實現配置信息的自動同步。
3. 新換上的CP Blade將繼承舊CP Blade的IP地址和主機名。
4. 確保兩個CP Blade處於同一FOS版本。
更換前的檢查:
1. 查看CP Blade上的Status LED是否爲黃色,Power LED是否點亮。
2. 使用slotShow命令查看CP Blade是否處於Enabled狀態。
3. 使用hsShow命令是否報錯。
4. 使用errShow命令查看錯誤日誌。
備份配置信息:
1. 切換健康的CP Blade爲當前Active狀態的CP Blade。
使用命令haFailover,實現CP Blade間的手動切換。
使用命令haShow,確認當前Active狀態的CP Blade爲健康的CP Blade。
等待CP Blade上的Status LED熄滅,代表HA Failover已經完成。
2. 使用firmwareShow命令檢查Firmware版本
3. 使用haDisable命令,暫時取消Failover功能。
4. 使用configUpload命令保存配置信息。
swDir:admin> configUpload Protocol (scp or ftp) [ftp]: ftp Server Name or IP Address [host]: 123.456.78.90 User Name [None]: user File Name [config.txt]: config.txt Password: xxxxxxxx upload complete |
更換CP Blade
1. 將CP Blade上的電源開關撥至Down位置,切斷CP Blade的電源。
2. 拔下CP Blade。
3. 插入新的CP Blade。
4. 將CP Blade上的電源開關撥至Up位置,給CP Blade供電。
更換後的驗證:
1. 等待兩個CP Blade上的Status LED都熄滅。
2. 使用命令haEnable啓用HA Failover功能。
3. 使用命令haShow檢查HA狀態,確認「HA Enabled Heartbeat Up」 and 「HA-state in sync」。
4. 使用命令slotShow檢查全部的CP Blade都處於Enabled狀態。
swDir:admin> slotShow Slot Blade Type ID Status --------------------------------- 1 SW BLADE 17 ENABLED 2 SW BLADE 17 ENABLED 3 SW BLADE 17 ENABLED 4 SW BLADE 17 ENABLED 5 CP BLADE 16 ENABLED 6 CP BLADE 16 ENABLED 7 SW BLADE 17 ENABLED 8 SW BLADE 17 ENABLED 9 SW BLADE 17 ENABLED 10 SW BLADE 17 ENABLED swDir:admin> |
5. 使用命令firmwareShow命令,檢查FW版本是否一致
swDir:admin> firmwareShow Local CP (Slot 6, CP1): Active Primary partition: v5.0.1 Secondary Partition: v5.0.1 Remote CP (Slot 5, CP0): Standby Primary partition: v5.0.1 Secondary Partition: v5.0.1 Note: If Local CP and Remote CP have different versions of firmware, please retry firmwaredownload command. swDir:admin> |
6. 使用firmwareDownload -s命令,只升級單獨某個CP Blade的微碼。
7. 使用firmwareDownloadStatus命令,驗證微碼安裝是否成功。
ZONE配置
1. 概念
zone configuration:
爲一組zone的集合。一個zone能夠同時屬於不一樣的zone configuration之中。當一個zone configuration生效時,屬於該zone configuration的全部zone都生效。
建立zone配置基本步驟:
建立alias -> 建立zone -> 建立zone configuration -> cfgSave -> cfgEnable
2. 經常使用命令
configUpload:備份zone configuration
configDownload:恢復zone configuration
3. 建立別名
(1)aliCreate
(2)cfgSave
switch:admin> alicreate "array1", "2,32; 2,33; 2,34; 4,4" switch:admin> alicreate "array2", "21:00:00:20:37:0c:66:23; 4,3" switch:admin> alicreate "loop1", "4,6" switch:admin> cfgsave You are about to save the Defined zoning configuration. This action will only save the changes on the Defined configuration. Any changes made on the Effective configuration will not take effect until it is re-enabled. Do you want to save Defined zoning configuration only? (yes, y, no, n): [no] y |
4. 向別名中增長成員
(1)aliAdd
(2)cfgSave
switch:admin> aliadd "array1", "1,2" switch:admin> aliadd "array2", "21:00:00:20:37:0c:72:51" switch:admin> aliadd "loop1", "5,6" switch:admin> cfgsave You are about to save the Defined zoning configuration. This action will only save the changes on the Defined configuration. Any changes made on the Effective configuration will not take effect until it is re-enabled. Do you want to save Defined zoning configuration only? (yes, y, no, n): [no] y |
5. 刪除別名中的成員
(1)aliRemove
(2)cfgSave
switch:admin> aliremove "array1", "1,2" switch:admin> aliremove "array2", "21:00:00:20:37:0c:72:51" switch:admin> aliremove "loop1", "4,6" switch:admin> cfgsave You are about to save the Defined zoning configuration. This action will only save the changes on the Defined configuration. Any changes made on the Effective configuration will not take effect until it is re-enabled. Do you want to save Defined zoning configuration only? (yes, y, no, n): [no] y |
6. 刪除別名
switch:admin> alidelete "array1"
switch:admin> cfgsave
7. 查看定義配置中的別名
switch:admin> alishow "arr*"
alias: array1 21:00:00:20:37:0c:76:8c
alias: array2 21:00:00:20:37:0c:66:23
8. 建立zone
switch:admin> zonecreate "greenzone", "2,32; 2,33; 2,34; 4,4"
switch:admin> zonecreate "redzone", "21:00:00:20:37:0c:66:23; 4,3"
switch:admin> zonecreate "broadcast", "1,2; 2,33; 2,34"
switch:admin> cfgsave
9. 向zone中增長設備
switch:admin> zoneadd "greenzone", "1,2"
switch:admin> zoneadd "redzone", "21:00:00:20:37:0c:72:51"
switch:admin> zoneadd "broadcast", "1,3"
switch:admin> cfgsave
10. 從zone中刪除設備
switch:admin> zoneremove "greenzone", "1,2"
switch:admin> zoneremove "redzone", "21:00:00:20:37:0c:72:51"
switch:admin> zoneremove "broadcast", "2,34"
switch:admin> cfgsave
11. 刪除一個zone
switch:admin> zonedelete "redzone"
switch:admin> cfgsave
12. 查看當前定義配置中的zone
如下命令查看全部以字母A、B、C開頭的zone
switch:admin> zoneshow "[A-C]*"
zone: Blue_zone 1,1; array1; 1,2; array2
zone: Bobs_zone 4,5; 4,6; 4,7; 4,8; 4,9
13. 建立zone配置
switch:admin> cfgcreate "NEW_cfg", "redzone; bluezone; greenzone"
switch:admin> cfgsave
14. 向zone配置成員中加入zone
switch:admin> cfgadd "newcfg", "bluezone"
switch:admin> cfgsave
15. 從zone配置成員中刪除zone
switch:admin> cfgremove "NEW_cfg", "redzone"
switch:admin> cfgsave
16. 刪除zone配置
switch:admin> cfgdelete "testcfg"
switch:admin> cfgsave
17. 撤銷對zone配置的修改
命令cfgTransAbort將撤銷全部未保存的修改,及恢復到上次執行cfgSave時的狀態。
18. 查看zone配置信息
cfgShow不帶任何參數:顯示處於defined和effective狀態的全部zone配置信息
switch:admin> cfgshow
Defined configuration:
cfg: USA1 Blue_zone
cfg: USA_cfg Red_zone; Blue_zone
zone: Blue_zone
1,1; array1; 1,2; array2
zone: Red_zone
1,0; loop1
alias: array1 21:00:00:20:37:0c:76:8c; 21:00:00:20:37:0c:71:02
alias: array2 21:00:00:20:37:0c:76:22; 21:00:00:20:37:0c:76:28
alias: loop1 21:00:00:20:37:0c:76:85; 21:00:00:20:37:0c:71:df
Effective configuration:
cfg: USA_cfg
zone: Blue_zone
1,1
21:00:00:20:37:0c:76:8c
21:00:00:20:37:0c:71:02
1,2
21:00:00:20:37:0c:76:22
21:00:00:20:37:0c:76:28
zone: Red_zone
1,0
21:00:00:20:37:0c:76:85
21:00:00:20:37:0c:71:df
19. 保存zone配置
switch:admin> cfgenable "USA_cfg"
You are about to enable a new zoning configuration.
This action will replace the old zoning configuration with the
current configuration selected.
Do you want to enable 'USA_cfg' configuration (yes, y, no, n): [no] y
zone config "USA_cfg" is in effect
Updating flash ...