Virtual Ethernet (vEthernet or vEth) interfaces are logical interfaces. Each vEthernet interface corresponds to a switch interface that is connected to a virtual port. The interface types are as follows:
VM (interfaces connected to VM NICs)
Service console
vmkernel
vEthernet interfaces are created on the Cisco Nexus 1000V to represent virtual ports in use on the distributed virtual switch.
vEthernet interfaces are mapped to connected ports by MAC address as well as DVPort number. When a server administrator changes the port profile assignment on a vNIC or hypervisor port, the same vEthernet interface is reused.
When bringing up a vEthernet interface where a change in the port profile assignment is detected, the Virtual Supervisor Module (VSM) automatically purges any manual configuration present on the interface. You can use the following command to prevent purging of the manual configuration:
no svs veth auto-config-purge
Guidelines and Limitations
vEthernet interface configuration has the following configuration guideline and limitation:
MTU cannot be configured on a vEthernet interface.
Default Settings
Table 1 Default Settings for vEthernet Interface
Parameters
Default
Switchport mode
Access
Allowed VLANs
1 to 4094
Access VLAN ID
VLAN1
Native VLAN ID
VLAN1
Native VLAN ID tagging
Disabled
Administrative state
Shut
Automatic deletion of vEthernet interfaces
Enabled
Automatic purge of manual configuration on vEthernet interfaces
Enabled
Automatic creation of vEthernet interfaces
Enabled
Configuring vEthernet Interfaces
Configuring Global vEthernet Properties
You can enable or disable the following automatic controls for vEthernet interfaces:
Deleting unused vEthernet interfaces
Purging of manual vEthernet configurations
Creating vEthernet interfaces
Before You Begin
Log in to the CLI in EXEC mode.
Procedure
Command or Action
Purpose
Step 1
switch# configure terminal
Enters global configuration mode.
Step 2
switch(config)# [no] svs veth auto-delete
(Optional)
Enables the VSM to automatically delete DVPorts no longer used by a vNIC or hypervisor port.
The default setting is enabled.
The no form of this command prevents the VSM from deleting unused DVPorts.
Step 3
switch(config)# [no] svs veth auto-config-purge
(Optional)
Enables the VSM to remove all manual configuration on a vEthernet interface when the system administrator changes a port profile on the interface.
The default setting is enabled.
The no form of this command prevents the manual configuration from being deleted in this situation.
Note
Port profiles with ephemeral bindings are purged regardless of this setting.
Step 4
switch(config)# [no] svs veth auto-setup
(Optional)
Enables the VSM to automatically create a vEthernet interface when a new port is activated on a host.
The no form of this command disables the automatic creation of vEthernet interfaces in this situation.
Note
You can use no form of the command to temporary block automatic creation of vEthernet interfaces.
Step 5
switch(config)# show running-config all | grep“svs-veth”
(Optional)
Displays the default global vEthernet settings that are in effect on the VSM for verification. If a setting is disabled, it does not display in the show command output.
You can configure a vEthernet interface for use as an access interface.
Before You Begin
Log in to the CLI in EXEC mode.
If you do not add a description to the vEthernet interface, one of the following descriptions is added at attach time. If you add a description and then remove it using the no description command, then one of the following descriptions is added to the interface:
Saves the change persistently through reboots and restarts by copying the running configuration to the startup configuration.
This example shows how to enable a vEthernet interface:
switch# configure terminal
switch(config)# interface vethernet 100
switch(config-if)# no shutdown
switch(config-if)# how interface veth100 status
--------------------------------------------------------------------------------
Port Name Status Vlan Duplex Speed Type
--------------------------------------------------------------------------------
Veth100 -- up 1 auto auto --
switch(config-if)#
Verifying the vEthernet Interface Configuration
Use one of the following commands to verify the configuration:
Command
Purpose
show interface vethernetinterface-number [brief | counters [detailed [all] | errors] | description | mac-address | status [ down | err-disabled | inactive | modulenum | up ] | switchport]
Displays the vEthernet interface configuration.
show interface [vethernetinterface-number]
Displays the complete interface configuration.
show interface [vethernetinterface-number] brief
Displays the abbreviated interface configuration.
show interface [vethernetinterface-number] description
Displays the interface description.
show interface [vethernetinterface-number] mac-address
Displays the interface MAC address.
Note
For vEth interfaces, this command shows the MAC address of the connected device.
show interface [vethernetinterface-number] status [down | err-disabled | inactive | modulenum | up]
Displays the interface line status.
show interface [vethernetinterface-number] switchport
Displays interface switchport information.
show interface virtual [vm [vm_name] | vmk | vswif] [modulemod_no]
The following example shows how to display the virtual port mapping for all vEthernet interfaces:
switch# show interface virtual port-mapping
-------------------------------------------------------------------------------
Port Hypervisor Port Binding Type Status Reason
-------------------------------------------------------------------------------
Veth1 DVPort5747 static up none
Veth2 DVPort3361 static up none
switch#
Example: show running-config interface veth1
The following example shows how to display the running configuration information for all vEthernet interfaces:
switch# show running-config interface veth1
version 4.2(1)SV1(4)
interface Vethernet1
inherit port-profile vlan48
description gentoo1, Network Adapter 1
vmware dvport 2968 dvswitch uuid "d4 02 20 50 16 4b 36 97-46 09 dc d8 5b c6 1e c1"
vmware vm mac 0050.56A0.0000
switch#
Monitoring the vEthernet Interface Configuration
Use one of the following commands to monitor the vEthernet interface configuration:
Command
Purpose
show interface [vethernet interface-number] counters
Displays the interface incoming and outgoing counters.
show interface [ vethernet interface-number] counters detailed [all]
Displays detailed information for all counters.
Note
If all is not specified, only nonzero counters are shown.
show interface [vethernet interface-number] counters errors
Displays the interface error counters.
The following example shows how to display the counters for all vEthernet interfaces:
This example shows how to configure a Layer 2 trunk interface, assign the native VLAN and the allowed VLANs, and configure the device to tag the native VLAN traffic on the trunk interface: