Wednesday, October 31, 2012

Brocade Switch Commands





Brocade Switch Commands:

Check on the case sensitivity using command “help” ( it will demonstrate all the possible commands)

1. firmwareshow – gives firmware version.

2. version – gives version of fabric operating system.

3. fanshow – gives status of fan

4. psshow – gives power supply status.

5. tempshow – gives temp. details, in case of AC failure.

6. chassisshow – gives serial no. of switch.

7. switchshow – gives WWN of switch and ports.

8. nsallshow – shows all name databases details i.e how many servers are connected and to which port. Eg o/p would be (010000) where 01 is switch domain ID, 00 is port no. and 00 is fabric service (ALPA address).

9. fabricprincipal –f 1 – to make a particular switch as primary switch.

10. userconfig - -show –a – will show all accounts in a switch.

11. userconfig - -add username –r rolename – to create an account for particular user and rolename will define the previlleges eg admin, switchadmin, zoneadmin etc..

12. passwd username – to change the password for particular user.

13. userconfig - -delete username – to delete the account for particular user.

14. switchname – displays the name of the switch.

15. switchname “newname” –to change the name of the switch.

16. date “0806102910” – sets date and time where “mm” is 01 – 12 , “dd” is 01 – 31, “hh” is 00 – 23, “mm minutes” is 00 – 59 and “yy” is 00 – 99.

17. tsclockserver “IP of NTP server” – will synchronise the time as what is there in NTP server. It is very important to set the exact time (can’t explain here)and also it has a significance for environment having lot many switches. If time changes say ( day light savings), it would be difficult to change the time manually for each switch but change can be replicated to each switch by above command if there would be and NTP server configured.

18. tstimezone – for changing the timezone.

19. switchstatusshow – displays overall status of the switch.

20. portdisable & portenable , these can be used as a part of troubleshooting, say is HBA is connected to a particular switch port but it is not detecting, then you can try out disabling and enabling the switch port.

21. portshow – displays status of all ports.

22. portperfshow – to check performance of each switch port.

23. portcfgspeed , - to configure speed of particular port.

24. switchcfgspeed - to set switch speed. Where can be 0 : autonegotiated , 1 : 1Gbit/sec, 2 : 2Gbit/sec.

25. portcfgshow – to check the port speed, configuration.

26. uptime – to check the last reboot.

27. nscamshow – shows what exactly is there in cache that has not been saved yet in memory.

28. configupload – to take backup of switch configuration, very important.

29. agtcfgshow – to check is snmp is configured or not.

30. agtcfgset – to configure snmp to send switch alerts to particular server.

These are some of the basic commands for brocade switches, most of them, you wont be using much, Lot many have complete description behind them which can not be explained over here.

Zoning Commands ( Preferably do it GUI unless so sure to do it CLI)

Before knowing the commands, keep in mind the storage (clarion) , servers(to be zoned) , switch (on which to do the zoning), every details. Now assume you have a server named “TRAINING” with two HBA hba1 and hba2 and a storage clarion with FE ports A0. just for eg and to understand the nomenclature, when you work independently.

1. Connect the cable to switch (LC to LC) from server HBA port to one of the switch port.

2. login into the server and find the wwn no. of HBA card ( for solaris – fcinfo & HP-UX – fcutil)

3. login to the switch and match the wwn , run switchshow command.

4. Now create aliases for server ( alicreate “TRAINING_hba1” , “wwn of hba1” )

5. Now create aliases for clarion if not created before and this will be constant throughout ( alicreate “SPA_A0” , “wwn of storage” )

6. Now create the zone ( zonecreate “TRAINING_hba1_SPA_A0” , “TRAINING_hba1 ; SPA_A0” )

7. save the configuratiuon after creating the zone bye cfgsave

8. And then enable the configuration by cfgenable

TRAINING_hba1 – server aliases

SPA_A0 – Storage aliases

TRAINING_hba1_SPA_A0 – Zone name

But if you are creating a zone for the first time in a switch, you would have to create a configuration file before running cfgsave.

Cfgcreate “fabric 1” , “zone name”

fabric 1 is configuration file name.

Run cfgshow to check configuration file.

How to delete a zone

1. cfgremove “fabricname” , “zonename”

2. zonedelete “zonename”

3. alidelete “aliasname”

4. cfgsave

5. cfgenable