Enabling port-based VLANs
When using the CLI, port and protocol-based VLANs are created by entering one of the following commands at the global CONFIG level of the CLI.
To create a port-based VLAN, enter commands such as the following.
device(config)#vlan 222 by port device(config)#vlan 222 name Mktg
Syntax: vlan num by port
Syntax: vlan num name string
The num parameter specifies the VLAN ID. The valid range for VLAN IDs starts at 1 on all systems but the upper limit of the range differs depending on the device. In addition, you can change the upper limit on some devices using the system max-vlans... command.
The string parameter is the VLAN name and can be a string up to 32 characters. You can use blank spaces in the name if you enclose the name in double quotes (for example, "Product Marketing".)
Depending on device support, you can configure up to 4000 port-based VLANs. Each port-based VLAN can contain either tagged or untagged ports. A port cannot be a member of more than one port-based VLAN unless the port is tagged. On both device types, valid VLAN IDs are 1 - 4095. You can configure up to the maximum number of VLANs within that ID range.