Using Device Aliases on a Cisco MDS

Last year, I posted a couple of articles on configuring and managing Cisco MDS Fibre Channel zones via the CLI:

New User’s Guide to Configuring Cisco MDS Zones via CLI
New User’s Guide to Managing Cisco MDS Zones via CLI

In those posts, I discussed the use of the fcalias command to create aliases for World Wide Port Names (WWPNs) on the fabric. A couple of people suggested via Twitter and blog comments that I should use device aliases instead of the the fcalias command. As a follow up to those posts, here is some information on using device aliases on a Cisco MDS Fibre Channel switch.

To create a device alias, you’ll use the device-alias database command in global configuration mode. Once you are in database configuration mode, you can create device aliases using the device-alias command, like this:

mds(config)# device-alias database
mds(config-device-alias-db)# device-alias name <Friendly name> pwwn <Fibre Channel WWPN>
mds(config-device-alias-db)# exit
mds(config)# end

There is an additional step required after defining the device aliases. You must also commit the changes to the device alias database, like this:

mds(config)# device-alias commit

This commits the changes to the device alias database and makes the device aliases active in the switch.

Once a device alias is created, it applies to that WWPN regardless of VSAN. This means that you only have to define a single device alias for any given WWPN, whereas with the fcalias command a different alias needed to be defined for each VSAN. All other things being equal (and they’re not equal, as you’ll see in a moment), that alone is worth switching to device aliases in my opinion.

Using device aliases also provides a couple other key benefits:

  • Device aliases are automatically distributed to other Cisco-attached switches. For example, I defined the device aliases on a Cisco MDS 9134 that was attached to the Fibre Channel expansion port of a Cisco Nexus 5010 switch. The Nexus switch automatically picked up the device aliases. As best I can tell, this is controlled by the device-alias distribute global configuration command (or its reverse, the no device-alias distribute, which would disable device alias distribution).
  • Once a device alias is defined for a WWPN, anytime the WWPN is displayed the device alias is also displayed. So in the output of various commands like show flogi database, show fcns database, or show zone you will see not only the WWPN, but also that WWPN’s associated device alias.
  • You can use the device alias as the destination with the fcping command.

All in all, I see a lot of value in using device aliases over simple Fibre Channel aliases. I’ll grant that some of this value is more readily apparent only in homogenous Cisco storage networks, but even in single-switch networks I personally would use device aliases.

To those who suggested I look at device aliases, I thank you! You’ve made my job easier.

As always, I welcome your feedback! Feel free to speak up in the comments with corrections, clarifications, or suggestions.

