Virtual Local Area Network (VLAN) Commands
1063
OL-32830-01 Command Line Interface Reference Guide
56
Default Configuration
The interface belongs to the default VLAN.
Command Mode
Interface (Ethernet, Port Channel) Configuration mode
User Guidelines
The command automatically removes the port from its previous VLAN and adds it
to the new VLAN.
If the interface is a forbidden member of the added VLAN, the interface does not
become a member of this VLAN. The system displays an error message about this
("An interface cannot become a a member of a forbidden VLAN. This message will
only be displayed once.").
Example
The following example sets
gi1
1 as an access port and assigns it to VLAN 2 (and
removes it from its previous VLAN).
switchxxxxxx(config)#
interface
gi12
switchxxxxxx(config-if)#
switchport mode access
switchxxxxxx(config-if)#
switchport access vlan
2
56.14 switchport trunk allowed vlan
A trunk interface is an untagged member of a single VLAN, and, in addition, it may
be an tagged member of one or more VLANs. The switchport trunk allowed vlan
Interface Configuration mode command adds/removes VLAN(s) to/from a trunk
port.
Syntax
switchport trunk allowed vlan {add
vlan-list
| remove
vlan-list
}
Parameters
•
add
vlan-list
—Specifies a list of VLAN IDs to add to a port. Separate
nonconsecutive VLAN IDs with a comma and no spaces; use a hyphen to
designate a range of IDs.
Summary of Contents for 300 Series
Page 2: ......