port private-vlan promiscuous
Use port private-vlan promiscuous to configure a port as a promiscuous port of the specified VLAN and assign the port to the VLAN.
Use undo port private-vlan to restore the default.
Syntax
port private-vlan vlan-id promiscuous
undo port private-vlan
Default
A port is not a promiscuous port of any VLANs.
Views
Layer 2 Ethernet interface view
Layer 2 aggregate interface view
Predefined user roles
network-admin
mdc-admin
Parameters
vlan-id: Specifies a VLAN ID in the range of 1 to 4094. Though VLAN 1 is in the valid value range, it cannot be configured in the command.
Usage guidelines
If the specified VLAN is a primary VLAN that has been associated with secondary VLANs, the command assigns the port to the associated secondary VLANs. Also, the following events occur:
For an access port, the device performs the following operations:
Changes the port link type to hybrid.
Configures the primary VLAN as the PVID.
Assigns the port to the primary VLAN and its associated secondary VLANs as an untagged member.
For a trunk port, the device does not change the port link type or PVID.
For a hybrid port, the device does not change the port link type or PVID.
If the hybrid port has been a tagged or untagged member of the primary VLAN and part of its associated secondary VLANs, this member attribute remains in these VLANs. The device assigns the hybrid port to the rest of the associated secondary VLANs as an untagged member.
If the hybrid port does not allow any of the primary VLAN and its associated secondary VLANs, the command assigns the port to these VLANs as an untagged member.
If you execute this command on a promiscuous port multiple times, the most recent configuration takes effect.
The undo port private-vlan command does not change the VLAN attributes (allowed secondary VLANs, link type, and PVID) of the port. When you execute the undo port private-vlan command on a promiscuous port of a VLAN, the command removes the port from the VLAN.
You can configure the VLAN as a primary VLAN before or after you execute the port private-vlan promiscuous command.
This command is mutually exclusive with the port private-vlan trunk promiscuous and port private-vlan trunk secondary commands.
Examples
In this example, VLAN 2 is a primary VLAN, and it is associated with secondary VLAN 20.
# Display information about Ten-GigabitEthernet 1/0/1.
<Sysname> system-view [Sysname] interface ten-gigabitethernet 1/0/1 [Sysname-Ten-GigabitEthernet1/0/1] display this # interface Ten-GigabitEthernet1/0/1 port link-mode bridge # return
# Configure Ten-GigabitEthernet 1/0/1 as a promiscuous port of VLAN 2, and then verify the configuration.
[Sysname-Ten-GigabitEthernet1/0/1] port private-vlan 2 promiscuous [Sysname-Ten-GigabitEthernet1/0/1] display this # interface Ten-GigabitEthernet1/0/1 port link-mode bridge port link-type hybrid port private-vlan 2 promiscuous undo port hybrid vlan 1 port hybrid vlan 2 20 untagged port hybrid pvid vlan 2 # return
The output shows that:
Ten-GigabitEthernet 1/0/1 is a promiscuous port of VLAN 2.
Ten-GigabitEthernet 1/0/1 is an untagged member of primary VLAN 2 and secondary VLAN 20.
The port link type of Ten-GigabitEthernet 1/0/1 is hybrid and its PVID is VLAN 2.
# Execute the undo port private-vlan command on Ten-GigabitEthernet 1/0/1, and then verify the configuration.
[Sysname-Ten-GigabitEthernet1/0/1] undo port private-vlan [Sysname-Ten-GigabitEthernet1/0/1] display this # interface Ten-GigabitEthernet1/0/1 port link-mode bridge port link-type hybrid undo port hybrid vlan 1 port hybrid vlan 20 untagged port hybrid pvid vlan 2 # return
The output shows that:
Ten-GigabitEthernet 1/0/1 is removed from primary VLAN 2.
Ten-GigabitEthernet 1/0/1 is an untagged member of VLAN 20.
The link type and PVID of Ten-GigabitEthernet 1/0/1 do not change.
Related commands
port private-vlan host
port private-vlan trunk promiscuous
port private-vlan trunk secondary
private-vlan (VLAN view)
private-vlan primary