Set Up an Association Relation Between a Primary VLAN and Secondary VLANs
After an association relation is set up, the hosts in a primary VLAN can communicate at layer 2 with the host in the associated secondary VLANs. The hosts in the secondary VLANs can communicate with external devices at layer 3 through the VLAN interface shared by the primary VLAN. A primary VLAN can be associated with a maximum of one isolated VLAN and 192 community VLANs. One secondary VLAN can be associated only with one primary VLAN.
Configuration Condition
Before setting up an association relation between a primary VLAN and secondary VLANs, ensure that:
- The VLAN in the current VLAN configuration mode is of the primary VLAN type.
Set Up an Association Relation Between a Primary VLAN and Secondary VLANs
Table 6-6 Setting Up an Association Relation Between a Primary VLAN and Secondary VLANs
Step
|
Command
|
Description
|
Enter the global configuration mode.
|
configure terminal
|
-
|
Enter the VLAN configuration mode.
|
vlan vlan-id
|
-
|
Set up an association relation between the primary VLAN and secondary VLANs.
|
private-vlan association add vlan-list
|
Mandatory.
By default, a primary VLAN is not associated with any secondary VLAN.
|
-
If a primary VLAN is associated with a common VLAN, the association is invalid. To make the association take effect, modify the VLAN type to secondary VLAN.
- If a secondary VLAN is associated with a primary VLAN, the MAC address entries that are dynamically learned by the secondary VLAN are recorded in the FDB table as primary VLANs instead of secondary VLANs that are associated with the secondary VLAN.