Add Ports into Secondary VLANs
Only the ports whose link type is Host can be added to secondary VLANs. Secondary VLANs are categorized into two types: community VLANs and isolated VLANs. The ports that are added into a community VLAN can only communicate at layer 2 with the other member ports of the community VLAN and the member ports of the associated primary VLAN. The ports that are added into an isolated VLAN can only communicate at layer 2 with the member ports of the associated primary VLAN. Host ports are usually used as downstream ports.
Configuration Condition
Before adding ports into a secondary VLAN, ensure that:
- The VLAN into which the ports are added is of the secondary VLAN type.
Add Ports into Secondary VLANs
Table 6-5 Adding Ports into Secondary VLANs
Step
|
Command
|
Description
|
Enter the global configuration mode. |
configure terminal |
- |
Enters the interface config mode.
|
interface interface-name
|
Either
After you enter the interface configuration mode, the subsequent configuration takes effect only on the current port. After entering the aggregation group configuration mode, the subsequent configuration takes effect only on the aggregation group.
|
Enter the aggregation group configuration mode.
|
link-aggregation link- aggregation-id
|
Configure the port link type to the Host type.
|
switchport mode private- vlan host
|
Mandatory.
By default, the port link type is the Access type.
|
Add Host ports into the secondary VLANs.
|
private-vlan host vlan-id
|
Mandatory.
By default, a host port is not added into any VLAN.
|
![note](/storage/images/Document/Maipu/note-icon.jpg)
-
The hosts in a secondary VLAN cannot communicate with the VLAN interface of the device at layer 3.
- If you configure a port link type to Host but do not add the port into a secondary VLAN, the PVLAN function of the port does not take effect. In addition, the port of the Host type is dedicated for PVLAN, and the other functions that are configured on the Host port are invalid. Therefore, it is recommended that you follow the previous steps to complete the configuration.