Fiber Channel switch is a networking device which enables a large number of hosts to connect with one or many storage arrays. A storage array can be directly attached to a host. Due to the limited number of ports available on the array, a switched network is necessary for it to connect to a large number of hosts. A switched network is a high-speed network with one or many fiber channel switches. This switched network is referred as Fabric. In a fabric, the initiator will be able to reach a target that is across many hops. Each switch will at least connect to another switch and it is called an ISL (Inter-Switch Link). Please keep in mind that what we discuss in this article applies only to SAN fabrics and switches using fiber channel technology. Most people will refer to a single switch as a “fabric” this is simply wrong. The fabric is virtual and not physical. Therefore, a switch is a fabric device. One or more switches form a fabric.

Why Zone?

Typically most SAN switches will have at least 8 to 16 ports. At most SAN directors will have the ports more than 250. In a traditional data center, fabric and the storage array is given more importance and are always redundant to avoid unexpected and unnecessary downtime. A single switch with 8 ports can connect to 8 different devices or 4 devices (two connections per device for redundancy). What if the switch itself goes offline? In that case, nothing can be done. Therefore, even a small server room with SAN fabric is designed with two or more switches for redundancy.

Why zone? The answer is, to be able to avoid unnecessary traffic between devices participating in fabric and to enhance security. By creating zones we are logically partitioning the fabric so that the communication happens only with the intended devices. Most popular vendors of storage networking are Brocade and Cisco. Devices from both these vendors do the same thing but the configuration greatly varies. In this article, we discuss how we perform zoning in fiber channel switches manufactured by Brocade. Before jumping into the procedure let’s spend some time to understand the basics of zoning.

Basics of Zoning

Each device in a fiber channel fabric will have a unique Word Wide Name (WWN). WWN is a unique identifier which is burned into the hardware. Each vendor gets their own identifier. It is a 64-bit address. It is similar to an MAC address that you find in a NIC. There are two types of WWNs,

  • Word Wide Node Name (WWNN)
  • Word Wide Port Name (WWPN)

What this means in terms of zoning is that we can identify devices in fabric using WWNN or WWPN. The idea is to bind WWPN’s of intended devices (ports) together. This binding is called zoning and it enables the devices to communicate with each other. The following picture describes our environment for which we are going to perform zoning. The steps illustrated in the article must be performed on the switch shell access. If you are by any chance logged in to the GUI, login to switch using SSH or Telnet.

Preparation

When you access shell of a device you carry a great responsibility. Executing wrong commands or typos will cause adverse effects, In order to avoid such mistakes, we must note down the WWN’s of the device which we are going to zone together and must decide on naming convention for them. Most IT organization follows a uniform naming convention. To see the devices which are logged into the switch the following commands can be executed,

switch:admin> switchshow

The output of this command can be seen in the following image,

The 10:XX:XX:XX:XX:XX:XX:XX that you see on the image is the WWPN of the device connecting in that port. It can be a storage array, HBA port or another switch. We will use this WWPN of the connecting device to zone with another. As an example let’s assume the following values,

Switch Port 1 – HBA1 - 10:00:ff:05:1e:4b:d5:30
Switch Port 2 – HBA2 - 10:00:ff:05:80:00:48:a5
Switch Port 12 - Storage Array port1 - 50:01:10:80:00:ad:33:e8
Switch Port 13 - Storage Array port2 - 50:02:10:80:00:ac:f5:54

In the next step we are going to zone HBA1 with Storage Array port 1 and HBA2 with Storage Array port2.

Brocade Switch Zoning Steps

The WWPN that we just noted down is not easy to remember and it is not easy to type while zoning. To reduce the complexity and to avoid error we create an “Alias” for each WWPN or a group of WWPN’s. Alias is a logical group of a single WWPN or a number of WWPN’s.

Step 1: Let’s assign an alias for each WWPN Following is the syntax,

switch:admin> alicreate “HostPort1”, “10:00:ff:05:1e:4b:d5:30″switch:admin> alicreate “HostPort2”, “10:00:ff:05:80:00:48:a5″switch:admin> alicreate “StoragePort1”, “50:01:10:80:00:ad:33:e8″switch:admin> alicreate “StoragePort2”, “50:02:10:80:00:ac:f5:54″

To verify run command, alishow “HostPort1” and so on.

Step 2: Now we are going to create two zones with two aliases in them (1 host port and 1 storage port)

switch:admin> zonecreate “zone1”, “HostPort1; StoragePort1”switch:admin> zonecreate “zone2”, “HostPort2; StoragePort2”To verify run command, zoneshow “zone1” and so on.

Step 3: Next step is to create a configuration which will hold the zones that we just created. The following command creates a configuration named “AppServer” and then adds both zones to it.

switch:admin> cfgcreate "AppServer", "zone1;zone2"

Final Step: Now that we have created a configuration we must enable it for it to act, following syntax enables AppServer configuration. At any given time there can be only one active configuration. But in switch database, there can be multiple.

switch:admin> cfgenable "AppServer"

Note: Names for Alias, Zones, Zone configuration is case-sensitive, it must begin with a letter and can be followed by any number of letters, numbers, and underscore characters.

Leave a Reply

Your email address will not be published. Required fields are marked *