11.21. Private Vlan Commands

11.21.1. switchport mode private-vlan

Command Purpose

To configure the switch port’s mode as private vlan, use the “switchport mode private-vlan” command in interface mode.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

switchport mode private-vlan ( host | promiscuous )

Parameter

Parameter Description

Parameter Value

host

Set the port as private vlan, host port

-

promiscuous

Set the port as private vlan, promiscuous port

-

Command Mode

Interface Configuration

Default

By default the switch port’s mode is access vlan.

Usage

To configure the switch port’s mode as private vlan, use the “switchport mode private-vlan” command in interface mode.

This can only be configured on a switchport.

Examples

The following example shows how to configure the switch port mode:

Switch# configure terminal
Switch(config)# interface eth-0-1
Switch(config-if)# switchport mode private-vlan host
Switch(config-if)# switchport mode private-vlan promiscuous

11.21.2. switchport private-vlan

Command Purpose

To configure the primary and secondary vlan of a private vlan, use the “switchport private-vlan” command in interface mode.

Use the “no” form of this command to restore the default value.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

switchport private-vlan VLAN_ID ( isolate | community-vlan VLAN_ID | )

Parameter

Parameter Description

Parameter Value

private-vlan VLAN_ID

Set private primary vlan

1-4094

isolate

Set as isolate mode

-

community-vlan VLAN_ID

Set communtiy vlan

1-4094

Command Mode

Interface Configuration

Default

By default, the primary vlan is 1.

If the switchport mode is private-vlan host, the default mode is isolate; Or else the switchport mode is promiscuous

Usage

To configure the primary and secondary vlan of a private vlan, use the “switchport private-vlan” command in interface mode.

This can only be configured on a switchport.

Examples

The following example shows how to configure the private vlan:

Switch# configure terminal
Switch(config)# interface eth-0-1
Switch(config-if)# switchport mode private-vlan host
Switch(config-if)# switchport private-vlan 1 isolate
Switch(config-if)# quit
Switch(config)# interface eth-0-2
Switch(config-if)# switchport mode private-vlan host
Switch(config-if)# switchport private-vlan 1 community-vlan 2
Switch(config-if)# quit
Switch(config)# interface eth-0-3
Switch(config-if)# switchport mode private-vlan promiscuous
Switch(config-if)# switchport private-vlan 1

Related Commands

switchport mode private-vlan

11.21.3. show private-vlan

Command Purpose

To display the private-vlan configure, use the show private-vlan command in privileged Privileged EXEC.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

show private-vlan ( vlan VLAN_ID | interface IFNAME | )

Parameter

Parameter Description

Parameter Value

VLAN_ID

Show by primary vlan

1-4094

IFNAME

Show by interface

Support physical/aggregationports

Command Mode

Privileged EXEC

Default

N/A

Usage

None

Examples

The following example shows the result of this command:

Switch# show private-vlan

Primary   Secondary Type           Ports     
------------------------------------------------------------------------------
1         N/A       promiscuous    eth-0-3   
1         N/A       isloate        eth-0-1   
1         2         community      eth-0-2
Switch# show private-vlan vlan 1
Primary   Secondary Type           Ports     
------------------------------------------------------------------------------
1         N/A       promiscuous    eth-0-3   
1         N/A       isloate        eth-0-1   
1         2         community      eth-0-2
Switch# show private-vlan interface eth-0-1
------------------------------------------------------------------------------
 Private vlan mode: isolate
 Primary vlan id  : 1

Related Commands

switchport mode private-vlan

switchport private-vlan