Cisco Nexus 6000 Series NX-OS Layer 2 Interfaces Command Reference
V Commands
Downloads: This chapterpdf (PDF - 220.0KB) The complete bookPDF (PDF - 2.99MB) | Feedback

V Commands

Table Of Contents

V Commands

vethernet auto-create

vlan

vlan (STP)

vlan dot1Q tag native

vmware (virtual Ethernet interface)

vmware dvs

vsi (virtual Ethernet interface)

vrf (ERSPAN)

vrf context

vtp (interface)

vtp domain

vtp file

vtp mode

vtp password

vtp version


V Commands


This chapter describes the Cisco NX-OS Ethernet and virtual Ethernet commands that begin with V.

vethernet auto-create

To enable the automatic creation of virtual Ethernet interfaces globally, use the vethernet auto-create command. To disable automatic creation of virtual Ethernet interfaces, use the no form of this command.

vethernet auto-create

no vethernet auto-create

Syntax Description

This command has no arguments or keywords.

Command Default

Disabled

Command Modes

Global configuration mode

Command History

Release
Modification

6.0(2)N1(1)

This command we introduced.


Usage Guidelines

Before you use a virtual Ethernet interface, you must enable Cisco Virtual Machine Fabric Extender (VM-FEX) on the switch by using the feature vmfex command.

Examples

This example shows how to enable automatic creation of virtual Ethernet interfaces on the switch:

switch(config)# vethernet auto-create 
switch(config)# 
 
   

This example shows how to disable automatic creation of virtual Ethernet interfaces:

switch(config)# no vethernet auto-create
switch(config)# 
 
   

Related Commands

Command
Description

feature vmfex

Enables VM-FEX on the switch.

interface vethernet

Configures a virtual Ethernet interface.

port-profile

Configures a port profile.


vlan

To add a VLAN or to enter the VLAN configuration mode, use the vlan command. To delete the VLAN and exit the VLAN configuration mode, use the no form of this command.

vlan {vlan-id | vlan-range}

no vlan {vlan-id | vlan-range}

Syntax Description

vlan-id

Number of the VLAN. The range is from 1 to 4094.

Note You cannot create, delete, or modify VLAN 1 or any of the internally allocated VLANs.

vlan-range

Range of configured VLANs; see the "Usage Guidelines" section for a list of valid values.


Command Default

None

Command Modes

Global configuration mode


Note You can also create and delete VLANs in the VLAN configuration mode using these same commands.


Command History

Release
Modification

6.0(2)N1(1)

This command we introduced.


Usage Guidelines

When you enter the vlan vlan-id command, a new VLAN is created with all default parameters and causes the CLI to enter VLAN configuration mode. If the vlan-id argument that you entered matches an existing VLAN, nothing happens except that you enter VLAN configuration mode.

You can enter the vlan-range using a comma (,), a dash (-), and the number.

VLAN 1 parameters are factory configured and cannot be changed; you cannot create or delete this VLAN. Additionally, you cannot create or delete VLAN 4095 or any of the internally allocated VLANs.

When you delete a VLAN, all the access ports in that VLAN are shut down and no traffic flows. On trunk ports, the traffic continues to flow for the other VLANs allowed on that port, but the packets for the deleted VLAN are dropped. However, the system retains all the VLAN-to-port mapping for that VLAN, and when you reenable, or recreate, that specified VLAN, the switch automatically reinstates all the original ports to that VLAN.

In Cisco NX-OS 5.0(2)N1(1), you can configure VLANs on a device configured as a VLAN Trunking Protocol (VTP) server or transparent device. If the VTP device is configured as a client, you cannot add a VLAN or enter the VLAN configuration mode.

Examples

This example shows how to add a new VLAN and enter VLAN configuration mode:

switch(config)# vlan 2 
switch(config-vlan)# 
 
   

This example shows how to add a range of new VLANs and enter VLAN configuration mode:

switch(config)# vlan 2,5,10-12,20,25,4000 
switch(config-vlan)# 
 
   

This example shows how to delete a VLAN:

