Hi,
this is the list of my the frequently fabric commands:
Generic
Uptime of the switch
1 | uptime |
Date / Time
1 | date |
Fabric OS version
1 | version |
Switchname
1 | switchName |
Switch state with hardware overview
1 | switchstatuspolicyshow |
Good overview of the switch with ports…
1 | switchshow |
Show domain ID
1 | fabricshow |
Set the fabricname
1 | fabricname |
Port related
Enable
1 | portDisable |
Disable
1 | portEnable |
Performance of ports
1 | portperfshow |
State of a port
1 | portshow |
Show routes on a port
1 | portrouteshow |
SFP/GBIC Info
1 | sfpshow |
Hardware state
List faults
1 | faultshow |
Fan state
1 | fanshow |
Power supply state
1 | psshow |
Temperatures
1 | tempshow |
Overall state of the switch
1 | switchstatusshow |
Config commands
Show SNMP config
1 | agtcfgshow |
Set NTP Server
1 | tsclockserver |
Set Timezone
1 | tsTimeZone -–interactive |
Switch config
1 | configshow |
Show the GBIC state and its serial numbers
1 | gbicshow |
Licence information
1 | licenseshow |
Config summary
1 | supportshow |
Show switch ports and connections
1 | switchshow |
Show zone and aliases
1 | zoneshow |
SMTP Mail
1 | relayconfig --config -rla_ip 10.10.120.5 -rla_dname my.domain.org |
Whole SMTP config
1 | fwmailcfg |
Receiver / Sender
1 | mapsConfig --emailcfg -address myUser@my.domain.org -from myUser@my.domain.org |
Network configuration
Show broadcast routing
1 | bcastshow |
Show network interface mode (Full/Half duplex)
1 | ifmodeshow |
netstat -s
1 | ifshow |
IP Address
1 | ipaddrshow |
1 | interfaceshow |
SNMP
Show config
1 2 | snmpconfig --show snmpv1 snmpconfig --show snmpv3 |
Set config
1 2 | snmpconfig -- set snmpv1 snmpconfig -- set snmpv3 |
Some stats
1 | portstatsshow |
Misc
Show diagnostic data (paged)
1 | diagshow |
Show diagnostic data (non paged)
1 | errdump |
Show fabric
1 | fabricshow |
FSPF protocol infos
1 | fspfshow |
Show queues
1 | mqshow |
Nameservice
List all port with connected WWPNs
1 | nsshow |
Query the fabric ns cache manager
1 | nscamshow |
Zoning
Create an alias. For the host (initiator)… use nscamshow/nsshow to determine the hosts WWPNs
1 | alicreate "myHost_hba1" , "10:00:00:11:9b:f2:6c:c9" |
… and for the storage array (target)
1 2 | 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
1 | zonecreate "Zone_myHost_hba1_myStorageArray" , "myHost_hba1;myStorageArray_hba1;myStorageArray_hba2" |
Add the zone to the/your config
1 | cfgadd "myZoneconfig" , "Zone_myHost_hba1_myStorageArray" |
And save and enable the new config
1 2 | cfgsave cfgenable myZoneconfig |
Remove a zone from config. Then save and enable
1 | 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
1 | islshow |
Trunk state
1 | trunkShow |
Debug when exist two trunk master for the same ISL connection
1 2 3 4 5 6 | 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
1 | Switchcfgtrunk 1 |
Enable trunking on specific ports, for example 1 and 3
1 | portcfgtrunkport 1 /3 1 |
Or disable
1 | portcfgtrunkport 1 /3 0 |
Simple Fabric setup
Disable the ports which will be used for trunking, in this example port 1-3
1 | portdisable 1-3 |
Enable QoS on those ports
1 2 3 | portcfgqos -- enable 1 portcfgqos -- enable 2 portcfgqos -- enable 3 |
Also set the max. port speed. In this case 16G
1 2 3 | portcfgspeed 1 16 portcfgspeed 2 16 portcfgspeed 3 16 |
Disable switch
1 | switchdisable |
Set Configure domain id (must be unique in a fabric), after setting the id press Ctrl-D
1 | configure |
and do a full (not fast) reboot
1 | reboot |
Connect the ISL (inter switch link) cables between the switches and enable the ports and the switch
1 2 | portenable 1-3 switchenable |
Fabric status
1 | fabricshow |
Show state of trunk port
1 | trunkshow -perf -swname |
Set a switch to the fabric principal, login to the switch
1 | fabricprincipal -f 1 |
Check Domain ID
1 2 3 | 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
1 | sshutil genkey -ecdsa |
Allow a user to use ssh public key authentication
1 | 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.
1 | 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
1 | sshutil importpubkey |
User Management
Show status of all user
1 | userconfig --show -a |
Show status of the user root
1 2 | rootaccess --show RootAccess: consoleonly |
On newer FabricOS releases the root account is disabled by default.
Enable the root account
1 | userconfig --change root -e yes |
Enable ssh logon for root
1 | rootaccess -- set all |
Then logon via ssh. The default password is “fibranne”. Change the password after logon.
To disable the root account
1 2 | userconfig --change root -e no rootaccess -- set consoleonly |
Firmware management
Show version
1 | 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
1 | switchdisable |
Load the firmware to the switch and initiate a reboot
1 2 | 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
1 | firmwarecommit |
otherwise you can rollback to the previous version
1 | firmwarerestore |
Reset a switch
Virtual switch enabled?
1 | fosconfig --show |
Disable virtual switch
1 | fosconfig --disable vf |
Now you can remove all ISL wires.
Disable the switch persistent
1 | switchcfgpersistentdisable |
Disable active config
1 | cfgDisable |
Delete all zones, aliases…
1 | cfgClear |
Save it
1 | cfgSave |
Set default config
1 | configDefault |
Reset each port if necessary
1 | portcfgdefault x |
Michael