- Information About vEthernet Interfaces
- Guidelines and Limitations
- Default Settings
- Configuring vEthernet Interfaces
- Verifying the vEthernet Interface Configuration
- Monitoring the vEthernet Interface Configuration
- Configuration Examples for vEthernet Interfaces
- Feature History for vEthernet Interfaces
Configuring Virtual Ethernet Interfaces
This chapter contains the following sections:
- Information About vEthernet Interfaces
- Guidelines and Limitations
- Default Settings
- Configuring vEthernet Interfaces
- Verifying the vEthernet Interface Configuration
- Monitoring the vEthernet Interface Configuration
- Configuration Examples for vEthernet Interfaces
- Feature History for vEthernet Interfaces
Information About vEthernet Interfaces
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:
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
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:
Log in to the CLI in EXEC mode.
This example shows how to configure global vEthernet properties:
switch# configure terminal switch(config)# svs veth auto-delete switch(config)# svs veth auto-config-purge switch(config)# svs veth auto-setup switch(config)# show running-config all | grep "svs veth" svs veth auto-setup svs veth auto-delete svs veth auto-config-purge switch(config-if)#
Configuring a vEthernet Access Interface
You can configure a vEthernet interface for use as an access interface.
Command or Action | Purpose | |||||
---|---|---|---|---|---|---|
Step 1 | switch# configure terminal | Enters global configuration mode. |
||||
Step 2 | switch(config)# interface vethernet interface-number | (Optional) Enters the interface configuration mode for the specified vEthernet interface (from 1 to 1048575). |
||||
Step 3 | switch(config-if)# description string | (Optional) Adds a description of up to 80 alphanumeric characters to the interface in the running configuration.
|
||||
Step 4 | switch(config-if)# switchport access vlan vlanid | Configures the vEthernet interface as an access interface and specifies the VLAN ID (1 to 4094) in the running configuration. |
||||
Step 5 | switch(config-if)# switchport mode access | Configures the vEthernet interface for use as an access interface in the running configuration. |
||||
Step 6 | switch(config-if)# show interface vethernet interface-number | (Optional) Displays the specified interface for verification. |
||||
Step 7 | switch(config-if)# copy running-config startup-config | (Optional) Saves the change persistently through reboots and restarts by copying the running configuration to the startup configuration. |
This example shows how to configure a vEthernet access interface:
switch# configure terminal switch(config)# interface vethernet 100 switch(config-if)# description accessvlan switch(config-if)# switchport access vlan 5 switch(config-if)# switchport mode access switch(config-if)# show interface vethernet1 switch(config-if)#
Configuring a Private VLAN on a vEthernet Interface
You can configure a private VLAN (PVLAN) on a vEthernet interface.
Log in to the CLI in EXEC mode.
Command or Action | Purpose | |||||
---|---|---|---|---|---|---|
Step 1 | switch# configure terminal | Enters global configuration mode. |
||||
Step 2 | switch(config)# interface vethernet interface-number | Enters the interface configuration mode for the specified vEthernet interface (from 1 to 1048575). |
||||
Step 3 | switch(config-if)# description string | (Optional) Adds a description of up to 80 alphanumeric characters to the interface in the running configuration.
|
||||
Step 4 | switch(config-if)# switchport access vlan vlanid | Configures the vEthernet interface as an access interface and specifies the VLAN ID (1 to 4094) in the running configuration. |
||||
Step 5 | switch(config-if)# switchport mode private-vlan host | Configures the vEthernet interface for a PVLAN host in the running configuration. |
||||
Step 6 | switch(config-if)# switchport private-vlan host-association primary-vlanid | Configures the vEthernet interface for a host association with a specific primary VLAN ID (from 1 to 4094) in the running configuration. |
||||
Step 7 | switch(config-if)# show interface | (Optional) Displays the interface status and information. |
||||
Step 8 | switch(config-if)# copy running-config startup-config | (Optional) Saves the change persistently through reboots and restarts by copying the running configuration to the startup configuration. |
This example shows how to configure a vEthernet interface to use in a PVLAN:
switch# configure terminal switch(config)# interface vethernet 1 switch(config-if)# switchport access vlan 5 switch(config-if)# switchport mode private-vlan host switch(config-if)# switchport private-vlan host-association 5 switch(config-if)# show interface vethernet 1 Vethernet1 is up Port description is gentoo, Network Adapter 1 Hardware is Virtual, address is 0050.5687.3bac Owner is VM "gentoo", adapter is Network Adapter 1 Active on module 4 VMware DVS port 1 Port-Profile is vm Port mode is access 5 minute input rate 1 bytes/second, 0 packets/second 5 minute output rate 94 bytes/second, 1 packets/second Rx 655 Input Packets 594 Unicast Packets 0 Multicast Packets 61 Broadcast Packets 114988 Bytes Tx 98875 Output Packets 1759 Unicast Packets 80410 Multicast Packets 16706 Broadcast Packets 0 Flood Packets 6368452 Bytes 0 Input Packet Drops 0 Output Packet Drops switch(config-if)#
Enabling or Disabling a vEthernet Interface
You can enable or disable a vEthernet interface.
Log in to the CLI in EXEC mode.
Command or Action | Purpose | |
---|---|---|
Step 1 | switch# configure terminal | Enters global configuration mode. |
Step 2 | switch(config)# interface vethernet interface-number | Enters the interface configuration mode for the specified vEthernet interface (from 1 to 1048575). |
Step 3 | switch(config-if)# [no] shutdown | Enables or disables the vEthernet interface in the running configuration: |
Step 4 | switch(config-if)# show interface | (Optional) Displays the interface status and information. |
Step 5 | switch(config-if)# copy running-config startup-config | (Optional) 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 vethernet interface-number [brief | counters [detailed [all] | errors] | description | mac-address | status [ down | err-disabled | inactive | module num | up ] | switchport] |
Displays the vEthernet interface configuration. |
||
show interface [vethernet interface-number] |
Displays the complete interface configuration. |
||
show interface [vethernet interface-number] brief |
Displays the abbreviated interface configuration. |
||
show interface [vethernet interface-number] description |
Displays the interface description. |
||
show interface [vethernet interface-number] mac-address |
Displays the interface MAC address.
|
||
show interface [vethernet interface-number] status [down | err-disabled | inactive | module num | up] |
Displays the interface line status. |
||
show interface [vethernet interface-number] switchport |
Displays interface switchport information. |
||
show interface virtual [vm [vm_name] | vmk | vswif] [module mod_no] |
Displays virtual interfaces only. |
||
show interface virtual port-mapping [vm [name] | vmk | vswif | description] [module_num] |
Displays mappings between the virtual ethernet and VMware DVPort. |
Example: show interface vethernet
The following example shows how to display vEthernet 1:
switch# show interface veth1 Vethernet1 is up Port description is gentoo1, Network Adapter 1 Hardware is Virtual, address is 0050.56bd.42f6 Owner is VM "gentoo1", adapter is Network Adapter 1 Active on module 33 VMware DVS port 100 Port-Profile is vlan48 Port mode is access Rx 491242 Input Packets 491180 Unicast Packets 7 Multicast Packets 55 Broadcast Packets 29488527 Bytes Tx 504958 Output Packets 491181 Unicast Packets 1 Multicast Packets 13776 Broadcast Packets 941 Flood Packets 714925076 Bytes 11 Input Packet Drops 0 Output Packet Drops switch#
Example: show interface virtual
The following example shows how to display information for all vEthernet interfaces:
switch# show interface virtual -------------------------------------------------------------------------------- Port Adapter Owner Mod Host -------------------------------------------------------------------------------- Veth1 Vm1-kl61 2 Veth2 VM1-kl65 5 Veth3 VM2-kl61 2 Veth1 Net Adapter 1 austen-gentoo1 33 austen-strider.austen. Veth2 Net Adapter 2 austen-gentoo1 33 austen-strider.austen. switch#
Example: show interface virtual description
The following example shows how to display the descriptions for all vEthernet interfaces:
switch# show interface virtual description -------------------------------------------------------------------------------- Interface Description -------------------------------------------------------------------------------- Veth1 gentoo1, Network Adapter 1 Veth2 gentoo1, Network Adapter 2 Veth3 VMware VMkernel, vmk1 Veth4 VMware Service Console, vswif1 switch#
Example: show interface virtual port-mapping
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.
|
||
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:
switch# show interface counters -------------------------------------------------------------------------------- Port InOctets InUcastPkts InMcastPkts InBcastPkts -------------------------------------------------------------------------------- mgmt0 42754 -- 0 -- Eth2/2 41423421 112708 125997 180167 Eth5/2 39686276 119152 93284 180100 Eth5/6 4216279 9530 31268 40 Veth1 0 0 0 0 Veth2 0 0 0 0 Veth3 0 0 0 0 Veth4 0 0 0 0 Veth5 0 0 0 0 Veth6 0 0 0 0 Veth7 0 0 0 0 Veth100 0 0 0 0 -------------------------------------------------------------------------------- Port OutOctets OutUcastPkts OutMcastPkts OutBcastPkts -------------------------------------------------------------------------------- mgmt0 3358 -- -- -- Eth2/2 23964739 116150 516 52768 Eth5/2 26419473 111598 571 52420 Eth5/6 1042930 9548 536 14 Veth1 393589 0 6150 0 Veth2 393600 0 6150 0 Veth3 393600 0 6150 0 Veth4 0 0 0 0 Veth5 0 0 0 0 Veth6 0 0 0 0 Veth7 0 0 0 0 Veth100 0 0 0 0 switchyup#
Configuration Examples for vEthernet Interfaces
This example shows how to configure a vEthernet access interface and assign the access VLAN for that interface:
switch# configure terminal switch(config)# interface vethernet 100 switch(config-if)# switchport switch(config-if)# switchport mode access switch(config-if)# switchport access vlan 5 switch(config-if)#
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:
switch# configure terminal switch(config)# interface vethernet 1 switch(config-if)# switchport switch(config-if)# switchport mode trunk switch(config-if)# switchport trunk native vlan 10 switch(config-if)# switchport trunk allowed vlan 5, 10 switch(config-if)#
Feature History for vEthernet Interfaces
Feature Name |
Releases |
Feature Information |
---|---|---|
Global vEthernet interface controls |
4.2(1)SV1(4) |
You can enable or disable the following automatic vEthernet interface controls: |
vEthernet interface parameters |
4.0(4)SV1(1) |
This feature was introduced |