The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
This chapter describes the Cisco NX-OS Ethernet and virtual Ethernet commands that begin with V.
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.
|
|
---|---|
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.
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)#
|
|
---|---|
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 }
Note You can also create and delete VLANs in the VLAN configuration mode using these same commands.
|
|
---|---|
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.
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
|
|
---|---|
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 ]
Spanning-tree pseudo configuration mode
|
|
---|---|
You can enter the instance-id argument as a single instance or a range of instances, for example, 0-3,5,7-9.
This example shows how to configure a spanning-tree domain:
|
|
---|---|
Displays the running configuration information of the Spanning Tree Protocol (STP). |
|
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.
|
|
---|---|
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.
This example shows how to enable 802.1Q tagging on the switch:
This example shows how to disable 802.1Q tagging on the switch:
|
|
---|---|
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 "]
Virtual Ethernet interface configuration mode
|
|
---|---|
This example shows how to configure a VMware policy on a specific virtual Ethernet interface:
|
|
---|---|
Displays information about the virtual Ethernet interface configuration. |
|
Displays the running system configuration information for an interface. |
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 }
SVS connection configuration mode
|
|
---|---|
This example shows how to create a VMware virtual switch:
This example shows how to remove a VMware virtual switch:
|
|
---|---|
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.
Virtual Ethernet interface configuration mode
|
|
---|---|
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 example shows how to configure a VMware policy on a specific virtual Ethernet interface:
|
|
---|---|
Displays information about the virtual Ethernet interface configuration. |
|
Displays the running system configuration information for an interface. |
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 }
Name of the VRF. The VRF name can be any case-sensitive, alphanumeric string up to 32 characters. |
|
ERSPAN session configuration mode
|
|
---|---|
This example shows how to configure a VRF instance for the ESRSPAN source:
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 }
Name of the VRF. The name can be a maximum of 32 alphanumeric characters and is case-sensitive. |
|
|
|
---|---|
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.
This example shows how to enter VRF context mode:
switch(config)#
vrf context management
switch(config-vrf)#
|
|
---|---|
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.
|
|
---|---|
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.
This example shows how to enable VTP on an interface:
|
|
---|---|
Copies the running configuration to the startup configuration. |
|
Enables Simple Network Management Protocol (SNMP) notifications. |
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. The name can be a maximum of 32 ASCII characters. |
|
|
---|---|
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.
This example shows how to create a VTP domain named accounting:
|
|
---|---|
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
Note There can be no spaces in the bootflash://server/directory/filename string. Individual elements of this string are separated by colons (:) and slashes (/).
|
|
---|---|
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:
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.
This example shows how to store the VTP configuration to a file named myvtp.txt in the local writable storage file system, bootflash:
|
|
---|---|
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 }
|
|
---|---|
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:
Note You can configure VLANs 1 to 1005. VLANs 1002 to 1005 are reserved for token ring in VTP version 2.
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.
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:
|
|
---|---|
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 domain password. The password is in ASCII text and can be a maximum of 64 characters. |
|
|
---|---|
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.
This example shows how to configure a password for the VTP administrative domain named accounting:
|
|
---|---|
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.
|
|
---|---|
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.
This example shows how to enable VTP version 2 for Token Ring VLANs:
|
|
---|---|