set port vlan

Use this command to configure the PVID (port VLAN identifier) for one or more ports.

Syntax

set port vlan port-string pvid [modify-egress | no-modify-egress]

Parameters

port-string Specifies the port(s) for which to configure a VLAN identifier. For a detailed description of possible port-string values, refer to the S-, K-, and 7100 Series Configuration Guide.
pvid Specifies the VLAN ID of the VLAN to which port(s) will be added.
modify-egress | no-modify-egress (Optional) Adds port(s) to VLAN's untagged egress list and removes them from other untagged egress lists, or does not prompt for or make egress list changes

Defaults

If not specified, the egress list will be modified.

Mode

All command modes.

Usage

For information on how to configure protocol-based policy classification to a VLAN, including how to configure a VLAN policy to override PVID, refer to the S-, K-, and 7100 Series Configuration Guide.

The PVID is used to classify untagged frames as they ingress into a given port. It will prompt the user to add the VLAN to the port‘s egress list as untagged, and remove the default VLAN from the port‘s egress list. If the user chooses to modify the egress of the VLAN, and the specified VLAN has not already been created, this command will create it.

Example

This example shows how to add ge.1.10 to the port VLAN list of VLAN 4 (PVID 4). Since VLAN 4 is a new VLAN, it is created. Then port ge.1.10 is added to VLAN 4‘s untagged egress list, and is cleared from the egress list of VLAN 1 (the default VLAN):

System(rw)->set vlan 4 create
System(rw)->set port vlan ge.1.10 4 modify-egress
System(rw)->

If modify-egress is not used, the following command allows for manually adding ge.1.10 to the VLAN 4 untagged egress list and remove ge.1.10 from the VLAN 1 untagged egress list:

System(rw)->set vlan egress 4 ge.1.10 untagged
System(rw)->clear vlan egress 1 ge.1.10