PurposeCommand or Action
Entersinterface configuration mode for the Layer
2interface to beconfigured.
interfaceinterface-id
Example:
Switch(config)# interface gigabitethernet1/0/22
Step 2
Configuresthe Layer 2 portas aprivate-VLAN
hostport.
switchportmode private-vlan host
Example:
Switch(config-if)# switchport mode private-vlan host
Step 3
Associatesthe Layer 2 port with a private VLAN.
switchportprivate-vlan host-association primary_vlan_id
secondary_vlan_id
Step 4
Example:
Switch(config-if)# switchport private-vlan
host-association 20 501
Returnsto privileged EXEC mode.end
Example:
Switch(config-if)# end
Step 5
Verifiesthe configuration.
showinterfaces [interface-id]switchport
Example:
Switch# show interfaces gigabitethernet1/0/22
Step 6
switchport
Savesyour entriesin the switch startup
configurationfile.
copyrunning-config startup config
Example:
Switch# copy running-config startup-config
Step 7
Related Topics
PrivateVLANs Ports, on page88
Example:Configuring an Interface as a Host Port, on page 102
Catalyst 2960-XR Switch VLAN Configuration Guide, Cisco IOS Release 15.0(2)EX1
OL-29440-01 97
Configuring Private VLANs
Configuring a Layer 2 Interface as a Private VLAN Host Port