switch(config)# no vlan 2 
 
   

Related Commands

Command
Description

show vlan

Displays VLAN information.


vlan (STP)

To configure spanning tree designated bridge and root bridge priority for VLANs, use the vlan command. To revert to the default settings, use the no form of this command.

vlan instance-id [{designated | root} priority priority-value]

no vlan instance-id [{designated | root} priority priority-value]

Syntax Description

instance-id

MST instance. The range is from 0 to 4094.

designated

(Optional) Sets the designated bridge priority for the spanning tree.

root

(Optional) Sets the root bridge priority for the spanning tree.

priority priority-value

(Optional) Specifies the STP-bridge priority; the valid values are 0, 4096, 8192, 12288, 16384, 20480, 24576, 28672, 32768, 36864, 40960, 45056, 49152, 53248, 57344, 61440. All other values are rejected.


Command Default

None

Command Modes

Spanning-tree pseudo configuration mode

Command History

Release
Modification

6.0(2)N1(1)

This command we introduced.


Usage Guidelines

You can enter the instance-id argument as a single instance or a range of instances, for example, 0-3,5,7-9.

This command does not require a license.

Examples

This example shows how to configure a spanning-tree domain:

switch# configure terminal
switch(config)# spanning-tree pseudo-information
switch(config-pseudo)# vlan 1 designated priority 4096
switch(config-pseudo)# vlan 1 root priority 8192
switch(config-pseudo)# 
 
   

Related Commands

Command
Description

show running-config spanning-tree

Displays the running configuration information of the Spanning Tree Protocol (STP).

show spanning-tree

Displays the configuration information of the STP.

spanning-tree pseudo-information

Configures spanning tree pseudo information parameters.


vlan dot1Q tag native

To enable dot1q (IEEE 802.1Q) tagging for all native VLANs on all trunked ports on the switch, use the vlan dot1Q tag native command. To disable dot1q (IEEE 802.1Q) tagging for all native VLANs on all trunked ports on the switch, use the no form of this command.

vlan dot1Q tag native

no vlan dot1Q tag native

Syntax Description

This command has no arguments or keywords.

Command Default

Disabled

Command Modes

Global configuration mode

Command History

Release
Modification

6.0(2)N1(1)

This command we introduced.


Usage Guidelines

Typically, you configure 802.1Q trunks with a native VLAN ID, which strips tagging from all packets on that VLAN.

To maintain the tagging on the native VLAN and drop untagged traffic, use the vlan dot1q tag native command. The switch will tag the traffic received on the native VLAN and admit only 802.1Q-tagged frames, dropping any untagged traffic, including untagged traffic in the native VLAN.

Control traffic continues to be accepted as untagged on the native VLAN on a trunked port, even when the vlan dot1q tag native command is enabled.


Note The vlan dot1q tag native command is enabled on global basis.


Examples

This example shows how to enable 802.1Q tagging on the switch:

switch(config)# vlan dot1q tag native 
switch(config)# 
 
   

This example shows how to disable 802.1Q tagging on the switch:

switch(config)# no vlan dot1q tag native 
Turning off vlan dot1q tag native may impact the functioning of existing dot1q tunnel 
ports
switch(config)# 
 
   

Related Commands

Command
Description

show vlan dot1q tag native

Displays the status of tagging on the native VLAN.


vmware (virtual Ethernet interface)

To configure a VMware policy on a virtual Ethernet interface, use the vmware command. To revert to the defaults, use the no form of this command.

vmware dvport DVPort_number [dvswitch uuid "DVSwitch_uuid"]

no vmware dvport DVPort_number [dvswitch uuid "DVSwitch_uuid"]

Syntax Description

dvport

Configures distributed virtual (DV) port mapping.

DVPort_number

Distributed virtual (DV) port number. The range is from 0 to 4294967294.

dvswitch uuid

(Optional) Configures the DV switch Universally Unique Identifier (UUID).

DVSwitch_uuid

DV switch UUID in quotes. The ID can be 48 alphanumeric characters.


