How to create zones from CLI on a Brocade SAN Switch

SAN zoning is a method of creating  logical groups over the physical configuration of the fabric and  allowing communication / access  of Fibre Channel devices by grouping  them .  And zoning manages  communication of hosts and storage nodes ,  zone contains WWN name of these devices . A World Wide Name, or WWN, is a 64-bit address used in fibre channel networks to uniquely identify each element in a Fibre Channel network.Normally everyone uses GUI for creating zone because looks very easy on GUI, but there is dependency JAVA with specific version. When we ran latest version java we will face difficult with GUI mode so we have to go with CLI. Here I describes the procedure that should be followed to configure zoning on a Brocade switch using the CLI.Follow the below procedure to create zone from CLI1.Run the switchshow command.This will help you to identify the HBA address of both the target and initiator ports which will be required  for configuration.

admin> switchshow

Note:Any devices that connect using NPIV use nsshow command to find the WWPN addresses logged in to the port.If you cannot find the WWPN listing, you have to identify the WWPN manually from server / HBA and run “nodefindWWPN “ to verify that the WWPN is available on switch for zoning.

2.Run the cfgshowcommand

admin> cfgshow

cfgshow will display the configuration and how the zoning is currently configured. This will display two sections, Defined Configuration and Effective Configuration.

  • Defined Configuration – It is the section in which zones and aliases are listed. Any previously created zoning configurations that available are also displayed.
  • Effective Configuration – it is the current running configuration or configuration in production.

3.Run the alicreate command to create aliases for the HBA addresses that you identified by either running switchshow command or manually.

admin> alicreate “ALIAS_NAME”, “WWPN”

Note :You can do this for both the Initiators and Target addresses

4.Run the zonecreate command to create the zone.

admin> zonecreate “ZONE_NAME”, “ALIAS_NAME_OF_INITIATOR” 

Note :-  You may use  multiple alias’s or single alias while creating zone  , multiple alias’s can be added by “ALIAS1;ALIAS2”  , Also note that there should not be any space after zone name .

5.Run the zoneadd command to add the aliases of the Target ports to the zone that was created.

admin> zoneadd “ZONE_NAME”, “ALIAS_OF_TARGET(S)”

6.Once zone is created, add it to an active configuration or a new configuration by running either the cfgadd command or cfgcreate

Add to an existing configuration   

admin> cfgadd “CONFIG_NAME”,”ZONE_NAME” 

Add the newly create zone to the configuration

admin> cfgcreate “NEW_CFG_NAME”,”ZONE_NAME”

7.Next you have to save the configuration by running the cfgsave And it will prompt for yes / no  you have to hit  yes at the prompt to save the configuration and this does not put the configuration into production

admin> cfgsave


8.To activate the created zoning, run the cfgenable And it will prompt for yes / no, you have to hit yes at the prompt to activate the configuration

admin> cfgenable CONFIG_NAME

Note: This will put the zone into the Effective Configuration and will be live in production.

Check More useful Commands on POST