34-7
Software Configuration Guide—Release 12.2(25)SG
OL-76590-03
Chapter34 Configuring Private VLANs
How to Configure PVLANs
Use the remove keyword with a secondary_vlan_list to clear the association between secondary
VLANs and a primary VLAN.
The command does not take effect until you exit VLAN co nfiguration submode.
This example shows how to associate community VLANs 303 through 307 and 309 and isolated VLAN
440 with primary VLAN 202 and verify the configuration:
Switch# configure terminal
Switch(config)# vlan 202
Switch(config-vlan)# private-vlan association 303-307,309,440
Switch(config-vlan)# end
Switch# show vlan private-vlan
Primary Secondary Type Interfaces
------- --------- ----------------- ------------------------------------------
202 303 community
202 304 community
202 305 community
202 306 community
202 307 community
202 309 community
202 440 isolated
308 community
Note The secondary VLAN 308 has no associated primary VLAN.
Configuring a Layer 2 Interface as a PVLAN Promiscuous Port
To configure a Layer 2 interface as a PVLAN promiscuous port, perform this task:
When you configure a Layer 2 interface as a PVLAN promiscuous port, note the following:
The secondary_vlan_list parameter cannot contain spaces. It can contain multiple comma-separated
items. Each item can be a single PVLAN ID or a hyphenated range of PVLAN IDs.
Enter a secondary_vlan_list or use the add keyword with a secondary_vlan_list to map the
secondary VLANs to the PVLAN promiscuous port.
Command Purpose
Step1 Switch# configure terminal Enters global configuration mode.
Step2 Switch(config)# interface {fastethernet |
gigabitethernet | tengigabitethernet}
slot
/
port
Specifies the LAN interface to configure.
Step3 Switch(config-if)# switchport mode private-vlan
{host | promiscuous | trunk}
Configures a Layer 2 interface as a PVLAN promiscuous
port.
Step4 Switch(config-if)# [no] switchport private-vlan
mapping
primary_vlan_ID
{
secondary_vlan_list
|
add
secondary_vlan_list
| remove
secondary_vlan_list
}
Maps the PVLAN promiscuous port to a primary VLAN
and to selected secondary VLANs.
You can use the no keyword to delete all associations
from the primary VLAN.
Step5 Switch(config-if)# end Exits configuration mode.
Step6 Switch# show interfaces {fastethernet |
gigabitethernet | tengigabitethernet}
slot
/
port
switchport
Verifies the configuration.