34-8
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 mapping between secondary
VLANs and the PVLAN promiscuous port.
This example shows how to configure interface FastEthernet 5/2 as a PVLAN promiscuous port, map it
to a PVLAN, and verify the configuration:
Switch# configure terminal
Switch(config)# interface fastethernet 5/2
Switch(config-if)# switchport mode private-vlan promiscuous
Switch(config-if)# switchport private-vlan mapping 200 2
Switch(config-if)# end
Switch#show interfaces fastethernet 5/2 switchport
Name:Fa5/2
Switchport:Enabled
Administrative Mode:private-vlan promiscuous
Operational Mode:private-vlan promiscuous
Administrative Trunking Encapsulation:negotiate
Operational Trunking Encapsulation:native
Negotiation of Trunking:Off
Access Mode VLAN:1 (default)
Trunking Native Mode VLAN:1 (default)
Voice VLAN:none
Administrative Private VLAN Host Association:none
Administrative Private VLAN Promiscuous Mapping:200 (VLAN0200) 2 (VLAN0002)
Private VLAN Trunk Native VLAN:none
Administrative Private VLAN Trunk Encapsulation:dot1q
Administrative Private VLAN Trunk Normal VLANs:none
Administrative Private VLAN Trunk Private VLANs:none
Operational Private VLANs:
200 (VLAN0200) 2 (VLAN0002)
Trunking VLANs Enabled:ALL
Pruning VLANs Enabled:2-1001
Capture Mode Disabled
Capture VLANs Allowed:ALL
Configuring a Layer 2 Interface as a PVLAN Host Port
To configure a Layer 2 interface as a PVLAN host port, perform this task:
Command Purpose
Step1 Switch# configure terminal Enters configuration mode.
Step2 Switch(config)# interface {fastethernet |
gigabitethernet | tengigabitethernet}
slot
/
port
Specifies the LAN port to configure.
Step3 Switch(config-if)# switchport mode private-vlan
{host | promiscuous} | trunk
Configures a Layer 2 interface as a PVLAN host port.
Step4 Switch(config-if)# [no] switchport private-vlan
host-association
primary_vlan_ID
secondary_vlan_ID
Associates the Layer 2 interface with a PVLAN.
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.