Cisco Nexus 1000V Interface Configuration Guide, Release 4.0(4)SV1(2)
Configuring Virtual Ethernet Interfaces
Downloads: This chapterpdf (PDF - 167.0KB) The complete bookPDF (PDF - 2.65MB) | Feedback

Configuring Virtual Ethernet Interfaces

Table Of Contents

Configuring Virtual Ethernet Interfaces

Information About vEthernet Interfaces

Guidelines and Limitations

Default Settings

Configuring vEthernet Interfaces

Configuring a vEthernet Access Interface

Configuring a Private VLAN on a vEthernet Interface

Enabling or Disabling a vEthernet Interface

Verifying the vEthernet Interface Configuration

Configuration Examples for vEthernet Interfaces

Additional References

Related Documents

Standards

Feature History for vEthernet Interface Parameters


Configuring Virtual Ethernet Interfaces


This chapter describes how to configure virtual Ethernet (vEthernet or vEth) interfaces.

This chapter includes the following sections:

Information About vEthernet Interfaces

Guidelines and Limitations

Default Settings

Configuring vEthernet Interfaces

Verifying the vEthernet Interface Configuration

Configuration Examples for vEthernet Interfaces

Additional References

Feature History for vEthernet Interface Parameters

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:

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.

Guidelines and Limitations

vEthernet interface configuration has the following guideline and limitation:

MTU cannot be configured on a vEthernet interface.

Default Settings

The following are default settings for virtual Ethernet interfaces.

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


Configuring vEthernet Interfaces

This section includes the following topics:

Configuring a vEthernet Access Interface

Configuring a Private VLAN on a vEthernet Interface

Enabling or Disabling a vEthernet Interface

Configuring a vEthernet Access Interface

Use this procedure to configure a vEthernet interface for use as an access interface.

BEFORE YOU BEGIN

Before beginning this procedure, you must know or do the following:

You are logged into the CLI in EXEC mode.

If you do not add a description to the vEthernet interface, then 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:

For a VM—VM-Name, Network Adapter number

For a VMK—VMware VMkernel, vmk number

For a VSWIF—VMware Service Console, vswif number

SUMMARY STEPS

1. config t

2. interface vethernet interface-number

3. description string

4. switchport access vlan vlan-id

5. switchport mode access

6. show interface interface-number

7. copy running-config startup-config

DETAILED STEPS

 
Command
Purpose

Step 1 

config t

Example:

n1000v# config t

n1000v(config)#

Places you into global configuration mode.

Step 2 

interface vethernet interface-number

Example:

n1000v(config)# interface vethernet 100

n1000v(config-if)#

Places you into interface configuration mode for the specified vEthernet interface.

For interface-number, the range is from 1 to 1048575.

Step 3 

description string

Example:

n1000v(config-if)# description accessvlan

Adds a description to the interface in the running configuration.

For string, the description can be up to 80 alphanumeric characters.

Note You do not need to use quotations around descriptions that include spaces.

Step 4 

switchport access vlan vlanid

Example:

n1000v(config-if)# switchport access vlan 5

Configures the vEthernet interface as an access interface and specifies the VLAN ID in the running configuration.

For vlanid, the range is from 1 to 4094.

Step 5 

switchport mode access

Example:

n1000v(config-if)# switchport mode access

n1000v(config-if)#

Configures the vEthernet interface for use as an access interface in the running configuration.

Step 6 

show interface interface-number

Example:

n1000v(config-if)# show interface vethernet1

(Optional) Displays the interface status and information.

For interface-number, the range is from 1 to 1048575.

Step 7 

copy running-config startup-config

Example:

n1000v(config)# copy running-config startup-config

(Optional) Saves the running configuration persistently through reboots and restarts by copying it to the startup configuration.

Configuring a Private VLAN on a vEthernet Interface

Use this procedure to configure a private VLAN (PVLAN) on a vEthernet interface.

BEFORE YOU BEGIN

Before beginning this procedure, you must know or do the following:

You are logged into the CLI in EXEC mode.

SUMMARY STEPS

1. config t

2. interface vethernet interface-number

3. description string

4. switchport access vlan vlan-id

5. switchport mode private-vlan host

6. switchport private-vlan host-association primary-vlan-id

7. show interface

8. copy running-config startup-config

 
Command
Purpose

Step 1 

config t

Example:

n1000v# config t

n1000v(config)#

Places you into global configuration mode.

Step 2 

interface vethernet interface-number

Example:

n1000v(config)# interface vethernet 1

n1000v(config-if)#

Places you into interface configuration mode for the specified vEthernet interface.

For interface-number, the range is from 1 to 1048575.

Step 3 

description string

Example:

n1000v(config-if)# description isp_pvlan1

Adds a description to the interface in the running configuration.

For string, the description can be up to 80 alphanumeric characters.

Note You do not need to use quotations around descriptions that include spaces.

Step 4 

switchport access vlan vlan-id

Example:

n1000v(config-if)# switchport access vlan 5

Configures the vEthernet interface as an access interface and specifies the VLAN ID in the running configuration.

For vlan-id, the range is from 1 to 4094.

Step 5 

switchport mode private-vlan host

Example:

n1000v(config-if)# switchport mode private-vlan host

Configures the vEthernet interface for a PVLAN host in the running configuration.

Step 6 

switchport private-vlan host-association primary-vlanid

Example:

n1000v(config-if)# switchport private-vlan host-association 5

Configures the vEthernet interface for a host association with a specific primary VLAN ID in the running configuration.

For primary-vlanid, the range is from 1 to 4094.

Step 7 

show interface

Example:

n1000v# show interface

(Optional) Displays the interface status and information.

Step 8 

copy running-config startup-config

Example:

