user manual

PurposeCommand or Action
Enters interface configuration mode for the Layer
2 interface to be configured.
interface interface-id
Example:
Switch(config)# interface gigabitethernet1/0/22
Step 2
Configures the Layer 2 port as a private-VLAN
host port.
switchport mode private-vlan host
Example:
Switch(config-if)# switchport mode private-vlan host
Step 3
Associates the Layer 2 port with a private VLAN.
switchport private-vlan host-association primary_vlan_id
secondary_vlan_id
Step 4
Example:
Switch(config-if)# switchport private-vlan
host-association 20 501
Returns to privileged EXEC mode.end
Example:
Switch(config-if)# end
Step 5
Verifies the configuration.
show interfaces [interface-id] switchport
Example:
Switch# show interfaces gigabitethernet1/0/22
Step 6
switchport
Saves your entries in the switch startup
configuration file.
copy running-config startup config
Example:
Switch# copy running-config startup-config
Step 7
Related Topics
Private VLANs Ports, on page 88
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