Zoning in Cisco devices is pretty straightforward. A zone contains multiple zone members. Zone members are device pWWN (pWWN of the N-Port attached to the switch), fabric pWWN (Switch port pWWN – Port based zoning) etc. This tutorial is based on the attached device pWWN. As this is more common and have advantages when compared with other types of zone membership. Once a zone is added with members, it is added to a zone set. A zoneset is a collection of zones. Consider reading Zoning in Brocade FC SAN switch for beginners to understand the basics and the need for zoning.
Best practice is to configure a zone with single initiator and single target. This is to avoid unnecessary use of switch resources. Although zones are contained in a VSAN, only one zoneset can be active at any given time. When you activate a zoneset the configuration information is sent to all other switches in the fabric and it the new zoneset is enforced on all switches. For easy understanding here is a picture of zones which contains single initiator and target,
As you can see, a fabric means collection of switches (inter connected together) or a single switch. S1, S2, S3 are storage devices and H1, H2, H3 are hosts. The next image illustrates how zones and zonesets are represented in a fabric,
Here is a summary of what we discussed,
- pWWN of devices attached to switch port is called zone member and it is added to a zone.
- One or more zones are then added to a zoneset.
- Finally, only one zoneset is activated and the change propagates fabric wide.
Before proceeding further identify and make a note of the pWWN’s of N-Ports that are going to be zoned together.
Zoning CLI commands
Since zones are contained in a VSAN, Any zone creation must happen on the concerned VSAN. First, we need to enter into the configuration mode and then into VSAN.
Step 1: Enter configuration mode
Step 2: Creating zone (testzone) on VSAN 100
Step 3: Adding members to the newly created zone
and repeat the same to add another member (target)
Step 4: Add the newly create zone to test_zoneset.
The above command selects the zoneset test_zoneset
Now we have added the newly created zone to zoneset in fabric. Next step is to active the zoneset.
Step 5: Activating the zoneset is an online process and the ports/devices which is being configured/re-configured are only affected.
Final Step: Once the zoneset is activated the running configuration must be copied to the startup configuration. This is done to prevent the switch from losing the configuration information. The following command copies the running configuration to the startup configuration on all switches in fabric.