Distributing Device Alias Services

This chapter describes how to distribute device alias services.

This chapter contains the following sections:

Distributing Device Alias Services

Cisco SAN switches support Distributed Device Alias Services (device aliases) on a fabric-wide basis.

Information About Device Aliases

Cisco SAN switches support Distributed Device Alias Services (device aliases) on a fabric-wide basis.

When the port WWN (pWWN) of a device must be specified to configure features (for example, zoning) in a Cisco SAN switch, you must assign the correct device name each time you configure these features. An inaccurate device name may cause unexpected results. You can circumvent this problem if you define a user-friendly name for a pWWN and use this name in all the configuration commands as required. These user-friendly names are referred to as device aliases.

Device Alias Features

Device aliases have the following features:

  • The device alias information is independent of the VSAN configuration.

  • The device alias configuration and distribution is independent of the zone server and the zone server database.

  • The device alias application uses the Cisco Fabric Services (CFS) infrastructure to enable efficient database management and distribution. Device aliases use the coordinated distribution mode and the fabric-wide distribution scope.

  • Basic and enhanced modes.

  • Device aliases used to configure zones are displayed automatically with their respective pWWNs in the show command output.

Device Alias Requirements

Device aliases have the following requirements:

  • You can only assign device aliases to pWWNs.

  • There must be a one-to-one relationship between the pWWN and the device alias that maps to it.

  • A device alias name is restricted to 64 alphanumeric characters and may include one or more of the following characters:

    • a to z and A to Z

    • Device alias names must begin with an alphabetic character (a to z or A to Z).

    • 1 to 9

    • - (hyphen) and _ (underscore)

    • $ (dollar sign) and ^ (up caret)

Device Alias Databases

The device alias feature uses two databases to accept and implement device alias configurations.

  • Effective database—The database currently used by the fabric.

  • Pending database—Your subsequent device alias configuration changes are stored in the pending database.

If you modify the device alias configuration, you need to commit or discard the changes as the fabric remains locked during this period.

Device alias database changes are validated with the applications. If any of the applications cannot accept the device alias database changes, then those changes are rejected; this applies to device alias database changes resulting from either a commit or merge operation.

Creating Device Aliases

You can create a device alias in the pending database.

SUMMARY STEPS

  1. configure terminal
  2. device-alias database
  3. device-alias name device-name pwwn pwwn-id
  4. no device-alias name device-name
  5. device-alias rename old-device-name new-device-name

DETAILED STEPS

  Command or Action Purpose

Step 1

configure terminal

Example:
switch# configure terminal
switch(config)#

Enters global configuration mode.

Step 2

device-alias database

Example:
switch(config)# device-alias database
switch(config-device-alias-db)#

Enters the pending database configuration submode.

Step 3

device-alias name device-name pwwn pwwn-id

Example:
switch(config-device-alias-db)# device-alias name mydevice pwwn 21:01:00:e0:8b:2e:80:93

Specifies a device name for the device that is identified by its pWWN. Starts writing to the pending database and simultaneously locks the fabric as this is the first-issued device alias configuration command.

Step 4

no device-alias name device-name

Example:
switch(config-device-alias-db)# no device-alias name mydevice

Removes the device name for the device that is identified by its pWWN.

Step 5

device-alias rename old-device-name new-device-name

Example:
switch(config-device-alias-db)# device-alias rename mydevice mynewdevice

Renames an existing device alias with a new name.

EXAMPLES

This example shows how to display the device alias configuration.

switch# show device-alias name x
device-alias name x pwwn 21:01:00:e0:8b:2e:80:93

Device Alias Modes

When operating in basic mode, which is the default mode, the device alias is immediately expanded to a pWWN. In basic mode, when device aliases are changed to point to a new HBA, for example, that change is not reflected in the zone server. Users must remove the previous HBA's pWWN, add the new HBA's pWWN and then reactivate the zoneset.


Note


Cisco NX-OS Release 9.3(3) supports only the basic mode.

Beginning Cisco NX-OS Release 9.3(5), both basic and enhanced device alias modes are supported.


When operating in enhanced mode, applications accept a device alias name in its native format. Instead of expanding the device alias to a pWWN, the device alias name is stored in the configuration and distributed in its native device alias format. So application such as zone server can automatically keep track of the device alias membership changes and enforce them accordingly. The primary benefit of operating in enhanced mode is that you have a single point of change.

