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.
Syntax Description
Command Default
Command Modes
Command History
|
|
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
|
|
---|---|
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.
no vlan { vlan-id | vlan-range }
Syntax Description
Command Default
Command Modes
Note You can also create and delete VLANs in the VLAN configuration mode using these same commands.
Command History
|
|
---|---|
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
|
|
---|---|
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
Command Default
Command Modes
Spanning-tree pseudo configuration mode
Command History
|
|
---|---|
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.
Examples
This example shows how to configure a spanning-tree domain:
Related Commands
|
|
---|---|
Displays the running configuration information of the Spanning Tree Protocol (STP). |
|
vlan configuration
To configure a VLAN prior to or without needing to actually create the VLAN, use the vlan configuration command.
Syntax Description
The range is from 1 to 2499 and from 2628 to 4093. The VLAN range can be specified in the format shown in this example: 1-5, 10 or 2-5,7-19. |
Defaults
Command Modes
Global configuration mode (config)
Command History
|
|
---|---|
Usage Guidelines
If you use the vlan configuration command to configure a VLAN that you have not yet created and you later want to create that VLAN, use the vlan command to create the configured VLAN.
The show vlan command does not display any VLAN until and unless you actually create the VLAN.
Examples
This example shows how to configure a VLAN and enter the VLAN configuration mode:
Related Commands
|
|
---|---|
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.
Syntax Description
Command Default
Command Modes
Command History
|
|
---|---|
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:
This example shows how to disable 802.1Q tagging on the switch:
Related Commands
|
|
---|---|
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
Command Default
Command Modes
Virtual Ethernet interface configuration mode
Command History
|
|
Usage Guidelines
Examples
This example shows how to configure a VMware policy on a specific virtual Ethernet interface:
Related Commands
|
|
---|---|
Displays information about the virtual Ethernet interface configuration. |
|
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 }
Syntax Description
Command Default
Command Modes
SVS connection configuration mode
Command History
|
|
---|---|
Usage Guidelines
Examples
This example shows how to create a VMware virtual switch:
This example shows how to remove a VMware virtual switch:
Related Commands
|
|
---|---|
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.
Syntax Description
Command Default
Command Modes
Virtual Ethernet interface configuration mode
Command History
|
|
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.
Examples
This example shows how to configure a VMware policy on a specific virtual Ethernet interface:
Related Commands
|
|
---|---|
Displays information about the virtual Ethernet interface configuration. |
|
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
Name of the VRF. The VRF name can be any case-sensitive, alphanumeric string up to 32 characters. |
|
Command Default
Command Modes
ERSPAN session configuration mode
Command History
|
|
Usage Guidelines
Examples
This example shows how to configure a VRF instance for the ESRSPAN source:
Related Commands
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 of the VRF. The name can be a maximum of 32 alphanumeric characters and is case-sensitive. |
|
Command Default
Command Modes
Command History
|
|
---|---|
Usage Guidelines
When you enter the VRF configuration mode, the following commands are available:
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.
Examples
This example shows how to enter VRF context mode:
switch(config)#
vrf context management
switch(config-vrf)#
Related Commands
|
|
---|---|
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.
Syntax Description
Command Default
Command Modes
Command History
|
|
---|---|
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:
Related Commands
|
|
---|---|
Copies the running configuration to the startup configuration. |
|
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.
Syntax Description
VTP domain name. The name can be a maximum of 32 ASCII characters. |
Command Default
Command Modes
Command History
|
|
---|---|
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:
Related Commands
|
|
---|---|
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
Syntax Description
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
Command Modes
Command History
|
|
---|---|
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:
Related Commands
|
|
---|---|
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 }
Syntax Description
Command Default
Command Modes
Command History
|
|
---|---|
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:
This example shows how to remove a device configured as a VTP device:
This example shows how to configure a VTP device as a VTP server and adds VLANs 2 and 3:
This example shows how to configure a VTP device as a client:
Related Commands
|
|
---|---|
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.
Syntax Description
VTP domain password. The password is in ASCII text and can be a maximum of 64 characters. |
Command Default
Command Modes
Command History
|
|
---|---|
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:
Related Commands
|
|
---|---|
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.
Syntax Description
Command Default
Command Modes
Command History
|
|
---|---|
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:
Related Commands
|
|
---|---|