Z Commands


This chapter describes the Cisco NX-OS Fibre Channel, virtual Fibre Channel, and Fibre Channel over Ethernet (FCoE) commands that begin with Z.

zone clone

To clone a zone name, use the zone clone command.

zone clone current-zone-name new-zone-name vsan vsan-id

Syntax Description

current-zone-name new-zone-name

Zone attribute group name. The name can be a maximum of 64 characters.

vsan vsan-id

Specifies the VSAN ID. The range is from 1 to 4093.


Command Default

None

Command Modes

Global configuration mode

Command History

Release
Modification

4.0(0)N1(1a)

This command was introduced.


Usage Guidelines

Use the no form of the zone name (configuration mode) command to delete the zone name.

Examples

This example shows how to create a clone of the original zone group called origZone into the clone zone group cloneZone on VSAN 45:

switch(config)# zone clone origZone cloneZone vsan 45
 
   

Related Commands

Command
Description

show zone

Displays zone information.


zone commit

To commit zoning changes to a Virtual SAN (VSAN), use the zone commit command. To negate the command, use the no form of this command.

zone commit vsan vsan-id [force]

no zone commit vsan vsan-id [force]

Syntax Description

vsan vsan-id

Specifies the VSAN ID. The range is from 1 to 4093.

force

(Optional) Forces the commit.


Command Default

None

Command Modes

Global configuration mode

Command History

Release
Modification

4.0(0)N1(1a)

This command was introduced.


Usage Guidelines

Use the no form of the zone commit command to clear a session lock on a switch where the lock originated.

Examples

This example shows how to commit zoning changes to VSAN 200:

switch(config)# zone commit vsan 200
 
   

Related Commands

Command
Description

show zone

Displays zone information.


zone compact

To compact a zone database in a Virtual SAN (VSAN), use the zone compact command.

zone compact vsan vsan-id

Syntax Description

vsan vsan-id

Specifies the VSAN ID. The range is from 1 to 4093.


Command Default

None

Command Modes

Global configuration mode

Command History

Release
Modification

4.0(0)N1(1a)

This command was introduced.


Usage Guidelines

8000 zones are supported in a Cisco Nexus 5000 Series switch.

If you attempt to merge VSANs, the merge will fail if more than 2000 zones are present in a VSAN and the neighboring VSAN cannot support more than 2000 zones.

Activation will fail if more than 2000 zones are present in the VSAN and one or more switches in the fabric cannot support more than 2000 zones.

Examples

This example shows how to compact a zone database in VSAN 1:

switch(oongif)# zone compact vsan 1 
 
   

Related Commands

Command
Description

show zone

Displays zone information.

show zone analysis

Displays detailed analysis and statistical information about the zoning database.


zone copy

To copy the active zone set to the full zone set, use the zone copy command. To negate the command or revert to the factory defaults, use the no form of this command.

zone copy active-zoneset full-zoneset [include-auto-zones] vsan vsan-id

zone copy vsan vsan-id active-zoneset {bootflash: | ftp: | full-zoneset | scp: | sftp: | tftp: | volatile:}

no zone copy

Syntax Description

active-zoneset

Copies from the active zone set.

full-zoneset

Copies the active zone set to the full zone set.

include-auto-zones

(Optional) Specifies that auto-zones be included when copying the active zone set.

vsan vsan-id

Configures to copy the active zone set on a VSAN to the full zone set. The ID of the VSAN is from 1 to 4093.

bootflash:

Copies the active zone set to a location in the bootflash: directory.

ftp:

Copies the active zone set to a remote location using the File Transfer Protocol (FTP) protocol.

scp:

Copies the active zone set to a remote location using the SCP protocol.

sftp:

Copies the active zone set to a remote location using the SFTP protocol.

tftp:

Copies the active zone set to a remote location using the TFTP protocol.

volatile:

Copies the active zone set to a location in the volatile: directory.


Command Default

None

Command Modes

EXEC mode

Command History

Release
Modification

4.0(0)N1(1a)

This command was introduced.


Examples

This example shows how to copy the active zone set to the full zone set:

switch# zone copy active-zoneset full-zoneset vsan 1
 
   

This example shows how to copy the active zone set in VSAN 3 to a remote location using SCP:

switch# zone copy vsan 3 active-zoneset scp://guest@myserver/tmp/active_zoneset.txt
 
   

Related Commands

Command
Description

show zone

Displays zone information.


zone default-zone

To define whether a default zone (assigned to nodes not assigned to a created zone) permits or denies access to all nodes in the default zone, use the zone default-zone command. To negate the command or revert to the factory defaults, use the no form of this command.

zone default-zone permit vsan vsan-id

no zone default-zone permit vsan vsan-id

Syntax Description

permit

Permits access to all nodes in the default zone.

vsan vsan-id

Sets default zoning behavior for the specified Virtual SAN (VSAN). The ID of the VSAN is from 1 to 4093.


Command Default

All default zones are permitted access.

Command Modes

