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

Predefined user roles

network-admin

Usage guidelines

This command and the undo private-vlan isolated command have the same function.

When you use the save command to save the configuration, the private-vlan community command is not saved into the configuration file.

Examples

This example shows how to meet the following requirements:

# Configure VLAN 2 as a primary VLAN and associate it with secondary VLAN 4.

<Sysname> system-view
[Sysname] vlan 4
[Sysname-vlan4] quit
[Sysname] vlan 2
[Sysname-vlan2] private-vlan primary
[Sysname-vlan2] private-vlan secondary 4
[Sysname-vlan2] quit

# Configure as a promiscuous port of VLAN 2.

[Sysname] interface 
[Sysname-] port private-vlan 2 promiscuous
[Sysname-] quit

# Assign to VLAN 4 and configure the port as a host port.

[Sysname] interface 
[Sysname-] port access vlan 4
[Sysname-] port private-vlan host
[Sysname-] quit

# Assign to VLAN 4 and configure the port as a host port.

[Sysname] interface 
[Sysname-] port access vlan 4
[Sysname-] port private-vlan host
[Sysname-] quit

# Enable Layer 2 communication in secondary VLAN 4.

[Sysname] vlan 4
[Sysname-vlan4] private-vlan community

Related commands

private-vlan isolated