Table Of Contents
Configuring Virtual Ethernet Interfaces
Guidelines and Limitations
Configuring a vEthernet Access Interface
Configuring a vEthernet Private VLAN Interface
Enabling or Disabling a vEthernet Interface
Verifying vEthernet Interface Configuration
vEthernet Show Command Examples
vEthernet Interface Example Configurations
Default Settings
Additional References
Related Documents
Standards
Configuring Virtual Ethernet Interfaces
This chapter describes how to configure virtual Ethernet (vEthernet or vEth) interfaces.
This chapter includes the following topics:
•
"Guidelines and Limitations" section
•
Configuring a vEthernet Access Interface
•
Configuring a vEthernet Private VLAN Interface
•
Enabling or Disabling a vEthernet Interface
•
Verifying vEthernet Interface Configuration
•
vEthernet Interface Example Configurations
•
Additional References
Guidelines and Limitations
The following are guidelines and limitations to consider when configuring vEthernet interfaces:
•
MTU cannot be configured on 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 autoformatted 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 autoformatted 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 vethid
7.
copy run start
DETAILED STEPS
| |
Command
|
Purpose
|
Step 1
|
config t
Example:
n1000v# config t
n1000v(config)#
|
Places you into CLI Global Configuration mode.
|
Step 2
|
interface vethernet interface-number
Example:
n1000v(config)# interface vethernet 100
n1000v(config-if)#
|
Places you into CLI Interface Configuration mode for the specified vEth interface.
Interface-number: 1-1048575 allowable range
|
Step 3
|
description string
Example:
n1000v(config-if)# description
accessvlan
n1000v(config-if)#
|
Adds a description to the interface in the running configuration.
string: Can be up to 80 alphanumeric characters.
|
Step 4
|
switchport access vlan vlanid
Example:
n1000v(config-if)# switchport access
vlan 5
n1000v(config-if)#
|
Configures the vEth interface as an access interface and specifies the VLAN ID in the running configuration.
VLAN ID: Allowable range = 1-4094
|
Step 5
|
switchport mode {access | private-vlan
{host | promiscuous} | trunk}
Example:
n1000v(config-if)# switchport mode
access
n1000v(config-if)#
|
Configures the vEth interface switchport mode in the running configuration.
• access
• private-vlan: host or promiscuous
• trunk
|
Step 6
|
show interface
Example:
n1000v(config-if)# show interface
vethernet1
n1000v(config-if)#
|
(Optional) Displays the interface status and information.
|
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 vEthernet Private VLAN Interface
Use this procedure to configure a vEthernet interface for PVLAN.
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 CLI Global Configuration mode.
|
Step 2
|
interface vethernet interface-number
Example:
n1000v(config)# interface vethernet 1
n1000v(config-if)#
|
Places you into CLI Interface Configuration mode for the specified vEth interface.
Interface-number: 1-1048575 allowable range
|
Step 3
|
description string
Example:
n1000v(config-if)# description
isp_pvlan1
|
Adds a description to the interface in the running configuration.
string: Can be up to 80 alphanumeric characters.
|
Step 4
|
switchport access vlan vlanid
Example:
n1000v(config-if)# switchport access
vlan 5
|
Configures the vEth interface as an access interface and specifies the VLAN ID in the running configuration.
VLAN: Allowable range = 1-4094
|
Step 5
|
switchport mode {access | private-vlan
{host | promiscuous} | trunk}
Example:
n1000v(config-if)# switchport mode
private-vlan host
|
Configures the vEth interface for private vlan host in the running configuration.
• access
• private-vlan: host or promiscuous
• trunk
|
Step 6
|
switchport private-vlan host-association
primary vlanid
Example:
n1000v(config-if)# switchport
private-vlan host-association 5
|
Configures the vEth interface for a host association with a specific primary VLAN ID in the running configuration.
host-association: primary VLAN ID
primary private -VLAN ID: allowable range 1-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.
|
This example shows how to configure a vEthernet interface to use in a private vlan:
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 vethernet1
Hardware is Virtual, address is 0050.5681.4af0
32219 Input Packets 31263 Unicast Packets
0 Multicast Packets 956 Broadcast Packets
15626 Output Packets 0 Unicast Packets
0 Multicast Packets 15626 Broadcast Packets 15626 Flood Packets
0 Input Packet Drops 0 Output Packet Drops
Enabling or Disabling a vEthernet Interface
Use this procedure to enable or disable a vEtherenet interface.
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 CLI Global Configuration mode.
|
Step 2
|
interface vethernet interface-number
Example:
n1000v(config)# interface vethernet 100
n1000v(config-if)#
|
Places you into CLI Interface Configuration mode for the specified vEth interface.
Interface-number: 1-1048575 allowable range
|
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.
|
This example shows how to enable a vEthernet interface:
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 --
Verifying vEthernet Interface Configuration
Use the following commands to display vEthernet interface configurations:
Command
|
Purpose
|
show interface vethernet vif-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 vif-number]
|
Displays the complete interface configuration.
|
show interface [vethernet vif-number] brief
|
Displays abbreviated interface configuration.
|
show interface [vethernet vif-number] counters
|
Displays the interface incoming and outgoing counters.
|
show interface [vethernet vif-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 vif-number] counters errors
|
Displays the interface error counters .
|
show interface [vethernet vif-number] description
|
Displays the interface description.
|
show interface [vethernet vif-number] mac-address
|
Displays the interface MAC address.
Note For vEth interfaces this shows the MAC address of the connected device.
|
show interface [vethernet vif-number] status [ down | err-disabled | inactive | module num | up ]
|
Displays interface line status.
|
show interface [vethernet vif-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.
|
vEthernet Show Command Examples
n1000v# show interface veth1
Port description is gentoo1, Network Adapter 1
Hardware is Virtual, address is 0050.56bd.42f6
Owner is VM "gentoo1", adapter is Network Adapter 1
491242 Input Packets 491180 Unicast Packets
7 Multicast Packets 55 Broadcast Packets
504958 Output Packets 491181 Unicast Packets
1 Multicast Packets 13776 Broadcast Packets 941 Flood Packets
11 Input Packet Drops 0 Output Packet Drops
n1000v# show interface virtual
--------------------------------------------------------------------------------
Port Adapter Owner Mod Host
--------------------------------------------------------------------------------
Veth1 Net Adapter 1 austen-gentoo1 33 austen-strider.austen.
Veth2 Net Adapter 2 austen-gentoo1 33 austen-strider.austen.
n1000v# show interface virtual description
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Veth1 gentoo1, Network Adapter 1
Veth2 gentoo1, Network Adapter 2
Veth3 VMware VMkernel, vmk1
Veth4 VMware Service Console, vswif1
n1000v# show interface counters
--------------------------------------------------------------------------------
Port InOctets InUcastPkts InMcastPkts InBcastPkts
--------------------------------------------------------------------------------
Eth2/2 41423421 112708 125997 180167
Eth5/2 39686276 119152 93284 180100
Eth5/6 4216279 9530 31268 40
--------------------------------------------------------------------------------
Port OutOctets OutUcastPkts OutMcastPkts OutBcastPkts
--------------------------------------------------------------------------------
Eth2/2 23964739 116150 516 52768
Eth5/2 26419473 111598 571 52420
Eth5/6 1042930 9548 536 14
n1000v# show interface virtual port-mapping
--------------------------------------------------------------------------------
Port Hypervisor Port Status Reason
--------------------------------------------------------------------------------
n1000v# show running-config interface veth1
inherit port-profile vlan48
description gentoo1, Network Adapter 1
vEthernet Interface Example Configurations
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
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
Default Settings
The following table lists the default settings for device access and trunk port mode parameters.
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
|
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(1)
|
VLANs and private VLANs
|
Cisco Nexus 1000V Layer 2 Switching Configuration Guide, Release 4.0(4)SV1(1)
|
System management
|
Cisco Nexus 1000V System Management Configuration Guide, Release 4.0(4)SV1(1)
|
Release Notes
|
Cisco Nexus 1000V Release Notes, Release 4.0(4)SV1(1)
|
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.
|
—
|