Saturday, 24 December 2011

A Brocade Switch CLI Zoning Configuration Walkthrough

Scenario:

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.

Walkthrough:

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.

Example:

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.

Example:

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

ESX02z

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

50:00:1f:e1:50:0b:81:5c

50:00:1f:e1:50:0b:81:58

10:00:00:00:c9:5e:8d:06

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.

Example:

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.

Example:

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

Example:

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.

Example:

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

Example:

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.

Run the cfgenable command to enable the configuration, entering yes to the prompt.

Example:

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.

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.