Cisco MDS SAN switch Zoning via CLI
Here let’s discuss the steps to complete the zoning of a new server in Cisco MDS FC switch. In our previous post we had discussed the initialization procedure for a new MDS switch – may be helpful for you. The process of zoning will have 3 components, namely aliases, zones and zoneset (or zone configuration).
If you have a Brocade switch, you may refer to this post which explains zoning in a Brocade switch via CLI.
An alias is a name assigned to the WWN numbers which makes it easy to use/remember. WWN numbers – identity for a device, will have numbers separated by colon (:), for e.g, 10:ab:cd:ef:12:34:56:78 – are harder to be remembered.
A zone will be containing multiple objects which defines a communication path. In a zoning enabled switch, any two WWNs or port which are not having a common zone (which are not part of a single zone together) will not be able to communicate each other. We will create a Zone and will add the objects (WWNs, aliases or ports) to it.
A zoneset or a zone configuration is a collection of a set of zones in a switch/fabric. It makes easy to manage the zones. We will define an active configuration in switch/fabric and will add the zones, which need to be active, to this configuration.
Now let’s discuss the commands.
First we will create an alias for the new server HBA and the storage port to which it need to communicate.
BForum_SAN01(config)# fcalias name BForum_HBA1 vsan 20 # This will create an alias with name BForum_HBA1
BForum_SAN01(config-alias)# member pwwn 10:xx:xx:xx:xx:xx:xx:01 # Adds the WWN to this alias
BForum_SAN01(config)# fcalias name VNX_SPA3 vsan 20
BForum_SAN01(config-alias)# member pwwn 50:xx:xx:xx:xx:xx:xx:01
Now we have the aliases ready. We can now create a zone for these two objects and add them. We will create a zone named ‘BForum_HBA1_VNX_SPA3’ which will be containing the host HBA (BForum_HBA1) and the storage port (VNX_SPA3).
BForum_SAN01(config)# zone name BForum_HBA1_VNX_SPA3 vsan 20
BForum_SAN01(config-zone)# member fcalias BForum_HBA1
BForum_SAN01(config-zone)# member fcalias VNX_SPA3
Zone too is ready now. Assuming we don’t have an existing configuration, we will be creating a zone config here. If you are already having a zoneset, you can use the zoneset name here in the below command.
BForum_SAN01(config)#zoneset name BForum_SAN01_Config VSAN 20
BForum_SAN01(config-zoneset)# member BForum_HBA1_VNX_SPA3
Now we have the zoneset created and zones added to it. We are good to activate the new zoneset.
BForum_SAN01(config)# zoneset activate name BForum_SAN01_Config VSAN 20
To verify the active zoneset, you may run the command show active zoneset
In case if you have to deactivate the zoneset, you may run the command,
BForum_SAN01(config)# no zoneset activate name BForum_SAN01_Config VSAN 20
We can save the running config to start-up config by running copy run start command. Now we have the zoning completed for one of the HBA of the new server. We will have to do the zoning for both the HBAs and should use multiple storage ports for redundancy.
You may click here for SAN switch related posts.
Hope this post was helpful for you. More, in coming posts, your thoughts in comments below… 🙂