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 VLAN.
Views
Layer 2 Ethernet interface view, Layer 2 aggregate interface view
Predefined user roles
network-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 tasks:
Changes the port link type to hybrid.
Configures the primary VLAN as the PVID.
Assign 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, the system automatically executes the undo port private-vlan command and then the port private-vlan promiscuous command.
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 vlan-id promiscuous command.
The port private-vlan promiscuous 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 # return
# Configure Ten-GigabitEthernet 1/0/1 as a promiscuous port of primary 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-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.
The port link type of Ten-GigabitEthernet 1/0/1 is hybrid and its PVID is VLAN 2.
Ten-GigabitEthernet 1/0/1 is an untagged member of primary VLAN 2 and secondary VLAN 20.
# 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-type hybrid undo port hybrid vlan 1 port hybrid vlan 20 untagged port hybrid pvid vlan 2 # return
The output shows that:
The link type and PVID of Ten-GigabitEthernet 1/0/1 do not change.
Ten-GigabitEthernet 1/0/1 is an untagged member of VLAN 20.
Ten-GigabitEthernet 1/0/1 is removed from primary VLAN 2.
Related commands
port private-vlan host
port private-vlan trunk promiscuous
port private-vlan trunk secondary
private-vlan (VLAN view)
private-vlan primary