Hi,
this is the list of my the frequently fabric commands:
Generic
Uptime of the switch
uptime
Date / Time
date
Fabric OS version
version
Switchname
switchName
Switch state with hardware overview
switchstatuspolicyshow
Good overview of the switch with ports…
switchshow
Show domain ID
fabricshow
Set the fabricname
fabricname
Port related
Enable
portDisable
Disable
portEnable
Performance of ports
portperfshow
State of a port
portshow
Show routes on a port
portrouteshow
SFP/GBIC Info
sfpshow
Hardware state
List faults
faultshow
Fan state
fanshow
Power supply state
psshow
Temperatures
tempshow
Overall state of the switch
switchstatusshow
Config commands
Show SNMP config
agtcfgshow
Set NTP Server
tsclockserver
Set Timezone
tsTimeZone -–interactive
Switch config
configshow
Show the GBIC state and its serial numbers
gbicshow
Licence information
licenseshow
Config summary
supportshow
Show switch ports and connections
switchshow
Show zone and aliases
zoneshow
SMTP Mail
relayconfig --config -rla_ip 10.10.120.5 -rla_dname my.domain.org
Whole SMTP config
fwmailcfg
Receiver / Sender
mapsConfig --emailcfg -address myUser@my.domain.org -from myUser@my.domain.org
Network configuration
Show broadcast routing
bcastshow
Show network interface mode (Full/Half duplex)
ifmodeshow
netstat -s
ifshow
IP Address
ipaddrshow
interfaceshow
SNMP
Show config
snmpconfig --show snmpv1 snmpconfig --show snmpv3
Set config
snmpconfig --set snmpv1 snmpconfig --set snmpv3
Some stats
portstatsshow
Misc
Show diagnostic data (paged)
diagshow
Show diagnostic data (non paged)
errdump
Show fabric
fabricshow
FSPF protocol infos
fspfshow
Show queues
mqshow
Nameservice
List all port with connected WWPNs
nsshow
Query the fabric ns cache manager
nscamshow
Zoning
Create an alias. For the host (initiator)… use nscamshow/nsshow to determine the hosts WWPNs
alicreate "myHost_hba1","10:00:00:11:9b:f2:6c:c9"
… and for the storage array (target)
alicreate "myStorageArray_hba1","20:00:00:34:45:78:90:12" alicreate "myStorageArray_hba2","20:00:00:34:45:78:90:13"
Create a zone with both
zonecreate "Zone_myHost_hba1_myStorageArray","myHost_hba1;myStorageArray_hba1;myStorageArray_hba2"
Add the zone to the/your config
cfgadd "myZoneconfig","Zone_myHost_hba1_myStorageArray"
And save and enable the new config
cfgsave cfgenable myZoneconfig
Remove a zone from config. Then save and enable
cfgremove "myZoneconfig","Zone_myHost_hba1_myStorageArray"
Fabric / ISL Trunking command
Before a switch can join a fabric you have to delete an exiting configuration (see below)
Fabric state
islshow
Trunk state
trunkShow
Debug when exist two trunk master for the same ISL connection
trunkdebug 52 54 port 52 and 54 can't trunk due to one of the following reasons: ports are not same speed or valid speed ports are not same long distance mode local or remote ports are not in same port group difference between links length is greater than allowed
Enable trunking on all ports
Switchcfgtrunk 1
Enable trunking on specific ports, for example 1 and 3
portcfgtrunkport 1/3 1
Or disable
portcfgtrunkport 1/3 0
Simple Fabric setup
Disable the ports which will be used for trunking, in this example port 1-3
portdisable 1-3
Enable QoS on those ports
portcfgqos --enable 1 portcfgqos --enable 2 portcfgqos --enable 3
Also set the max. port speed. In this case 16G
portcfgspeed 1 16 portcfgspeed 2 16 portcfgspeed 3 16
Disable switch
switchdisable
Set Configure domain id (must be unique in a fabric), after setting the id press Ctrl-D
configure
and do a full (not fast) reboot
reboot
Connect the ISL (inter switch link) cables between the switches and enable the ports and the switch
portenable 1-3 switchenable
Fabric status
fabricshow
Show state of trunk port
trunkshow -perf -swname
Set a switch to the fabric principal, login to the switch
fabricprincipal -f 1
Check Domain ID
configshow|grep domain fabric.domain:3 switch.domain_id_offset:96
ssh
The ssh daemon brocade switch has some limitations against openssh
- No private key could imported. Means the key gen mechanism of fabric os must be used
- The public key could only exported by a file transfer. If you do not have a machine which allow user/password login this could be tricky
Generate a ssh key
sshutil genkey -ecdsa
Allow a user to use ssh public key authentication
sshutil allowuser admin
Get the public key without usage of sshutil exportpubkey. This requires that you cam login with root, either with the serial console or by ssh. See User management above on how to enable the root account.
cat /root/.ssh/id_ecdsa.pub
Allow the public key to logon on a remote machine
Then you can simple import a public from there
sshutil importpubkey
User Management
Show status of all user
userconfig --show -a
Show status of the user root
rootaccess --show RootAccess: consoleonly
On newer FabricOS releases the root account is disabled by default.
Enable the root account
userconfig --change root -e yes
Enable ssh logon for root
rootaccess --set all
Then logon via ssh. The default password is “fibranne”. Change the password after logon.
To disable the root account
userconfig --change root -e no rootaccess --set consoleonly
Firmware management
Show version
firmwareshow
Note: Brocade does not support the upgrade over 2 minor version. Example 8.0.x -> 8.2.x. You must update in this order 8.0.x -> 8.1.x -> 8.2.x.
Firmware update
Copy the firmware file to a remote system where you can logon remotely from the Brocade switch (ssh user/password or publickey auth). In this example host 10.10.120.10, User: san, firmware located in the home directory ~/v8.2.1a
Disable the switch
switchdisable
Load the firmware to the switch and initiate a reboot
firmwaredownload -s -n -p scp 10.10.120.10,san,v8.2.1a reboot
After the reboot do some checks. If you are sure that it works as expected commit the firmware to the second partition
firmwarecommit
otherwise you can rollback to the previous version
firmwarerestore
Reset a switch
Virtual switch enabled?
fosconfig --show
Disable virtual switch
fosconfig --disable vf
Now you can remove all ISL wires.
Disable the switch persistent
switchcfgpersistentdisable
Disable active config
cfgDisable
Delete all zones, aliases…
cfgClear
Save it
cfgSave
Set default config
configDefault
Reset each port if necessary
portcfgdefault x
Michael