port private-vlan host

Use port private-vlan host to configure a port as a host port.

Use undo port private-vlan to restore the default.

Syntax

port private-vlan host

undo port private-vlan

Default

A port is not a host port.

Views

Layer 2 Ethernet interface view

Layer 2 aggregate interface view

Predefined user roles

network-admin

Usage guidelines

If the port has been assigned to a secondary VLAN, the command assigns the port to the primary VLAN associated with the secondary VLAN. Also, the following events occur:

You can assign the port to a secondary VLAN before or after you execute this command.

The undo port private-vlan command does not change the VLAN attributes (allowed VLANs, port link type, and PVID) of the port.

The port private-vlan host command is mutually exclusive with the port private-vlan trunk promiscuous and port private-vlan trunk secondary commands.

Examples

In this example, VLAN 20 is a secondary VLAN and is associated with primary VLAN 2.

# Configure as a host port, and then verify the configuration.

<Sysname> system-view
[Sysname] interface 
[Sysname-] port private-vlan host
[Sysname-] display this
#
interface 
 port private-vlan host
#
return

The output show that is operating in bridge mode and is a host port.

# Assign to VLAN 20, and then verify the configuration.

[Sysname-] port access vlan 20
[Sysname-] display this
#
interface 
 port private-vlan host
 port link-type hybrid
 undo port hybrid vlan 1
 port hybrid vlan 2 20 untagged
 port hybrid pvid vlan 20
#
return

The output shows that:

Related commands

port private-vlan promiscuous

port private-vlan trunk promiscuous

port private-vlan trunk secondary

private-vlan (VLAN view)

private-vlan primary