Cisco Smart Zoning for NX-OS in the DCNM-SAN GUI

SmartZoning-BenefitCisco Smart Zoning greatly reduces the time needed to zone servers to storage on Cisco NX-OS SAN switches. Instead of creating numerous zones that contain one single initiator and one single target, you can now classify a WWN as initiator, target or both and throw them all into one single zone. The switch then figures out which devices should be allowed to talk with each other (based on the parameter you set for each WWN). Not only does this speed up the entire zoning process but it also helps keep the zoning interface uncluttered and minimize the risk for errors.  Let’s see how you can configure this in the DCNM-SAN GUI…

Zoning 101

A SAN switch (by default) works a lot like a firewall; no communication is allowed between devices. You need to explicitly allow two devices on a SAN switch to communicate with each other. This is called zoning. For example: if you want to allow Host1 to communicate with Storage1, you’d have to zone Host1 to Storage1. Host1 is the Initiator, Storage1 is the Target.

SmartZoning-TraditionalA host is rarely ever connected with just one path to the storage. Usually you connect the host to the storage over 4 paths; one HBA is connected to one SAN fabric, the other HBA to another SAN fabric. Two storage ports are allocated to the host on each SAN fabric, for a total of 4 paths over the two SAN fabrics. You could choose to throw all initiators and all targets in one big zone, but that would give you a zoning topology as displayed in the picture on the right: every single device would try to log in to every other device in the zone. This is not really beneficial to SAN stability and performance…

This resulted in the Single Initiator, Single Target (SIST) zoning best practice. Each zone contains one initiator (=Host HBA) and one target (=Storage front-end port). This means that for one server, you’ll have two separate zones on each fabric, for a total of four zones across both SAN fabrics. Now imagine you have 200 hosts on your fabrics that all connect to two storages. That’s 200x4x2 zones = 1600 zones. A long, long time ago I’ve created a script to automate zoning large amounts of servers: it saved a lot of time, but it was still far from ideal.

Cisco Smart Zoning

SmartZoning-BenefitCisco added Smart Zoning to the feature set in NX-OS 5.2(6), which means you CAN now throw all the initiators and targets into one zone, provided you use Smart Zoning. In this case, instead of the switch allowing all devices to log in to every other device, it will only allow the Initiators to log in to all the Targets. So instead of the full mesh displayed in the traditional zoning approach, you will have a partial mesh which mimics the SIST zoning you would otherwise do manually. So lets see how you configure this in DCNM-SAN.

First of all, you have to enable the smart zoning feature globally.

Smart Zoning GlobalZonePolicy

Navigate to the Fabric -> All VSANs, in the window on the right select Global Zone Policies and change the Smart Zoning behavior to enable.

Next you need to make sure that Smart zoning is enabled for the VSAN itself.

Smart Zoning VSANPolicy

Open up the VSAN in the GUI. If you do not have an active zoneset in your VSAN select “Default Zone” (upper red arrow), else select the active zoneset (lower red arrow). In the window on the right, select the Smart Zoning tab. Now change the command box to “Enable” (you only need to change this for one switch in the fabric) and acknowledge with the green button (green upward arrow in the image above). After a refresh you should see the status switch to Enabled and turn green.

Don’t worry: while you enable Smart Zoning VSAN wide, you can still disable it again on an individual zone basis if you need/want to!

Now for the actual smart zoning…

For each alias you create, you now have to tell the switch whether this is an Initiator (=host), Target (=Storage Port), or a dual personality both-initiator-and-target port (=for example a replication port on a storage array). You do this by selecting the alias, inserting a WWN and afterwards changing the Device Type to either host, storage or both. Don’t forget to apply the changes (blue arrow in the picture below)! In this example I’m setting the device type to Storage for a Symmetrix front-end port (director 4G, port 0).

Smart Zoning Alias Storage

The same can be done for a host:

Smart Zoning Alias Host

With the aliases created, it’s time to add them to a smart zone. When you create a new zone you get the option to enable smart zoning (it should be auto-checked). Else, for existing zones you can enable it manually by checking the option. Both approaches are displayed in the image below.

Smart Zoning - Zone Creation

As you can see I ended up with four zones per fabric: this corresponds with the Port Group configuration on the VMAX. Adding a new host to the VMAX is now as simple as registering the WWN into an alias, changing the device type to Host and moving it into one of the four existing zones. That’s it! No manual searching for which storage front-end ports I should zone to… this is now more or less “enforced” in the initial zoning set-up. This should translate into less errors or less configurations that deviate from the standard. It also allows the SAN admin to quickly report back to the VMAX admin that he “zoned Host1 to VMAX1-PG_ESX1”.

Smart Zoning - Add Alias To Zone

Add the aliasses to the correct zones, add the zones to the zoneset, activate the zoneset and you’re done.

If you want to try the CLI approach, read this post by Rob for the CLI commands. Or if you want to non-disruptively migrate from your traditional zoning to smart zoning, read this post from Mark May.

If you run into any troubles or if Smart Zoning solved one of your headaches, I’d love to hear about it. Happy zoning!

  • dynamox

    Good post,

    a couple of items that would help people transition to SmartZoning

    1) SmartZoning can be enabled on the fly on per VSAN basis, no impact to existing traditional zones
    2) SmartZones and traditional zones can co-exist in the same VSAN. You can slowly migrate away from traditional zones by creating new SmartZone, add it to zoneset and at the same time remove old traditional zones.
    3) As far as i can tell you cannot add fcaliases to SmartZones, device-aliases only.

    • Jon Klaus

      Thanks Dynamox, good addition on the non-disruptive migration from traditional to smart zoning. Didn’t you blog about it a while back? I’ll add a link!

      As for point 3, table 4-3 on http://www.cisco.com/c/en/us/td/docs/switches/datacenter/mds9000/sw/6_2/configuration/guides/fabric/nx-os/nx_os_fabric/zone.html#pgfId-2017149 shows support for: PWWN, FCID, FCalias, Device-alias.
      You cannot add interfaces, IP addresses, Symbolic nodenames, FWWN or DomainIDs to smart-zones.

      • dynamox

        i am not seeing FCalias as an option when adding members to the zone. Do you ?

        • Jon Klaus

          I’m using NX-OS 6.3 and it does allow adding fcaliasses to a smart zone. I’ve added another picture (last one in the post) to reflect it; see?
          Maybe you’re using an older NX-OS version?

          • dynamox

            6.3 or 6.2 ?

          • Jon Klaus

            The switches run NX-OS 6.2(3) and DCNM-SAN is 6.3(1)