Tags: , , ,


  1. Jeff’s avatar

    Hi Scott,

    I was wondering if there was a way to track switchport info for a specific pwwn in a multiple MDS Switch environment. “show fcns database” doesn’t seem to map the switch/switchport info. I don’t seem to have access to “show alpa cache”.


  2. Chris’s avatar

    As we are currently migrating to a pair of MDS9509′s, I’ve learned a lot of the commands hook into Cisco Fabric Services (CFS) which allows for the distribution of configuration data in a fabric.

    Another cool ability of the switches is Dynamic Port VSAN Membership (DPVM) which allows you to assign VSAN membership to a device-alias and not a port. DPVM also uses CFS so you can take a connection move it anywhere in your fabric and it still retains connectivity to its VSAN.

  3. shidi’s avatar

    Hi Guru,

    Since we apply the device aliases instead of the the fcalias command,should the below CLI is the next step for the zoning?Kindly help me due to I’m still new with the cisco product..

    switch(config)# zone name first-new-zone vsan XXX
    switch(config-zone)# member device-alias stor-array-processor-a
    switch(config-zone)# member device-alias server-hba
    switch(config-zone)# exit


  4. slowe’s avatar

    Shidi, yes, that is correct. You use the “member device-alias” command to add device aliases to the zones instead of “member fcalias”.

    I hope this helps!

  5. shidi’s avatar

    ah thanks Scott… are awesome… :-)

  6. shidi’s avatar

    Hi Guru,

    I have another concern when we create the device-alias zone.Should the below output correct ?

    SELDSSW07# sh zone | include SELDCLU79B_SW701_B11
    device-alias name SELDCLU79B_SW701_B11 vsan 3
    pwwn 50:01:43:80:00:bf:9e:14 [SELDCLU79B_SW701_B11]

    P/s-I am manually replace the fcalias with the device-alias for my better understanding.Do correct me if my imagination is wrong since i’m still in a dumb category in Cisco SAN switch.Please…


  7. slowe’s avatar

    Shidi, it looks like the output is correct, at least with regard to the “pwwn” statement. What you’ll see when using device aliases is that the MDS will show the pWWN followed by the device alias in brackets. So, it looks like your device alias is set correctly, based on the limited output above.

  8. Matt’s avatar


    What’s the defferent between fcalias and device-alias?


  9. slowe’s avatar

    Matt, most of the differences are laid out in the article itself. For one, an fcalias is a per-VSAN setting, whereas a device alias is not. Refer back to the Cisco documentation for more details. If I get a chance, I’ll try to post something else about the differences between the two.

  10. Brian’s avatar

    Hi Scott-
    Wondering about the security implications of having Dev Aliases be seen by all VSANS.

    For example on a Cisco 9513 you can have a physical separation of VSANs…electronically.

    So here is a scenerio:
    The lawyers in a huge lawfirm have separate storage and SAN admins for courtroom and sensitive data and marketing and general office data on each VSAN. They bought the infrastructure using combined funding for infrastructure. They chose Cisco MDS do to it’s inherit physical separation of VSANs and for complying with regulations.

    VSAN112 (faba) and VSAN113 (fabb) contain sensitive courtroom data (say this is the lawyer’s super secrete secure stuff)
    VSAN12(faba) and VSAN13(fabb) are hosts/systems that contain public websites, etc. (say this is the law office’s arrays and marketing things)

    I can see in this scenerio you would want to use FCalias over DevAliases for they are defined per-vsan.

    Would it be a good idea to use Dev Aliases at this point? This could lead to someone accidentally putting one of these WWPN’s in the wrong vsan where as with fcalias’s things keep separate…. Or could you use a combination of both? And at that point would you want to do zoning using FCalias or Devalias?

    Any thoughts? Thanks!

  11. slowe’s avatar

    Brian, I personally don’t see any real concerns with the device alias being visible on multiple VSANs, since it’s “visible” only to the SAN administrator managing the MDS switch itself (or multiple MDS switches, depending on the SAN). Further, the presence of device aliases does not infer visibility across the fabric; you would still need to create zones and zonesets in order for initiators and targets to communicate. Finally, many hosts do not support F-port VSAN trunking, so they could only be part of one VSAN at a time anyway. Thus, the fact that a device alias exists for that host in another VSAN is a moot point since the host is in a different VSAN and can only communicate on a single VSAN at a time.

    My 2 cents…

  12. Brian’s avatar

    Awesome, thanks. The more I learn about device aliases the more I like the idea. Do you know of a tool that converts FC to Device? I figure that would be a very cool tool to have when migrating fabrics off of old non-Cisco hardware to Cisco.

    This is good stuff… Would also like to hear opinions on single initiator -> single target vs. single initiator -> multi-target (same array) zoning as well. But that could be an entire blog post in itself. Both seem correct if done correctly (that is why I made the “same array” comment) but I am always going back and fourth of what would be the ‘best’ way. Especially in SANs that contain many Arrays and 100′s or 1000′s of hosts. Then again that is probably what multiple VSANs are for :)

    Great blog…I refer to it a lot.

  13. Brendon’s avatar

    If you use device aliases make sure you enable the following if possible:

    device-alias mode enhanced

    Otherwise when it comes time to change the WWN of a device, eg due to HBA swap over, you will need to update the Device-Alias, and the associated zoning information.

    In enhanced mode the WWN in the zone is subsituted for the device-alias. To change a HBA in a host you then only need to modify the WWN associated with a device-alias.

    more info here:


  14. slowe’s avatar

    Brendon, is enhanced mode the default mode of operation for device aliases?

  15. Brendon’s avatar

    I don’t think so.

  16. Bruce’s avatar

    How does one properly chanage the wwpn of a device-alias? example an HBA fails and is replaced. I would like to just modify the definition. I’m found no way to do this in Fabric Manager. in cli I can do a “no device-alias hba-1″ than give it a new device alias but that does not appear to get reflected in my zones.

  17. Al’s avatar

    when you look at your zones are they built with device-alias members or wwn members? If you don’t have enhance device alias enabled then when you build your zones using the device-alias they get converted to use the wwn of the device-alias at the time.

  18. Ricky’s avatar

    Hello Scott,

    I have MDS 9513 , I have zoned using pwwn for zoning, when I do show zoneset active it displays * [pWWN], is it normal? wheres in my other 9513 Switch it only displays Pwwn in show zoneset active



  19. slowe’s avatar

    Ricky, the “*” represents a pWWN that has logged into the fabric (as far as I know). If there is no asterisk then that pWWN hasn’t logged into the fabric.

  20. Eddie’s avatar

    Hi Scott,

    I am currently setting up a pair of MDS 9148s. To save me from having to add new (virtual) WWNs everytime a new virtual HBA is added on the hardware nodes, I have added the Port-Channel group into the zone. Unfortunately, this is working for one fabric but not the other.

    What would you use for setting this up so that the new WWNs are added into the zones automatically?


  21. Periyakaruppan’s avatar

    Friends, I always have doubt… how would we differetiate the zones whether its created using device alias or pwwn? is there any clue to differentiate them?

  22. Lokesh’s avatar


    Can we create multiple zones across multiple vsans using the device alias ?


  23. slowe’s avatar

    Eddie, I don’t know why your configuration isn’t working. I didn’t get the opportunity to work (much) with port-channels during my time with MDS switches.

    Periyakaruppan, the CLI display will show the device-alias next to the pwwn, if I recall correctly (although it’s been a while since I checked).

    Lokesh, yes—using the device alias instead of fcalias allows you to have one definition across multiple VSANs.

  24. Jorge’s avatar

    Hello Scott,

    Great tips, thanks… I have already implemented a Data Center Solution with two MDS and two Nexus, Now, I want to move the Vmware and servers VLANs Interfaces (L3) from my catalyst4500s to my 2 nexus. My Catalyst 4500s are running OSPF so I ‘m planning configuring HSRP in My Nexus 5548UP and enable OSPF to route traffic from theses Nexis – SVIs and my LAN. The two Nexus have a VPC connection.

    Thanks in advance,


  25. bhuvan’s avatar

    Can anyone help me on how to edit existing zone throug CLI? Already a working zone is defined and added to zoneset in active state. Now i need to add two more members of SP ports into existing zone.

  26. Periyakaruppan’s avatar


    I don’t think so. Even both zones does show the alias name next to the pwwn.

  27. Periyakaruppan’s avatar

    Brenden, This is about your reply as on Wednesday, August 17, 2011 at 12:50 am

    I am quite confused with the device alias modes, and the usage in zones.
    I am converting all my fabric zones to make use of the device alias, so I can avoid working on multiple zones in terms of HBA replacement. As you said, Should I change the mode to “enhanced”?

    If then why its letting me to create the multiple zones and activating the zonesets which is enhanced mode while the device alias database is in basic mode.

    Will it be smoother and take effect on all the zones if I change an existing device alias name?

  28. Periyakaruppan’s avatar

    I tested creating zone with both device alias and pwwn, that looks like

    zone name E3B10-ESXTEST2-HBA0-xxxx-EMC-VNX-SPB1 vsan zxxx
    pwwn xxxxxxxxxxxxxx
    pwwn xxxxxxxxxxxxxx
    device-alias ESXTEST2-HBA0

  29. user’s avatar

    I am sure that the specified command aliases in?

  30. Periyakaruppan N’s avatar

    For this you must ensure the zone ddatabase on enhanced mode else that’s going to take no effect.

  31. goldcarp’s avatar

    Is it possible to use device-alias inside fcalias? I don’t have a switch to test right now but it can be handy to group devices using fcalias, such as all tape drives in a library which need to be accessed by a server the same way.

    ! Say we have a library named as SILO and a server myserver01
    device-alias name SILO_01 pwwn 50:05:07:63:xx:xx:xx:xx
    device-alias name SILO_02 pwwn 50:05:07:63:xx:xx:xx:xx
    device-alias name SILO_03 pwwn 50:05:07:63:xx:xx:xx:xx
    device-alias name SILO_04 pwwn 50:05:07:63:xx:xx:xx:xx
    device-alias name myserver01 pwwn xx:xx:xx:xx:xx:xx:xx:xx

    fcalias name SILO vsan 10
    member device_alias SILO_01
    member device_alias SILO_02
    member device_alias SILO_03
    member device_alias SILO_04

    zone name myserver01_SILO vsan 10
    member device_alias my server01
    member fcalias SILO

  32. Atish Patel’s avatar

    Can we add fcalias and a device alias in a single zone.
    Say my Frame ports are present VSAN101 and i have created devices alias and my Host HBA ports are in VSAN102 having fcalias can both of them can be added in a single zone and the zone is present in VSAN102 ?

  33. goldcarp’s avatar

    Finally I got a chance to test the mix of fcalias and device-alias in the same configuration. It works great. Using fcalias to group hundreds of targets into a few groups makes the zone config much cleaner.

Comments are now closed.