A Brocade Switch CLI Zoning Configuration Walkthrough


A new VMware host server has been purchased with a couple of Fibre Channel (FC) HBAs. You are tasked with patching the fibre cables into a Fibre Channel switch stack pair – one fibre cable per switch – and then need to configure the zoning on the FC switches to support connection to an FC SAN.


Note: The output examples below have been truncated to show just the most interesting bits. In the examples we are configuring the zoning for a new host called ESX03, have connected the FC HBA's into ports number 8 on each FC switch. The FC switches are called FCSW01 and FCSW02. The FC switches used were HP 4/16 B-Series (Brocade) running Fabric O/S 6.2.2d. And the SAN is a HP EVA with two controllers (EVA_ContrA and EVA_ContrB.)

Using a tool like Putty (for SSH, Telnet, Serial, ...) or similar, and via a connection to a fibre channel switch using either a serial console connection or ethernet management interface; log in to the CLI and run these commands:

Step 1:> switchshow
Run the switchshow command to find the zoning config name and WWN of newly connected HBA. Copy the WWN for later use.

The example below shows the config name "Company_Default" and looking on the line for port 8 gives us the WWN of connected FC HBA

FCSW01:admin> switchshow
zoning: ON (Company_Default)

Area Port Media Speed State Proto
8 8 id N4 Online F-Port 10:00:00:00:c9:83:63:1d

Step 2:> cfgshow
Run the cfgshow command to display the configuration and see how the zoning is currently configured.

The example below shows how the ESX02 zone (ESX02z) is configured. The ESX02 zone contains the EVA SAN's controller A port 1 and controller B port 1 (controller ports 2 are plugged into FCSW02,) and the ESX02 hosts FC HBA which is connected into FCSW01.) Also displayed are the aliases used and their associated WWNs.

FCSW01:admin> cfgshow
Defined configuration:
cfg: Company_Default
zone: ESX02z EVA_ContrBP1; EVA_ContrAP1; ESX02
alias: EVA_ContrBP1 50:00:1f:e1:50:0b:81:5c
alias: EVA_ContrAP1 50:00:1f:e1:50:0b:81:58
alias: ESX02_1 10:00:00:00:c9:5e:8d:06

Effective configuration:
cfg: Company_Default
zone: S_ESX02z

Step 3:> alicreate "NAME", "WWN"
Run the alicreate command with the alias name you want to give to the connected FC HBA, and the WWN number obtained from step 1.

The example below shows creation of an alias name of ESX03_1 for the new host ESX03's 1st HBA, with WWN 10:00:00:00:c9:83:63:1d

FCSW01:admin> alicreate "ESX03_1", "10:00:00:00:c9:83:63:1d"

Step 4:> zonecreate "NAME", "ALIASofFCHBA"
Run the zonecreate command to create a zone for the VMware host server, and use the alias created in step 3 to add the FC HBA to the zone.

The example below shows creation of a zone called ESX03z with the alias ESX03_1 added

FCSW01:admin> zonecreate "ESX03z", "ESX03_1"

Step 5:> zoneadd "NAME", "ALIASofSAN(s)"
Run the zoneadd command to add the aliases of the SAN's FC controller ports to the zone

The example below shows addition of the EVA's controller A port 1 (EVA_ContrAP1) and controller B port 1 (EVA_ContrBP1) to the ESX03z zone.

FCSW01:admin> zoneadd "ESX03z", "EVA_ContrAP1"
FCSW01:admin> zoneadd "ESX03z", "EVA_ContrBP1"

Step 6:> cfgadd "CONFIG_NAME","ZONEtoADD"
Run the cfgadd command to add the newly create zone to the configuration.

The example below shows the addition of the ESX03z zone to the Company_Default configuration.

FCSW01:admin> cfgadd "Company_Default","ESX03z"

Step 7:> cfgsave
Run the cfgsave command to save the configuration, entering yes to the prompt


FCSW01:admin> cfgsave
You are about to save the Defined zoning configuration. This action will only save the changes on Defined configuration. Any changes made on the Effective configuration will not take effect until it is re-enabled.
Do you want to save Defined zoning configuration only? (yes, y, no, n): [no] yes
... FCSW01, cfgSave completes successfully. ...

Step 8:> cfgenable CONFIG_NAME
Run the cfgenable command to enable the configuration, entering yes to the prompt.


FCSW01:admin> cfgenable Company_Default
You are about to enable a new zoning configuration. This action will replace the old zoning configuration with the current configuration selected. If the update includes changes to one or more traffic isolation zones, the update may result in localized disruption to traffic on ports associated with the traffic isolation zone changes.
Do you want to enable 'Company_Default' configuration (yes, y, no, n): [no] yes
... zone config "Company_Default" is in effect ...
Updating flash ...

Step 9: Repeat
Repeat Steps 1 to 8 on the other FC Switch, for the VMware hosts 2nd FC HBA, and FC SANs other controller ports.


Note: Instead of adding WWNs to zones, can also designate specific ports to be a member of a zone (a default configuration may have one zone with all ports designated.)

In the example below, instead of defining a WWN for ESX01 (as is done for ESX02), a port number is designated instead:
alias: ESX01_SP3 1,3
alias: ESX02 10:00:00:00:c9:5e:8d:06

For Search Engine: How to configure / setup additional zoning - using CLI - on a Brocade switch.


  1. switchshow port online and port nuber not show

  2. switchshow command port online and port nuber not show

  3. on the configShow output on switch we have to only two WWN ,one should be the HOST server HBA,two should be the the EVA WWN number .. but we are seeing 3 WWN.

    do you configure all EVA port on SAN switch 1 and 2 ?

  4. Very detailed and informative blog! Can the Alias part skipped and go straight to zonecreate?

    1. alias create is to provide userfriendly naming convension for easy understanding just looking in configuration. If people are confident and easy to remember using port or wwn, then they can go with zone creation.

      Please correct me if my understanding is wrong.

  5. Is it possible to update a already created zone with new members, WITHOUT deleting the zone and subsequent recreation?

    1. Yes, you can update the existing active zone without deleting.

      but as best practice, before doing any changes on your active zoneconfig. make a backup so that you can easily restore the config if you have made a mistake,

      for example, if you want to add additional member in the existing zone, you can used zoneadd and cfgadd..

      below link can help you to better understand zoning on brocade.


  6. This comment has been removed by a blog administrator.

  7. which is the best practice to perform the zoning with WWPN or WWNN

  8. Very much Helpful. I was working on the FC switch long back. I remember when I saw this post and configured in one shot successfully.

  9. exelent! worked perfctly!!! thanks so much


Post a Comment