Table of contents
foreword
Commonly used switch commands at work, here is a small summary, and I hope it will be useful to you and me
1. Basic commands
Order | Basic instructions |
---|---|
switchStatusShow | View the health status of the switch |
switchShow | View basic switch configuration information |
portShow | View switch port status |
tempShow | Check the ambient temperature of the switch |
supportShow | Display switch diagnostic and status information |
cfgshow | Display switch configuration information |
aliashow | view aliases |
fanShow | Viewing the Status of the Cooling Fans of a Switch |
psShow | Check the switch power status |
errDump | Check the log of the running process of the switch |
errShow | View the switch error log |
errClear | clear switch logs |
supportSave | Save switch information to FTP server |
pdShow | Display panic dump file content |
nsShow | Show all devices connected to the switch |
nsAllShow | Show all devices connected to Fabric |
fabricShow | Show all switches in the Fabric |
licenseShow | View the switch license file |
wwn | View the WWN number of the switch |
version | Check the version number of the switch |
haShow | View the status of the Control Blade |
slotShow | View the status of each Blade |
uptime | Display switch working hours |
ipaddrshow | Display switch IP address information |
memshow | View memory information (more than 80% should pay attention) |
2. Practical operation
2.1 Modify Domain ID
Specific steps are as follows:
- By viewing the Domain ID of the switch, mainly through
fabricShow
the Switch ID in the output result includes the switch ID - Turn off the switch:
swichDisable
- Configuration ID:
configure
- Reboot the switch:
swichEnable
2.2 Aliases
The specific command format is as follows:
alicreate “别名”,“DomainID,端口号;DomainID,端口号”
(Save every time)
-
An example of creating an alias (via
aliCreate
andcfgSave
command)
is as follows:alicreate "loop", "1,3"
, then savecfgSave
-
An example of adding members to an alias (via
aliAdd
andcfgSave
command) is as follows: , then savealiAdd "loop", "1,3"
cfgSave
-
An example of deleting a member from an alias (via
aliRemove
andcfgSave
command) is as follows: , then savealiRemove "loop", "1,3"
cfgSave
-
Remove the alias:
alidelete "loop"
, after doingcfgSave
-
View the aliases in the configuration:
alishow "loop*"
2.3 Zone
A zone can be in different zone configurations (similar to collections). If the zone configuration takes effect, all zones belonging to the collection will take effect
(Save every time)
- Create zone:
zonecreate "redzone", "1,2; 2,33; 2,34"
,zonecreate "greenzone","1,2"
proceedcfgsave
- Add equipment:
zoneadd "redzone", "1,3"
, carry outcfgsave
- Delete device:
zoneremove "redzone", "2,34"
, proceedcfgsave
- Delete zone:
zonedelete "redzone"
, proceedcfgsave
(I didn’t delete it here)
- Create zone configuration:
cfgcreate "NEW_xx", "redzone; greenzone"
, proceedcfgsave
- Add zone to configuration members:
cfgadd "newxx", "redzone"
, carry outcfgsave
- Delete zone in the configuration member:
cfgremove "newxx", "redzone"
, proceedcfgsave
- Delete the zone configuration:
cfgdelete "testcfg"
, proceedcfgsave
- Undo to
cfgsave
the state of the last execution:cfgtransabort
Finally don't forget to activate:cfgenable “cgfname”