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.
Before You Begin
Log in to the CLI in EXEC mode.
Procedure
PurposeCommand or Action
Enters global configuration mode.switch# configure terminal
Step 1
Enters the interface configuration mode for the specified
vEthernet interface (from 1 to 1048575).
switch(config)# interface vethernet
interface-number
Step 2
(Optional)
Adds a description of up to 80 alphanumeric characters
to the interface in the running configuration.
switch(config-if)# description string
Step 3
If you do not add a description, the default
description is added.
Note
You do not need to use quotations around
descriptions that include spaces.
Note
Configures the vEthernet interface as an access interface
and specifies the VLAN ID (1 to 4094) in the running
configuration.
switch(config-if)# switchport access
vlan vlanid
Step 4
Configures the vEthernet interface for a PVLAN host in
the running configuration.
switch(config-if)# switchport mode
private-vlan host
Step 5
Configures the vEthernet interface for a host association
with a specific primary VLAN ID (from 1 to 4094) in the
running configuration.
switch(config-if)# switchport
private-vlan host-association
primary-vlanid
Step 6
(Optional)
Displays the interface status and information.
switch(config-if)# show interface
Step 7
(Optional)
Saves the change persistently through reboots and restarts
by copying the running configuration to the startup
configuration.
switch(config-if)# copy
running-config startup-config
Step 8
Cisco Nexus 1000V for VMware vSphere Interface Configuration Guide, Release 5.x
39
Configuring Virtual Ethernet Interfaces
Configuring a Private VLAN on a vEthernet Interface