n1000v(config)# copy running-config startup-config

(Optional) Saves the running configuration persistently through reboots and restarts by copying it to the startup configuration.

EXAMPLES

The following example shows how to configure a vEthernet interface to use in a private vlan:

n1000v# config t 
n1000v(config)# interface vethernet 1
n1000v(config-if)# description isp_pvlan1
n1000v(config-if)# switchport access vlan 5
n1000v(config-if)# switchport mode private-vlan host
n1000v(config-if)# switchport private-vlan host-association 5

n1000v(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
 
   

Enabling or Disabling a vEthernet Interface

Use this procedure to enable or disable a vEtherenet interface.

SUMMARY STEPS

1. config t

2. interface vethernet interface-number

3. [no] shutdown

4. show interface

5. copy running-config startup-config

BEFORE YOU BEGIN

Before beginning this procedure, you must know or do the following:

You are logged into the CLI in EXEC mode.

DETAILED STEPS

 
Command
Purpose

Step 1 

config t

Example:

n1000v# config t

n1000v(config)#

Places you into global configuration mode.

Step 2 

interface vethernet interface-number

Example:

n1000v(config)# interface vethernet 100

n1000v(config-if)#

Places you into interface configuration mode for the specified vEthernet interface.

For interface-number, the range is from 1 to 1048575.

Step 3 

[no] shutdown

Example:

n1000v(config-if)# no shutdown

n1000v(config-if)#

Enables or disables the vEthernet interface in the running configuration:

shutdown—Disables the vEthernet interface.

no shutdown—Enables the vEthernet interface.

Step 4 

show interface

Example:

n1000v# show interface

(Optional) Displays the interface status and information.

Step 5 

copy running-config startup-config

Example:

n1000v(config)# copy running-config startup-config

(Optional) Saves the running configuration persistently through reboots and restarts by copying it to the startup configuration.

EXAMPLES

The following example shows how to enable a vEthernet interface:

n1000v# config t
n1000v(config)# interface vethernet 100
n1000v(config)# no shutdown
n1000v(config-if)# show interface veth100 status
 
   
--------------------------------------------------------------------------------
Port           Name               Status   Vlan      Duplex  Speed   Type
--------------------------------------------------------------------------------
Veth100        --                       up          1       auto        auto    --
n1000v(config-if)# 

Verifying the vEthernet Interface Configuration

Use the following commands to display and verify the vEthernet interface information.

Command
Purpose

show interface vethernet interface-number [brief | counters [detailed [all] | errors] | description | mac-address | statusdown | 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 abbreviated interface configuration.

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 then only non-zero counters are shown.

show interface [vethernet interface-number] counters errors

Displays the interface error counters.

show interface [vethernet interface-number] description

Displays the interface description.

show interface [vethernet interface-number] mac-address

Displays the interface MAC address.

Note For vEth interfaces this shows the MAC address of the connected device.

show interface [vethernet interface-number] status [ down | err-disabled | inactive | module num | up ]

Displays 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 vEth and VMware DVPort.


The following example shows how to display vEthernet 1:

n1000v# 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
n1000v# 
 
   
 
   

The following example shows how to display information for all vEthernet interfaces:

n1000v# 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.
n1000v# 
 
   
 
   

The following example shows how to display the descriptions for all vEthernet interfaces:

n1000v# 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   
 
   
 
   

The following example shows how to display the counters for all vEthernet interfaces:

n1000v# 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
 
   
n1000v# 
 
   
 
   

The following example shows how to display the virtual port mapping for all vEthernet interfaces:

n1000v# show interface virtual port-mapping 
 
   
--------------------------------------------------------------------------------
Port        Hypervisor Port  Status  Reason                   
--------------------------------------------------------------------------------
Veth1       DVPort100        up      none                    
Veth2       DVPort160        up      none 
 
   
 
   

The following example shows how to display the running configuration information for all vEthernet interfaces:

n1000v# show running-config interface veth1
version 4.0(4)SV1(1)
 
interface Vethernet1
  inherit port-profile vlan48
  description gentoo1, Network Adapter 1

Configuration Examples for vEthernet Interfaces

The following example shows how to configure a vEthernet access interface and assign the access VLAN for that interface:

n1000v# configure terminal
n1000v(config)# interface vethernet 2/30
n1000v(config-if)# switchport
n1000v(config-if)# switchport mode access
n1000v(config-if)# switchport access vlan 5
n1000v(config-if)#
 
   

The following 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:

n1000v# configure terminal
n1000v(config)# interface vethernet 2/35
n1000v(config-if)# switchport
n1000v(config-if)# switchport mode trunk
n1000v(config-if)# switchport trunk native vlan 10
n1000v(config-if)# switchport trunk allowed vlan 5, 10
n1000v(config-if)# exit
n1000v(config)#
 
   

Additional References

For additional information related to implementing access and trunk port modes, see the following sections:

Related Documents

Standards

Related Documents

Related Topic
Document Title

Port Profiles

Cisco Nexus 1000V Port Profile Configuration Guide, Release 4.0(4)SV1(2)

VLANs and private VLANs

Cisco Nexus 1000V Layer 2 Switching Configuration Guide, Release 4.0(4)SV1(2)

System management

Cisco Nexus 1000V System Management Configuration Guide, Release 4.0(4)SV1(2)

Release Notes

Cisco Nexus 1000V Release Notes, Release 4.0(4)SV1(2)


Standards

Standards
Title

No new or modified standards are supported by this feature, and support for existing standards has not been modified by this feature.


Feature History for vEthernet Interface Parameters

This section provides the feature history for vEthernet interface parameters.

Feature Name
Releases
Feature Information

vEthernet interface parameters

4.0

This feature was introduced.