Command Default

None

Command Modes

Virtual Ethernet interface configuration mode

Command History

Release
Modification

6.0(2)N1(1)

This command we introduced.


Usage Guidelines

This command does not require a license.

Examples

This example shows how to configure a VMware policy on a specific virtual Ethernet interface:

switch# configure terminal
switch(config)# interface vethernet 1
switch(config-if)# vmware dvport 3 dvswitch uuid "nexusDVswitch"
switch(config-if)#
 
   

Related Commands

Command
Description

show interface vethernet

Displays information about the virtual Ethernet interface configuration.

show running-config interface

Displays the running system configuration information for an interface.


vmware dvs

To create a VMware distributed virtual switch (DVS), use the vmware dvs command. To remove the virtual switch, use the no form of this command.

vmware dvs {datacenter-name name | uuid dvs-uuid}

no vmware dvs

Syntax Description

datacenter-name name

VMware data centre name, including the path. The name can be a maximum of 256 characters. For example, DCName, DCFolder/DCName.

uuid dvs-uuid

Universally Unique Identifier (UUID) of the Distributed Virtual Switch (DVS) that the Virtual Supervisor Module (VSM) manages. The DVS UUID must be enclosed in quotes and can be a maximum of 80 alphanumeric characters.


Command Default

None

Command Modes

SVS connection configuration mode

Command History

Release
Modification

6.0(2)N1(1)

This command we introduced.


Usage Guidelines

This command does not require a license.

Examples

This example shows how to create a VMware virtual switch:

switch# configure terminal
switch(config)# svs connection SVSConn
switch(config-svs-conn)# vmware dvs datacenter-name dc1
switch(config-svs-conn)#
 
   

This example shows how to remove a VMware virtual switch:

switch# configure terminal
switch(config)# svs connection SVSConn
switch(config-svs-conn)# no vmware dvs datacenter-name dc1
switch(config-svs-conn)#
 
   

Related Commands

Command
Description

show svs connections

Displays SVS connection information.

svs connection

Enables an SVS connection.


vsi (virtual Ethernet interface)

To configure virtual Ethernet interface as a Virtual Station Interface (VSI), use the vsi command. To revert to the default settings, use the no form of this command.

vsi mac mac_ID

no vsi mac mac_ID

Syntax Description

mac

Configures the VM MAC address mapping.

mac_ID

Virtual machine MAC address in the format EEEE.EEEE.EEEE.


Command Default

None

Command Modes

Virtual Ethernet interface configuration mode

Command History

Release
Modification

6.0(2)N1(1)

This command we introduced.


Usage Guidelines

Before you use this command, make sure that you enable the Cisco Virtual Machine Fabric Extender (VM-FEX) on the switch by using the feature vmfex command.

This command does not require a license.

Examples

This example shows how to configure a VMware policy on a specific virtual Ethernet interface:

switch# configure terminal
switch(config)# install feature-set virtualization
switch(config)# feature-set virtualization
switch(config)# feature vmfex
switch(config)# interface vethernet 1
switch(config-if)# vsi mac 0005.9b74.a6fc
switch(config-if)#
 
   

Related Commands

Command
Description

feature vmfex

Enables VM-FEX on the switch.

show interface vethernet

Displays information about the virtual Ethernet interface configuration.

show running-config interface

Displays the running system configuration information for an interface.


vrf (ERSPAN)

To configure a virtual routing and forwarding (VRF) instance for Encapsulated Remote Switched Port Analyzer (ERSPAN) traffic forwarding in the source, use the vrf command. To revert to the defaults, use the no form of this command.

vrf {vrf_name | default | management}

no vrf {vrf_name | default | management}

Syntax Description

vrf_name

Name of the VRF. The VRF name can be any case-sensitive, alphanumeric string up to 32 characters.

default

Specifies the default VRF instance.

management

Specifies the management VRF instance.


Command Default

None

Command Modes

ERSPAN session configuration mode

Command History

Release
Modification

6.0(2)N1(1)

This command we introduced.


