222
Parameters
secondary vlan-id-list: Specifies a space-separated list of up to 10 secondary VLAN items.
Each item specifies a secondary VLAN ID or a range of secondary VLAN IDs in the form of vlan-id1
to vlan-id2. The value range for secondary VLAN IDs is 1 to 4094. The value for the
vlan-id2
argument must be equal to or greater than the value for the
vlan-id1 argument. Though the
system default VLAN (VLAN 1) is in the valid value range, it cannot be configured in the command.
Usage guidelines
A primary VLAN can be associated with multiple secondary VLANs. When you execute this
command in the same VLAN view multiple times, all the specified secondary VLANs are associated
with the primary VLAN.
The configuration synchronization is triggered based on the interface configuration when the
following conditions exist:
• This command is configured for a primary VLAN.
• Ports on the device are promiscuous, trunk promiscuous, or host ports.
When you execute the
undo private-vlan command, follow these guidelines:
• If you specify the
secondary vlan-id-list option, this command dissociates the primary
VLAN from the specified secondary VLANs.
• If you do not specify the
secondary vlan-id-list option, this command dissociates the
primary VLAN from all secondary VLANs.
Examples
# Associate primary VLAN 2 with secondary VLANs 3 and 4.
<Sysname> system-view
[Sysname] vlan 3 to 4
[Sysname] vlan 2
[Sysname-vlan2] private-vlan primary
[Sysname-vlan2] private-vlan secondary 3 to 4
Related commands
port private-vlan host
port private-vlan promiscuous
port private-vlan trunk promiscuous
port private-vlan trunk secondary
primary-vlan primary
private-vlan community
Use private-vlan community to enable Layer 2 communication between ports in a secondary
VLAN.
Syntax
private-vlan community
Default
Ports in the same secondary VLAN can communicate with each other at Layer 2.
Views
VLAN view