Cisco MDS SAN Switch Zoning In Command Line

In this post, we will see the commands for the Cisco MDS SAN switch zoning. You can also do the zoning from GUI but using CLI would be much faster.

We suggest you should read the What Is Zoning for better understanding steps.

What Is Zoning?

Zoning is a process of grouping initiator and target ports WWPN which is performed in SAN switch. Once zoning is completed initiator and targets can exchange of FC packets happens between them.

We have already discussed the zoning steps for brocade SAN switch in previous posts.

Cisco MDS SAN Switch Zoning
Cisco MDS SAN Switch Zoning

Steps Of Cisco MDS SAN Switch Zoning

Below are the overall steps of Zoning that need to perform on a switch. We will discuss more on each step in the coming section.

  1. Check Connectivity Status of HBA Port.
  2. Create fcAlias Name For HBA Port WWPN
  3. Create fcAlias for Storage Array Port WWPN.
  4. Create a ZONE and add fcAlias members.
  5. Add the newly created zone to an active zone set.
  6. Commit the zone if extended zoneset is enabled.
  7. Activate the zoneset.
  8. Copy running-config to startup-config.

Cisco MDS SAN Switch Zoning Commands

First, we need to enter into the config mode. In the Cisco switch, all configuration changes happen in configuration mode.

To enter the config mode just execute the below command.

switch# config t

Step 1. Check the connectivity Status of Initiator

First, we need to check if the host is connected to the SAN switch or not. You can check it by executing below command

switch (config)# show fcns database | grep -i 10:xx:xx:xx:xx:xx:xx:xx

If you want to know how devices connect with each other in a SAN network then follow or post on SAN architecture.

Step 2. Create fcAlias

We need to create fcAlias for host WWPN. As a WWPN is difficult to remember so for better management creating fcAlias is good practice.

The below commands creates a fcAlias of host WWPN with the name HostName_hba1in VSAN 3.

switch(config)# fcalias name HostName_hba1 vsan 3
switch(config-fcalias)#
switch(config-fcalias)# member pwwn 10:00:00:23:45:67:89:ab
switch(config-fcalias)#exit
switch(config)# fcalias name Array_Port1 vsan 3
switch(config-fcalias)#
switch(config-fcalias)# member pwwn 50:00:00:53:29:67:89:ab
switch(config-fcalias)# exit
switch(config)#

Similarly, we can create fcAlias for Storage array port or any devices that are connected to SAN switch.

Step 3. Create a zone and add fcAlias Member

After creating fcAlias we need to create a zone in VSAN 3. After creating a zone we need to add fcAlias member into it.

Below commands will create a zone with name Zone1 in VSAN 3 and add two fcAlias member HostName_hba1 and Array_Port1.

switch(config)# zone name Zone1 vsan 3
switch(config-zone)#
switch(config-zone)# member fcalias HostName_hba1
switch(config-zone)# member fcalias Array_Port1
switch(config-zone)# exit
switch(config)#

Step 4. Find Active Zoneset and Zone and Activate it.

Every VSAN has an active zoneset. If a zone is not a part of active zoneset then communication between the zone’s member will not happen.

In the below example, ZoneSet3 is the active zoneset in VSAN 3. We need to add Zone1 in active zoneset ZoneSet3. Finally, we need to activate the zoneset again.

switch(config)# show zoneset active vsan 3
switch(config)# zoneset name ZoneSet3 vsan 3 
switch(config)# zoneset name ZoneSet3 vsan 3
switch(config-zoneset)#member Zone1
switch(config-zoneset)#zone commit vsan 3
switch(config)# zoneset activate ZoneSet3 vsan 3

Step 5. Save The Running Config To Start-Up Config

Finally, we have to copy the running-config to startup-config. This will make sure that even after reboot the zoning information is consistent.

switch(config)# copy running-config startup-config

Cisco MDS SAN Switch Zoning Video

You can also watch below video tutorial on the Cisco MDS SAN switch zoning. You can also subscribe to the Youtube Channel for more such videos.

Leave a Reply

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