Usage Guidelines

This command does not require a license.

Examples

This example shows how to configure a VRF instance for the ESRSPAN source:

switch# configure terminal
switch(config)# monitor session 1 type erspan-source
switch(config-erspan-src)# vrf default
switch(config-erspan-src)#
 
   

Related Commands

Command
Description

monitor-session

Enters the monitor configuration mode for configuring an ERSPAN session for analyzing traffic between ports.

show monitor session

Displays information about the Ethernet switched port analyzer (SPAN) or ERSPAN monitor session.


vrf context

To create a virtual routing and forwarding instance (VRF) and enter VRF configuration mode, use the vrf context command. To remove a VRF entry, use the no form of this command.

vrf context {name | management}

no vrf context {name | management}

Syntax Description

name

Name of the VRF. The name can be a maximum of 32 alphanumeric characters and is case-sensitive.

management

Specifies the management VRF.


Command Default

None

Command Modes

Global configuration mode

Command History

Release
Modification

6.0(2)N1(1)

This command we introduced.


Usage Guidelines

When you enter the VRF configuration mode, the following commands are available:

exit—Exits from the current command mode.

ip—Enables configuration of IP features.

Additional commands available in IP configuration mode:

domain-list—Adds additional domain names.

domain-lookup—Enables or disables DNS lookup.

domain-name—Specifies the default domain name.

host—Adds an entry to the IP hostname table.

name-server—Specifies the IP address of a DNS name server.

route—Adds route information by specifying IP addresses of the next hop servers.

no—Negates a command or set its defaults.

shutdown—Shuts down the current VRF context.

Examples

This example shows how to enter VRF context mode:

switch(config)# vrf context management 
switch(config-vrf)# 
 
   

Related Commands

Command
Description

show vrf

Displays VRF information.


vtp (interface)

To enable VLAN Trunking Protocol (VTP) on an interface, use the vtp command. To disable VTP on an interface, use the no form of this command.

vtp

no vtp

Syntax Description

This command has no arguments or keywords.

Command Default

VTP is enabled on a trunk interface

Command Modes

Interface configuration mode

Command History

Release
Modification

6.0(2)N1(1)

This command we introduced.


Usage Guidelines

Before you use this command, you must enable VTP on the switch by using the feature vtp command.

VLAN Trunking Protocol (VTP) is a Cisco Proprietary Layer 2 messaging protocol used to distribute the VLAN configuration information across multiple devices within a VTP domain.

Examples

This example shows how to enable VTP on an interface:

switch(config)# interface ethernet 1/1 
switch(config-if)# vtp 
switch(config-if)# 
 
   

Related Commands

Command
Description

copy running-config startup-config

Copies the running configuration to the startup configuration.

feature vtp

Enables VTP on the switch.

show running-config vtp

Displays the running VTP configuration.

show vtp status

Displays VTP information.

snmp-server enable traps vtp

Enables Simple Network Management Protocol (SNMP) notifications.


vtp domain

To configure the name of the VLAN Trunking Protocol (VTP) administrative domain, use the vtp domain command. To remove the domain name, use the no form of this command.

vtp domain name

no vtp domain

Syntax Description

name

VTP domain name. The name can be a maximum of 32 ASCII characters.


Command Default

Blank (NULL)

Command Modes

Global configuration mode

Command History

Release
Modification

6.0(2)N1(1)

This command we introduced.


Usage Guidelines

Before you use this command, you must enable VTP on the switch by using the feature vtp command.

VLAN Trunking Protocol (VTP) is a Cisco Proprietary Layer 2 messaging protocol used to distribute the VLAN configuration information across multiple devices within a VTP domain. Without VTP, you must configure VLANs in each device in the network. Using VTP, you configure VLANs on a VTP server and then distribute the configuration to other VTP devices in the VTP domain.

Examples

This example shows how to create a VTP domain named accounting:

switch(config)# vtp domain accounting 
switch(config)#
 
   

Related Commands

Command
Description

feature vtp

Enables VTP on the switch.

show running-config vtp