Whenever you change device alias modes, the change is distributed to other switches in the network only if device alias distribution is enabled or on. Otherwise, the mode change only takes place on the local switch.


Note


Enhanced mode, or native device alias-based configurations, are not accepted in interop mode VSANs. IVR zoneset activation fails in interop mode VSANs if the corresponding zones have native device alias-based members.


Device Alias Mode Guidelines and Limitations for Device Alias Services

Device Alias services have these configuration guidelines and limitations:

  • If two fabrics running in different device alias modes are joined together, the device alias merge fails. There is no automatic conversion to one mode or the other during the merge process. In this situation, you must select one mode over the other.

  • Before changing from enhanced to basic mode, you must first explicitly remove all native device alias-based configurations from both local and remote switches, or replace all device alias-based configuration members with the corresponding pWWN.

  • If you remove a device alias from the device alias database, all applications automatically stop enforcing the corresponding device alias. If that corresponding device alias is part of an active zone set, all the traffic to and from that pWWN is disrupted.

  • Renaming the device alias not only changes the device alias name in the device alias database, but also replaces the corresponding device alias configuration in all of the applications.

  • When a new device alias is added to the device alias database, and the application configuration is present on that device alias, it automatically takes effect. For example, if the corresponding device alias is part of the active zoneset and the device is online, then zoning is enforced automatically. You do not have to reactivate the zone set.

  • If a device alias name is mapped to a new HBA’s pWWN, the application’s enforcement changes accordingly. In this case, the zone server automatically enforces zoning based on the new HBA’s pWWN.

Configuring Device Alias Modes

You can configure device aliases to operate in enhanced mode.

SUMMARY STEPS

  1. configure terminal
  2. device-alias mode enhanced
  3. no device-alias mode enhance

DETAILED STEPS

  Command or Action Purpose

Step 1

configure terminal

Example:
switch# configure terminal
switch(config)#

Enters global configuration mode.

Step 2

device-alias mode enhanced

Example:
switch(config)# device-alias mode enhanced

Assigns the device alias to operate in enhanced mode.

Step 3

no device-alias mode enhance

Example:
switch(config)# no device-alias mode enhance 

Assigns the device alias to operate in basic mode.

EXAMPLES

This example shows how to display the current device alias mode setting.

switch# show device-alias status
Fabric Distribution: Enabled
Database:- Device Aliases 0 Mode: Basic
Locked By:- User "admin" SWWN 20:00:00:0d:ec:30:90:40
Pending Database:- Device Aliases 0 Mode: Basic

Device Alias Distribution

By default, device alias distribution is enabled. The device alias feature uses CFS to distribute the modifications to all switches in a fabric.

If device alias distribution is disabled, database changes are not distributed to the switches in the fabric. The same changes would have to be performed manually on all switches in the fabric to keep the device alias database up-to-date. Database changes immediately take effect, so there would also not be any pending database and commit or abort operations. If you have not committed the changes and you disable distribution, a commit task fails.


Note


CFS is enabled by default. All devices in the fabric must have CFS enabled, or they do not receive distributions.If CFS is disabled for an application, that application does not distribute any configuration, and it does not accept a distribution from other devices in the fabric. To enable CFS use the cfs distribute command.


This example shows how to display a failed device alias status:

switch# show device-alias status
Fabric Distribution: Disabled
Database:- Device Aliases 25
Status of the last CFS operation issued from this switch:
==========================================================
Operation: Commit
Status: Failed (Reason: Operation is not permitted as the fabric distribution is
 currently disabled.)

Locking the Fabric

When you perform any device alias configuration task (regardless of which device alias task), the fabric is automatically locked for the device alias feature. Once you lock the fabric, the following situations apply:

  • No other user can make any configuration changes to this feature.

  • A copy of the effective database is obtained and used as the pending database. Subsequent modifications are made to the pending database. The pending database remains in use until you commit the modifications to the pending database or discard (abort) the changes to the pending database.

Committing Changes

You can commit changes.

If you commit the changes made to the pending database, the following events occur:

  • The pending database content overwrites the effective database content.

  • The pending database is distributed to the switches in the fabric and the effective database on those switches is overwritten with the new changes.

  • The pending database is emptied of its contents.

  • The fabric lock is released for this feature.

SUMMARY STEPS

  1. configure terminal
  2. device-alias commit

DETAILED STEPS

  Command or Action Purpose

Step 1

configure terminal

Example:
switch# configure terminal
switch(config)#

Enters global configuration mode.

Step 2

