Configuring Private VLANs
Isolated and community VLANs are both secondary VLANs.
Note
Beginning in privileged EXEC mode, follow these steps to map secondary VLANs to the SVI of a
primary VLAN to allow Layer 3 switching of private-VLAN traffic:
Command
Step 1
configure terminal
Step 2
interface vlan primary_vlan_id
Step 3
private-vlan mapping [add | remove]
secondary_vlan_list
Step 4
end
Step 5
show interface private-vlan mapping
Step 6
copy running-config startup config
The private-vlan mapping interface configuration command only affects private-VLAN traffic that is
Note
Layer 3 switched.
When you map secondary VLANs to the Layer 3 VLAN interface of a primary VLAN, note this syntax
information:
•
•
•
This example shows how to map the interfaces of VLANs 501and 502 to primary VLAN 10, which
permits routing of secondary VLAN ingress traffic from private VLANs 501 to 502:
Switch# configure terminal
Switch(config)# interface vlan 10
Switch(config-if)# private-vlan mapping 501-502
Switch(config-if)# end
Switch# show interfaces private-vlan mapping
Interface Secondary VLAN Type
--------- -------------- -----------------
vlan10
vlan10
Catalyst 3750-X and 3560-X Switch Software Configuration Guide
1-14
The secondary_vlan_list parameter cannot contain spaces. It can contain multiple comma-separated
items. Each item can be a single private-VLAN ID or a hyphenated range of private-VLAN IDs.
Enter a secondary_vlan_list, or use the add keyword with a secondary_vlan_list to map the
secondary VLANs to the primary VLAN.
Use the remove keyword with a secondary_vlan_list to clear the mapping between secondary
VLANs and the primary VLAN.
501
isolated
502
community
Chapter 1
Purpose
Enter global configuration mode.
Enter interface configuration mode for the primary
VLAN, and configure the VLAN as an SVI. The VLAN
ID range is 2 to 1001 and 1006 to 4094.
Map the secondary VLANs to the Layer 3 VLAN
interface of a primary VLAN to allow Layer 3 switching
of private-VLAN ingress traffic.
Return to privileged EXEC mode.
Verify the configuration.
(Optional) Save your entries in the switch startup
configuration file.
Configuring Private VLANs
OL-25303-03