Displays the running VTP configuration.

show vtp status

Displays VTP information.


vtp file

To store the VLAN Trunking Protocol (VTP) configuration information in a file, use the vtp file command. To stop storing the configuration in a file, use the no form of this command.

vtp file bootflash:server[directory/]filename

no vtp file

Syntax Description

bootflash:

Specifies that the VTP configuration file is to be stored in the bootflash memory of the NVRAM. The colon character (:) is required after the file system name.

server

Name of the server. Valid values are ///, //module-1/, //sup-1/, //sup-active/, or //sup-local/. The double slash (//) is required.

directory/

(Optional) Name of the destination directory. The directory name is case sensitive.

filename

Name of the VTP configuration file.



Note There can be no spaces in the bootflash://server/directory/filename string. Individual elements of this string are separated by colons (:) and slashes (/).


Command Default

VTP database file, vlan.dat

Command Modes

Global configuration mode

Command History

Release
Modification

6.0(2)N1(1)

This command we introduced.


Usage Guidelines

Before you use this command, you must enable VTP on the switch by using the feature vtp command.

The default configuration file is stored in the VTP database, vlan.dat, in NVRAM. VTP configuration information is also stored in the startup configuration file.


Note Do not delete the vlan.dat file.


When a switch in a VTP domain reloads, the switch updates the VTP domain and VLAN configuration information from the information contained in the VTP database file (vlan.dat) or the startup configuration file. Depending on the VTP mode configured for the switch, the information is updated as follows:

server—If the startup configuration file indicates the switch to be configured in VTP server mode, the switch recovers the VTP and VLAN configuration information from the VTP database file available in the bootflash storage file system. If the VTP configuration cannot be retrieved from the file in the bootflash file system, the default VLAN configuration (VLANs 1-1005) is applied to the VTP server configuration, and the configuration revision number is set to zero (0).

client—If, within 5 seconds, the VTP client does not receive the VTP configuration information from the VTP server or other VTP devices in the VTP domain, it uses the locally configured VLAN information. This locally configured VTP information is overwritten by the configuration that it later receives from the VTP server.

transparent—If both the VTP database and the startup configuration file show the VTP mode as transparent and the VTP domain names match, the VTP database is ignored. The VTP and VLAN configurations in the startup configuration file are used to restore the configuration in this VTP device.

If the VTP domain information in the startup configuration file does not match with that in the VTP database file, then the configuration in the VTP database file is used to restore the configuration in the transparent VTP device.

Examples

This example shows how to store the VTP configuration to a file named myvtp.txt in the local writable storage file system, bootflash:

switch(config)# vtp file bootflash:///myvtp.txt 
switch(config)#
 
   

Related Commands

Command
Description

feature vtp

Enables VTP on the switch.

show running-config vtp

Displays the running VTP configuration.

show vtp status

Displays VTP information.


vtp mode

To configure the VLAN Trunking Protocol (VTP) device mode, use the vtp mode command. To revert to the default server mode, use the no form of this command.

vtp mode {client | off | server | transparent}

no vtp mode

Syntax Description

client

Specifies the device as a client.

off

Specifies the device mode as off.

server

Specifies the device as a server.

transparent

Specifies the device mode as transparent.


Command Default

Server

Command Modes

Global configuration mode

Command History

Release
Modification

6.0(2)N1(1)

This command we introduced.


Usage Guidelines

VLAN Trunking Protocol (VTP) is a Cisco Proprietary Layer 2 messaging protocol used to distribute the VLAN configuration information across multiple devices within a VTP domain. Without VTP, you must configure VLANs in each device in the network. Using VTP, you configure VLANs on a VTP server and then distribute the configuration to other VTP devices in the VTP domain.

In VTP transparent mode, you can configure VLANs (add, delete, or modify) and private VLANs. VTP transparent switches do not participate in VTP. A VTP transparent switch does not advertise its VLAN configuration and does not synchronize its VLAN configuration based on received advertisements. The VTP configuration revision number is always set to zero (0). Transparent switches do forward VTP advertisements that they receive out their trunk ports in VTP version 2.

