Professional Documents
Culture Documents
TheSANGuy
UsefulBrocadeFOSCLICommands|TheSANGuy
tipsandtricksfromanITveteran
UsefulBrocadeFOSCLICommands
BelowisalistofusefulBrocadeCLIcommandsthatIkeepatmydeskforreference.Theyredividedupintocategories
forZoning,Show,Port,Time/Date,License,Banner,Password,SNMP,UserConfig,Firmware,andMiscellaneous.
ZoningCommands
alicreateName,
Usedtocreateanalias
domain,port#
alicreateName,portname1
Tocreatemultipleportsunderasinglealias
portname2
alideleteName
Todeleteanalias
aliaddName,
Toaddadditionalportstoanalias
domain,port#
aliremoveName,
Toremoveaportfromthealias
domain,port#
alishowAliName
Toshowthealiasconfigurationontheswitch
zonecreateZoneName,
Tocreatezonesbasedonalias
alias1alias2
zonedeleteZoneName
Todeleteazone
zoneaddZoneName,alias
Toaddadditionalaliasintothezone
name
zoneremoveZoneName,
Toremoveanaliasfromthezone
aliasname
zoneshowzoneName
Toshowthezoneconfigurationinformation
cfgcreateConfigname,
Tocreateconfigurationsbyaddinginzones
Zone1Zone2
cfgdeleteConfigName
Todeleteaconfiguration
cfgaddConfigName,
Toaddadditionalzonesintheconfiguration
Zone3
cfgremoveConfigName,
Toremoveazonefromtheconfiguration
Zone3
cfgshowConfigName
Toshowthedetailsofthatconfiguration
cfgenableConfigName
Toenableaconfigurationontheswitch
cfgsave
Tohavetheeffectiveconfigurationtobewrittenintotheflashmemory
http://thesanguy.com/2013/09/11/usefulbrocadefosclicommands/
1/7
20/03/2015
UsefulBrocadeFOSCLICommands|TheSANGuy
ShowCommands
psshow
Displaysthestatusofthepowersupply
fansshow
Displaysthestatusofthefans
tempshow
Displaysthestatusofthetemperaturereadings
sensorshow
Displaysthestatusofthesensorreadings
nsshow
Displaysinformationinthenameserver
nsshowt
Displaysinformationinthenameserver
nsshowr
Displaystheinformationinthenameserveralongwiththestatechangeregistrationdetails
nscamshow
Displaysdetailedinformationofallthedevicesconnectedtoalltheswitchesinthefabric
(RemoteNameServers)
nsallshow
Displaysthe24bitaddressofalldevicesthatareinthefabric
licenseshow
Displaysallthelicensesthathavebeenaddedintheswitch
date
Displaysthecurrentdatesetontheswitch
bannershow
DisplaysthebannerthatwillappearwhenlogginginusingtheCLIorwebtools
httpcfgshow
DisplaystheJAVAversiontheswitchexpectsatthemanagementconsole
switchname
Displaysthenameoftheswitch
fabricshow
Displaysinformationofalltheswitchesinthefabric
userconfigshowa
Displaystheaccountinformationlikerole,description,passwordexpdate,lockedstatus
switchstatusshow
Displaystheoverallstatusoftheswitch
switchstatuspolicyshow
DisplayspolicysetfortheswitchregardingMarginal(Yellow)orDown(Red)errorstatus
portshow
Toshowtheportstatus
portcfgshow
Displaysthespeedsetforallportsonallslotsandotherdetailedportinformation
configshowfabric.ops
Displaystheparametersoftheswitch.Ensureallswitchesinafabrichavethesame
parametersinordertocommunicate
configshow
DisplaysthePIDsetforaswitchCore,NativeorExtendededge
fabric.ops.pidFormat
switchuptimeOR
Displaystheuptimefortheswitch
uptime
firmwareshow
Displaysthefirmwareontheswitch
version
Displaysthecurrentfirmwareversionontheswitch
hashow
DisplaysthestatusoflocalandremoteCPs.Highavailability,heartbeatand
synchronization
PortSettings
http://thesanguy.com/2013/09/11/usefulbrocadefosclicommands/
2/7
20/03/2015
UsefulBrocadeFOSCLICommands|TheSANGuy
portcfgshow
Displaystheportsettings
portcfgrscnsupr
Aregisteredstatechangeregistrationissuppressedwhenastatechangeoccursonthe
[slot/port]enable
port
portcfgrscnsupr
Aregisteredstatechangeregistrationissentwhenastatechangeoccursontheport
[slot/port]disable
portname
Toassignanameforaport
portdisable
Todisableaportorslot
portenable
Toenableaportorslot
portcfgpersistentdisable
Todisableaport,statuswouldnotchangeevenafterrebootingtheswitch
portcfgpersistentenable
Toenableaport,statuswouldnotchangeevenafterrebootingtheswitch
portshow
Toshowtheportstatus
portcfgspeed,
Tosetspeedforaport#te0:autonegotiated1,2,4Gbit/sec,1:1Gbit/sec,2:2
Gbit/sec,4:4Gbit/sec
switchcfgspeed
TosetspeedforalltheportsontheswitchNote0:autonegotiated1,2,4Gbit/sec,1:
1Gbit/sec,2:2Gbit/sec,4:4Gbit/sec
portcfgshow
Displaysthespeedsetforallportsonallslotsandotherdetailedportinformation
portcfgdefault
Tosettheportsettingstodefault
portcfglongdistance
Tosetthelongdistancemode.DefaultisL0(Normal),asperdistancewilldisplayLE
<=10kms,L0.5<=25kms,L1<=50kms,L2<=100kms,LD=auto,LS=Static
portcfgeport
UsedtodisableaportfrombeingaEport
TimeandDateSettings
date
Displaysthecurrentdatesetontheswitch
tsclockserver10.10.1.1
InstructionfortheprincipalswitchtosynchronizetimewiththeNTPserver
(specifytheipaddressoftheNTPserver)
tsclockserverLOCL
InstructiontostopNTPserversynchronization(Localtimeoftheswitch)
datemmddhhmmyy
TosetthetimeoftheswitchwhentheNTPserversynchronizationiscancelled
tstimezone5
Tosetthetimezoneforindividualswitches
LicenseCommands
licenseshow
Displaysallthelicensesthatareaddedintheswitch
licenseadd
Toaddanewlicensetotheswitch
licenseremove
Toremovealicensefromtheswitch
licenseidshow
BasedonSwitchWWN
BannerCommands
http://thesanguy.com/2013/09/11/usefulbrocadefosclicommands/
3/7
20/03/2015
UsefulBrocadeFOSCLICommands|TheSANGuy
bannershow
DisplaysthebannerthatwillappearwhenlogginginusingtheCLIorwebtools
bannerset
TosetthebannerwhichwillappearwhenlogginginusingtheCLIorwebtools
bannerset
Toremovethebannerset(twoquotes)
Passwordcommands
passwd
Tochangethepasswordforthatparticularlogin
passwdcfgsetlowercase3
Tosetthepasswordrules
uppercase1digits2
punctuation2minlength10
history3
passwdcfgset
TosettheminimumpasswordageinDays
minpasswordage1
passwdcfgset
TosetthemaximumpasswordageinDays
maxpasswordage30
passwdcfgsetwarning23
TosetawarningfortheexpirationDaysremaining
passwdcfgset
Tosettheaccountlockoutthreshhold
lockoutthreshold5
passwdcfgset
TosettheaccountlockoutdurationinMinutes
lockoutduration30
passwdcfgsetdefault
TorestorethepasswordpolicytoFactorysettings(minlength8,history1,
lockoutduration30)
SNMPCommands
snmpconfig
snmpconfigfor5.0abovefos
agtcfgset
snmpconfigforfosbelow5.0
snmpmibcapset
forchoosingtheMIBsforthesnmpsettings
UserConfiguration
userconfigshowa/
Displaysalltheaccountinformationlikerole,description,passwordexpirationdate,
userconfigshow
lockedstatus
userconfigaddjohnr
Toaddanewaccountr=role,d=description
admindJohnDoe
userconfigshowjohn
Displaysalltheinformationfortheaccountjohn
userconfigchangeeno
ToDisableanaccount,usuallydefaulta/cslikeadminanduser.Butensurebefore
disablingtheadmina/cthereisanothera/cwithadminrights
userconfigchangee
ToEnableanaccount
yes
http://thesanguy.com/2013/09/11/usefulbrocadefosclicommands/
4/7
20/03/2015
UsefulBrocadeFOSCLICommands|TheSANGuy
Firmwarecommands
configupload
SavestheswitchconfigasanASCIItextfiletoanFTPserver
configdownload
TorestoreaswitchconfigurationfromASCIItextfileNoteNeedtodisablethe
switchbeforedownloadingtheconfigfile
configure=>cfgload
FabricOSv4.4&aboveprovidesSecureFileCopyProtocol(SCP)duringuploador
attributes:[y]=>Ensure
downloadofconfigurations
secureconfigupload/
download:[y]
firmwaredownload
Todownloadthefirmwaretobeinstalledontheswitch
firmwareshow
Toberunafterinstallingthefirmwareontheswitch
version
Displaysthecurrentfirmwareversionontheswitch
fastboot
Needstoberunafterinstallingthefirmware.Thisdoesnotincludethepost.
reboot
Needstoberunafterinstallingthefirmware.Thisincludesthepost.
Miscellaneouscommands
killtelnet
Tokillaparticularsessionwhichisusingtelnet
configure
Toconfigureaswitch
quietmode
Toswitchoffthequietmode
quietmode1
Tosuppressmessagestotheconsole
switchname
Displaystheswitchname
switchnameEXAMPLE
Toassignaswitchname
bannerset
TosetthebannerwhichwillappearwhenlogginginusingtheCLIorwebtools
timeout
DisplaysthetimeouttimesetforTelnetsessionontheswitch
timeout10
TosetaspecifictimeouttimefortheTelnetsession
switchuptimeoruptime
Displaystheuptimefortheswitch
switchcfgspeed
TosetspeedforalltheportsontheswitchNote0:autonegotiated1,2,4Gbit/sec
,1:1Gbit/sec,2:2Gbit/sec,4:4Gbit/sec
fastboot
Toreboottheswitchwithoutpost
reboot
Toreboottheswitchwiththepost
switchstatusshow
Displaystheoverallstatusoftheswitch
switchstatuspolicyshow
DisplayspolicysetfortheswitchregardingMarginal(Yellow)orDown(Red)error
status
switchstatuspolicyset
TochangethepolicysetfortheswitchregardingMarginal(Yellow)orDown(Red)
errorstatus
http://thesanguy.com/2013/09/11/usefulbrocadefosclicommands/
5/7