Configuring A Layer 2 Interface As A Private-Vlan Host Port - Cisco WS-C3750-48PS-S Software Configuration Manual

Network switch
Table of Contents

Advertisement

Chapter 15
Configuring Private VLANs
When you associate secondary VLANs with a primary VLAN, note this syntax information:
This example shows how to configure VLAN 20 as a primary VLAN, VLAN 501 as an isolated VLAN,
and VLANs 502 and 503 as community VLANs, to associate them in a private VLAN, and to verify the
configuration:
Switch# configure terminal
Switch(config)# vlan 20
Switch(config-vlan)# private-vlan primary
Switch(config-vlan)# exit
Switch(config)# vlan 501
Switch(config-vlan)# private-vlan isolated
Switch(config-vlan)# exit
Switch(config)# vlan 502
Switch(config-vlan)# private-vlan community
Switch(config-vlan)# exit
Switch(config)# vlan 503
Switch(config-vlan)# private-vlan community
Switch(config-vlan)# exit
Switch(config)# vlan 20
Switch(config-vlan)# private-vlan association 501-503
Switch(config-vlan)# end
Switch(config)# show vlan private vlan
Primary Secondary Type
------- --------- ----------------- ------------------------------------------
20
20
20
20

Configuring a Layer 2 Interface as a Private-VLAN Host Port

Beginning in privileged EXEC mode, follow these steps to configure a Layer 2 interface as a
private-VLAN host port and to associate it with primary and secondary VLANs:
Isolated and community VLANs are both secondary VLANs.
Note
Command
Step 1
configure terminal
Step 2
interface interface-id
78-16180-02
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.
The secondary_vlan_list parameter can contain multiple community VLAN IDs but only one
isolated VLAN ID.
Enter a secondary_vlan_list, or use the add keyword with a secondary_vlan_list to associate
secondary VLANs with a primary VLAN.
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 configuration mode.
501
isolated
502
community
503
community
504
non-operational
Ports
Purpose
Enter global configuration mode.
Enter interface configuration mode for the Layer 2
interface to be configured.
Catalyst 3750 Switch Software Configuration Guide
Configuring Private VLANs
15-11

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Catalyst 3750

Table of Contents