FC (Fiber Channel) switch is a networking device which enables 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).
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.Environment
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,
The output of this command can be seen in the following image,
The 20: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 – 20:00:00:11:0a:02:29:b1
Switch Port 2 – HBA2 – 20:00:00:11:0a:02:29:b2
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”, “20:00:00:11:0a:02:29:b1″ switch:admin> alicreate “HostPort2”, “20:00:00:11:0a:02:29:b2″ 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 the following command:
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 the following command:
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.
Hope you find this useful. Zoning in Cisco is a work in progress.
|aliAdd||Add a member to a zone alias|
|aliCopy||Copy a zone alias|
|aliCreate||Create a zone alias|
|aliDelete||Delete a zone alias|
|aliRemove||Remove a member from a zone alias|
|aliRename||Rename a zone alias|
|aliShow||Print zone alias information|
|cfgAdd||Add a member to a configuration|
|cfgCopy||Copy a zone configuration|
|cfgCreate||Create a zone configuration|
|cfgDelete||Delete a zone configuration|
|cfgRemove||Remove a member from a configuration|
|cfgRename||Rename a zone configuration|
|cfgShow||Print zone configuration information|
|zoneAdd||Add a member to a zone|
|zoneCopy||Copy a zone|
|zoneCreate||Create a zone|
|zoneDelete||Delete a zone|
|zoneRemove||Remove a member from a zone|
|zoneRename||Rename a zone|
|zoneShow||Print zone information|
|cfgClear||Clear all zone configurations|
|cfgDisable||Disable a zone configuration|
|cfgEnable||Enable a zone configuration|
|cfgSave||Save zone configurations in flash|
|cfgSize||Print size details of zone database|
|cfgActvShow||Print effective zone configuration|
|cfgTransAbort||Abort zone configuration transaction|
Courtesy of: SAN Enthusiast