Private VLAN commands
Use these M4500 CLI commands to configure private VLANs and private VLAN port modes to isolate ports that share a VLAN.
This section describes the commands you use for private VLANs. Private VLANs provides Layer 2 isolation between ports that share the same broadcast domain. In other words, it allows a VLAN broadcast domain to be partitioned into smaller point-to-multipoint subdomains. The ports participating in a private VLAN can be located anywhere in the Layer 2 network.
switchport private-vlan
This command defines a private-VLAN association for an isolated or community port or a mapping for a promiscuous port.
| Format | switchport private-vlan {host-association <primary-vlan-id> <secondary-vlan-id> | mapping <primary-vlan-id> [add | remove] <secondary-vlan-list>} |
| Mode | Interface Config |
| Parameter | Definition |
|---|---|
| host-association | Defines the VLAN association for community or host ports. |
| mapping | Defines the private VLAN mapping for promiscuous ports. |
| primary-vlan-id | Primary VLAN ID of a private VLAN. |
| secondary-vlanid | Secondary (isolated or community) VLAN ID of a private VLAN. |
| add | Associates the secondary VLAN with the primary one. |
| remove | Deletes the secondary VLANs from the primary VLAN association. |
| secondary-vlanlist | A list of secondary VLANs to be mapped to a primary VLAN. |
no switchport private-vlan
This command removes the private-VLAN association or mapping from the port.
| Format | no switchport private-vlan {host-association|mapping} |
| Mode | Interface Config |
switchport mode private-vlan
This command configures a port as a promiscuous or host private VLAN port. Note that the properties of each mode can be configured even when the switch is not in that mode. However, they will only be applicable once the switch is in that particular mode.
| Default | general |
| Format | switchport mode private-vlan {host|promiscuous} |
| Mode | Interface Config |
| Parameter | Definition |
|---|---|
| host | Configures an interface as a private VLAN host port. It can be either isolated or community port depending on the secondary VLAN it is associated with. |
| promiscuous | Configures an interface as a private VLAN promiscuous port. The promiscuous ports are members of the primary VLAN. |
no switchport mode private-vlan
This command removes the private-VLAN association or mapping from the port.
| Format | no switchport mode private-vlan |
| Mode | Interface Config |
private-vlan
This command configures the private VLANs and configures the association between the primary private VLAN and secondary VLANs.
| Format | private-vlan {association [add|remove] <secondary-vlanlist> | community | isolated | primary} |
| Mode | VLAN Config |
| Parameter | Definition |
|---|---|
| association | Associates the primary and secondary VLAN. |
| secondary-vlan-list | A list of secondary VLANs to be mapped to a primary VLAN. |
| community | Designates a VLAN as a community VLAN. |
| isolated | Designates a VLAN as the isolated VLAN. |
| primary | Designates a VLAN as the primary VLAN. |
no private-vlan
This command restores normal VLAN configuration.
| Format | no private-vlan [association] |
| Mode | VLAN Config |