device-alias commit

Example:
switch(config)# device-alias commit

Commits the changes made to the currently active session.

Discarding Changes

You can discard the device alias session changes.

If you discard the changes made to the pending database, the following events occur:

  • The effective database contents remain unaffected.

  • The pending database is emptied of its contents.

  • The fabric lock is released for this feature.

SUMMARY STEPS

  1. configure terminal
  2. device-alias abort

DETAILED STEPS

  Command or Action Purpose

Step 1

configure terminal

Example:
switch# configure terminal
switch(config)#

Enters global configuration mode.

Step 2

device-alias abort

Example:
switch(config)# device-alias abort

Discards the currently active session.

EXAMPLES

This example shows how to display the status of the discard operation:

switch(config)# show device-alias status

Fabric Distribution: Enabled
Database:- Device Aliases 2 Mode: Basic
Checksum: 0x22a1d11a2762bdb3cae50f16a21a1e1
Locked By:- User "CLI/SNMPv3:admin" SWWN 20:00:00:de:fb:9d:0e:a0
Pending Database:- Device Aliases 3 Mode: Basic

This example shows how to display the status of the abort operation:

switch(config)# device-alias abort
switch(config)#
switch(config)#  show device-alias session status
Last Action Time Stamp : Mon Nov 4 09:10:11 2019
Last Action : Abort
Last Action Result : Success
Last Action Failure Reason : none
switch(config)#

Overriding the Fabric Lock

You can use locking operations (clear, commit, abort) only when device alias distribution is enabled. If you have performed a device alias task and have forgotten to release the lock by either committing or discarding the changes, an administrator can release the lock from any switch in the fabric. If the administrator performs this task, your changes to the pending database are discarded and the fabric lock is released.

The changes are only available in the volatile directory and may be discarded if the switch is restarted.

To use administrative privileges and release a locked device alias session, use the clear device-alias session command in EXEC mode.

switch# clear device-alias session

This example shows how to display the status of the clear operation:

switch# show device-alias status
Fabric Distribution: Enabled
Database:- Device Aliases 24
Status of the last CFS operation issued from this switch:
==========================================================
Operation: Clear Session<--------------------Lock released by administrator
Status: Success<-----------------------------Successful status of the operation

Disabling and Enabling Device Alias Distribution

You can disable or enable the device alias distribution.

SUMMARY STEPS

  1. configure terminal
  2. no device-alias distribute
  3. device-alias distribute

DETAILED STEPS

  Command or Action Purpose

Step 1

configure terminal

Example:
switch# configure terminal
switch(config)#

Enters global configuration mode.

Step 2

no device-alias distribute

Example:
switch(config)# no device-alias distribute

Disables the distribution.

Step 3

device-alias distribute

Example:
switch(config)# device-alias distribute

Enables the distribution (default).

EXAMPLES

This example shows how to display the status of device alias distribution:

switch# show device-alias status
Fabric Distribution: Disabled
Database:- Device Aliases 3 Mode: Basic
Checksum: 0x284031ab5aade498a7e89cef1b04d7f
switch(config)#

This example shows the device alias display when distribution is disabled:

switch# show device-alias status
Fabric Distribution: Disabled
Database:- Device Aliases 3 Mode: Basic
Checksum: 0x284031ab5aade498a7e89cef1b04d7f
switch(config)#

Device Alias Database Merge Guidelines

When merging two device alias databases, follow these guidelines:

  • Verify that two device aliases with different names are not mapped to the same pWWN.

  • Verify that two identical pWWNs are not mapped to two different device aliases.

If the combined number of device entries in both databases exceeds the supported configuration limit, then the merge will fail.

Verifying the Device Alias Configuration

To display device alias information, perform one of the following tasks:

Command Purpose
show zoneset [active] Displays the device aliases in the zone set information.
show device-alias database [pending | pending-diffs] Displays the device alias database.
show device-alias {pwwn pwwn-id | name device-name } [pending] Displays the device alias information for the specified pwwn or alias.
show flogi database [pending] Displays device alias information in the flogi database.
show fcns database [pending] Displays device alias information in the fcns database.

Default Settings for Device Alias Services

The following table lists the default settings for device alias parameters.

Table 1. Default Device Alias Parameters

Parameters

Default

Device alias distribution

Enabled.

Device alias mode

Basic.

Database in use

Effective database.

Database to accept changes

Pending database.

Device alias fabric lock state

Locked with the first device alias task.