switchport mode private-vlan host

To set the interface type to be a host port for a private VLAN, use the switchport mode private-vlan host command. To remove the configuration, use the no form of this command.

switchport mode private-vlan host

no switchport mode

Syntax Description

This command has no arguments or keywords.

Command Default

None

Command Modes

Interface configuration mode
Virtual Ethernet interface configuration mode

Command History

Release
Modification
4.0(0)N1(1a)
This command was introduced.
5.1(3)N1(1)
Support was added for virtual Ethernet interfaces.

Usage Guidelines

When you configure a port as a host private VLAN port and one of the following applies, the port becomes inactive:

If you delete a private VLAN port association or if you configure a private port as a SPAN destination, the deleted private VLAN port association or the private port that is configured as a SPAN destination becomes inactive.


Note We recommend that you enable spanning tree BPDU Guard on all private VLAN host ports.


Examples

This example shows how to set a port to host mode for private VLANs:

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

This example shows how to set a virtual Ethernet interface port to host mode for private VLANs:

switch# configure terminal
switch(config)# interface vethernet 1
switch(config-if)# switchport mode private-vlan host
switch(config-if)#
 

Related Commands

Command
Description
interface vethernet
Configures a virtual Ethernet interface.
show interface switchport
Displays information on all interfaces configured as switch ports.
show vlan private-vlan
Displays the status of the private VLAN.