Global configuration mode

Command History

Release
Modification

4.0(0)N1(1a)

This command was introduced.


Usage Guidelines

Use the zone default-zone permit vsan command to define the operational values for the default zone in a VSAN. This command applies to existing VSANs; it has no effect on VSANs that have not yet been created.

Use the system default zone default-zone permit command to use the default values defined for the default zone for all VSANs. The default values are used when you initially create a VSAN and it becomes active.

Examples

This example shows how to permit the default zoning in VSAN 2:

switch(config)# zone default-zone permit vsan 2 
 
   

Related Commands

Command
Description

system default zone default-zone permit

Configures default values for a zone.

show zone

Displays zone information.


zone merge-control restrict vsan

To restrict zone database merging, use the zone merge-control restrict vsan command. To disable this feature, use the no form of this command.

zone merge-control restrict vsan vsan-id

no zone merge-control restrict vsan vsan-id

Syntax Description

vsan vsan-id

Specifies the VSAN ID. The range is from 1 to 4093.


Command Default

Disabled

Command Modes

Global configuration mode

Command History

Release
Modification

Release 4.0

This command was introduced.


Usage Guidelines

If merge control is set to restricted and the two databases are not identical, the merge fails and Inter-Switch Links (ISLs) between the switches become isolated.

Examples

This example shows how to set the zone merge control for VSAN 10 to restricted:

switch(config)# zone merge-control restrict vsan 10 
 
   

Related Commands

Command
Description

show zone

Displays zone information.


zone mode enhanced

To enable enhanced zoning for a Virtual SAN (VSAN), use the zone mode enhanced command. To disable this feature, use the no form of this command.

zone mode enhanced vsan vsan-id

no zone mode enhanced vsan vsan-id

Syntax Description

vsan vsan-id

Specifies the VSAN ID. The range is from 1 to 4093.


Command Default

Disabled

Command Modes

Global configuration mode

Command History

Release
Modification

4.0(0)N1(1a)

This command was introduced.


Usage Guidelines

Before using the zone mode enhanced command, verify that all switches in the fabric are capable of working in enhanced zoning mode. If one or more switches are not capable of working in enhanced zoning mode, the request to enable enhanced zoning mode is rejected.

When the zone mode enhanced vsan command completes successfully, the software automatically starts a session, distributes the zoning database using the enhanced zoning data structures, applies the configuration changes, and sends a release change authorization (RCA) to all switches in the fabric. All switches in the fabric then enable enhanced zoning mode.

Examples

This example shows how to enable enhanced zoning mode:

switch(config)# zone mode enhanced vsan 10 
 
   

Related Commands

Command
Description

show zone

Displays zone information.


zone name (configuration mode)

To create a zone, use the zone name command. To negate the command or revert to the factory defaults, use the no form of this command.

zone name zone-name vsan vsan-id
member

zone name zone-name vsan vsan-id
no member

no zone name zone-name vsan vsan-id

Syntax Description

zone-name

Name of the zone. The name can be a maximum of 64 characters.

vsan vsan-id

Specifies the VSAN ID. The range is from 1 to 4093.


Command Default

None

Command Modes

Global configuration mode

Command History

Release
Modification

4.0(0)N1(1a)

This command was introduced.


Usage Guidelines

Zones are assigned to zone sets. Zone sets are then activated from one switch and propagate across the fabric to all switches. Zones allow security by permitting and denying access between nodes (hosts and storage). zone name commands are entered from the configuration mode. Configure a zone for a VSAN from the config-zone mode.

Use the show wwn switch command to retrieve the switch world wide name (sWWN). If you do not provide an sWWN, the software automatically uses the local sWWN.

Examples

This example shows how to configure attributes for the specified zone (Zone1) based on the member type (pWWN, fabric pWWN, FCID, or Fibre Channel alias) and value specified:

switch(config)# zone name Zone1 vsan 10
switch(config-zone)# member device-alias device1
 
   

This example shows how to configure the members for the specified zone (Zone2) based on the member type (pWWN, fabric pWWN, FCID, or Fibre Channel alias) and value specified:

switch(config)# zone name Zone2 vsan 10
switch(config-zone)# member fcalias Payroll
switch(config-zone)# member domain-id 2 portnumber 23
 
   

Related Commands

Command
Description

show zone

Displays zone information.

zone rename

Renames zones.

zone-attribute-group name

Configures zone attribute groups.


zone name (zone set configuration mode)

To configure a zone in a zone set, use the zone name command. To delete the zone from the zone set, use the no form of this command.

zone name zone-name

no zone name zone-name

Syntax Description

zone-name

Name of the zone. The name can be a maximum of 64 characters.


Command Default

None

Command Modes

Zone set configuration mode

Command History

Release
Modification

4.0(0)N1(1a)

This command was introduced.


Examples

This example shows how to configure a zone in a zone set:

switch(config)# zoneset name Sample vsan 1
switch(config-zoneset)# zone name MyZone
 
   

This example shows how to delete a zone from a zone set:

switch(config-zoneset)# no zone name Zone2

switch(config-zoneset)#

Related Commands

Command
Description

show zoneset

Displays zone set information.

zone name (configuration mode)

Configures zones.

zoneset

Configures zone set attributes.


zone rename

To rename a zone, use the zone rename command.

zone rename current-name new-name vsan vsan-id

Syntax Description

current-name

Current fcalias name. The name can be a maximum of 64 characters.

new-name

New fcalias name. The name can be a maximum of 64 characters.

vsan vsan-id

Specifies the VSAN ID. The range is from 1 to 4093.


Command Default

None

Command Modes

Global configuration mode

Command History

Release
Modification

4.0(0)N1(1a)

This command was introduced.


Examples

This example shows how to rename a zone:

switch# zone rename ZoneA ZoneB vsan 10 
 
   

Related Commands

Command
Description

show zone

Displays zone information.

zone name

Creates and configures zones.


zoneset (configuration mode)

To group zones under one zone set, use the zoneset command. To negate the command or revert to the factory defaults, use the no form of this command.

zoneset {activate [name zoneset-name] vsan vsan-id | clone zoneset-currentName zoneset-cloneName vsan vsan-id | distribute full vsan vsan-id name zoneset-name vsan vsan-id | rename current-name new-name vsan vsan-id}

no zoneset {activate [name zoneset-name] vsan vsan-id | clone zoneset-currentName zoneset-cloneName vsan vsan-id | distribute full vsan vsan-id name zoneset-name vsan vsan-id | rename current-name new-name vsan vsan-id}

Syntax Description

activate

Activates a zone set.

name zoneset-name

(Optional) Specifies a name for a zone set. The name can be a maximum of 64 characters.

vsan vsan-id

Activates a zone set on the specified Virtual SAN (VSAN). The range is from 1 to 4093.

clone zoneset-currentName zoneset-cloneName

Clones a zone set from the current name to a new name. The name can be a maximum of 64 characters.

distribute full

Enables zone set propagation.

rename

Renames a zone set.

current-name

Current fcalias name.

new-name

New fcalias name.


Command Default

None

Command Modes

Global configuration mode

Command History

Release
Modification

4.0(0)N1(1a)

This command was introduced.


Usage Guidelines

Zones are activated by activating the parent zone set.

The zoneset distribute full vsan command distributes the operational values for the default zone to all zone sets in a VSAN. If you do not want to distribute the operation values, use the system default zone distribute full command to distribute the default values.The default values are used when you initially create a VSAN and it becomes active.

The zoneset distribute full vsan command applies to existing VSANs; it has no effect on VSANs that have not yet been created.

Examples

This example shows how to activate a zone set called zSet1 in VSAN 333:

switch(config)# zoneset activate name zSet1 vsan 333
 
   

This example shows how to clone a zone set called zSet1 into a new zone set called zSetClone in VSAN 45:

switch(config)# zoneset clone existing zSet1 zSetClone vsan 45
 
   

This example shows how to distribute the operational values for the default zone to all zone sets in VSAN 22:

switch(config)# zoneset distribute full vsan 22
 
   

Related Commands

Command
Description

system default zone distribute full

Configures default values for distribution to a zone set.

show zoneset

Displays zone set information.


zoneset (EXEC mode)

To merge zone set databases, use the zoneset command.

zoneset {distribute | export | import interface {fc slot/port | san-port-channel port-number}} vsan vsan-id

Syntax Description

distribute

Distributes the full zone set in the fabric.

export

Exports the zone set database to the adjacent switch on the specified Virtual SAN (VSAN). The active zone set in this switch becomes the activated zone set of the merged SAN.

import

Imports the zone set database to the adjacent switch on the specified interface. The active zone set in the adjacent switch becomes the activated zone set of the merged SAN.

interface

Configures the interface.

fc slot/port

Configures a Fibre Channel interface for the specified slot number and port number.

san-port-channel port-number

Specifies a SAN port channel interface.

vsan vsan-id

Merges the zone set database of a VSAN on the specified interface. The ID of the VSAN is from 1 to 4093.


Command Default

None

Command Modes

EXEC mode

Command History

Release
Modification

4.0(0)N1(1a)

This command was introduced.


Usage Guidelines

You can also enter the zoneset import and the zoneset export commands for a range of VSANs.

The zoneset distribute vsan vsan-id command is supported in interop 2 and interop 3 modes, and not in interop 1 mode.

Examples

This example shows how to import the zone set database from the adjacent switch connected through the VSAN 2 interface:

switch# zoneset import interface fc2/3 vsan 2
 
   

This example shows how to export the zone set database to the adjacent switch connected through VSAN 5:

switch# zoneset export vsan 5
 
   

This example shows how to distribute the zone set in VSAN 333:

switch# zoneset distribute vsan 333
 
   

Related Commands

Command
Description

show zone status vsan

Displays the distribution status for the specified VSAN.

show zoneset

Displays zone set information.