console(config-if-1/g8)#switchport trunk allowed vlan add 1,2,5-8
vlan
Use the vlan command in VLAN Database mode to configure a VLAN. To delete a VLAN, use
the no form of this command.
Syntax
vlan-range
vlan
no vlan
vlan-range
vlan-range — A list of valid VLAN IDs to be added. List separate, non-consecutive VLAN IDs
•
separated by commas (without spaces); use a hyphen to designate a range of IDs. (Range:
2–4093)
Default Configuration
This command has no default configuration.
Command Mode
VLAN Database mode
User Guidelines
This command has no user guidelines.
Example
The following example shows how to create (add) VLAN of IDs 22, 23, and 56.
console(config-vlan)#vlan 22,23,56
console(config-vlan)#
vlan association mac
Use the vlan association mac command in VLAN Database mode to associate a MAC address to
a VLAN.
Syntax
mac-address vlanid
vlan association mac
no vlan association mac
mac-address
— MAC address to associate. (Range: Any MAC address in the format
xxxx.xxxx.xxxx)
mac-address
521