Cisco Nexus 5000 Series Switch CLI Software Configuration Guide (OL-16597-01, July 2009)

PurposeCommand or Action
Enters the number of the primary VLAN that you
are working in for the private VLAN
configuration.
switch(config)# vlan primary-vlan-id
Step 2
Associates the secondary VLANs with the
primary VLAN.
switch(config-vlan)# private-vlan
association {[add] secondary-vlan-list |
remove secondary-vlan-list}
Step 3
(Optional)
Removes all associations from the primary VLAN
and returns it to normal VLAN mode.
switch(config-vlan)# no private-vlan
association
Step 4
This example shows how to associate community VLANs 100 through 110 and isolated VLAN 200 with
primary VLAN 5:
switch# configure terminal
switch(config)# vlan 5
switch(config-vlan)# private-vlan association 100-110, 200
Configuring an Interface as a Private VLAN Host Port
In private VLANs, host ports are part of the secondary VLANs, which are either community VLANs or
isolated VLANs. Configuring a private VLAN host port involves two steps. First, you define the port as a
private VLAN host port and then you configure a host association between the primary and secondary VLANs.
We recommend that you enable BPDU Guard on all interfaces configured as a host ports.Note
Before You Begin
Ensure that the private VLAN feature is enabled.
Procedure
PurposeCommand or Action
Enters configuration mode.switch# configure terminal
Step 1
Selects the port to configure as a private VLAN
host port. This port can be on a Fabric Extender
(identified by the chassis option).
switch(config)# interface type
[chassis/]slot/port
Step 2
Configures the port as a host port for a private
VLAN.
switch(config-if)# switchport mode
private-vlan host
Step 3
Associates the port with the primary and secondary
VLANs of a private VLAN. The secondary VLAN
can be either an isolated or community VLAN.
switch(config-if)# switchport private-vlan
host-association {primary-vlan-id}
{secondary-vlan-id}
Step 4
Cisco Nexus 5000 Series Switch CLI Software Configuration Guide
OL-16597-01 95
Configuring a Private VLAN
Configuring an Interface as a Private VLAN Host Port