A VTP device mode can be one of the following:

server—You can create, modify, and delete VLANs and specify other configuration parameters, such as VTP version, for the entire VTP domain. VTP servers advertise their VLAN configuration to other switches in the same VTP domain and synchronize their VLAN configuration with other switches based on advertisements received over trunk links. VTP server is the default mode.


Note You can configure VLANs 1 to 1005. VLANs 1002 to 1005 are reserved for token ring in VTP version 2.


client—VTP clients behave the same way as VTP servers, but you cannot create, change, or delete VLANs on a VTP client.

transparent—You can configure VLANs (add, delete, or modify) and private VLANs. VTP transparent switches do not participate in VTP. A VTP transparent switch does not advertise its VLAN configuration and does not synchronize its VLAN configuration based on received advertisements. Because of this, the VTP configuration revision number is always set to zero (0). Transparent switches do forward VTP advertisements that they receive out their trunk ports in VTP version 2.

off—In the above three described modes, VTP advertisements are received and transmitted as soon as the switch enters the management domain state. In the VTP off mode, switches behave the same as in VTP transparent mode with the exception that VTP advertisements are not forwarded. You can use this VTP device to monitor the VLANs.


Note If you use the no vtp mode command to remove a VTP device, the device will be configured as a VTP server. Use the vtp mode off command to remove a VTP device.


Examples

This example shows how to configure a VTP device in transparent mode and add VLANs 2, 3, and 4:

switch(config)# vtp mode transparent 
switch(config)# vlan 2-4 
switch(config-vlan)#
 
   

This example shows how to remove a device configured as a VTP device:

switch(config)# vtp mode off 
switch(config)# 
 
   

This example shows how to configure a VTP device as a VTP server and adds VLANs 2 and 3:

switch(config)# vtp mode server 
switch(config)# vlan 2,3 
switch(config-vlan)#
 
   
 
   

This example shows how to configure a VTP device as a client:

switch(config)# vtp mode client 
switch(config)#
 
   

Related Commands

Command
Description

feature vtp

Enables VTP on the switch.

show vtp status

Displays VTP information.

vlan

Configures VLANs.


vtp password

To set the password for the VTP administrative domain, use the vtp password command. To remove the administrative password, use the no form of this command.

vtp password password

no vtp password

Syntax Description

password

VTP domain password. The password is in ASCII text and can be a maximum of 64 characters.


Command Default

None

Command Modes

Global configuration mode

Command History

Release
Modification

6.0(2)N1(1)

This command we introduced.


Usage Guidelines

If you configure a password for VTP, you must configure the password on all switches in the VTP domain. The password must be the same password on all those switches. The VTP password that you configure is translated by an algorithm into a 16-byte word (MD5 value) that is carried in all summary-advertisement VTP packets.

Examples

This example shows how to configure a password for the VTP administrative domain named accounting:

switch(config)# vtp domain accounting 
switch(config)# vtp password cisco 
switch(config)# 
 
   

Related Commands

Command
Description

show vtp password

Displays the VTP domain password.

show vtp status

Displays VTP information.


vtp version

To configure the administrative domain to a VLAN Trunking Protocol (VTP) version, use the vtp version command. To revert to the default version, use the no form of this command.

vtp version version

no vtp version

Syntax Description

version

VTP version. The range is from 1 to 2.


Command Default

Version 1 enabled
Version 2 disabled

Command Modes

Global configuration mode

Command History

Release
Modification

6.0(2)N1(1)

This command we introduced.


Usage Guidelines

Before you use this command, you must enable VTP on the switch by using the feature vtp command.

If you enable VTP, you must configure either version 1 or version 2. If you are using VTP in a Token Ring environment, you must use version 2.

Examples

This example shows how to enable VTP version 2 for Token Ring VLANs:

switch(config)# vtp version 2 
switch(config)#
 
   

Related Commands

Command
Description

feature vtp

Enables VTP on the switch.

show vtp status

Displays VTP information.