vlan access
Syntax
vlan access <VLAN-ID>
no vlan access [<VLAN-ID>]
Description
Creates an access interface and assigns an VLAN ID to it. Only one VLAN ID can be assigned to each access interface.
VLANs can only be assigned to a non-routed (layer 2) interface or LAG interface. By default, all interfaces are routed (layer 3) when created. Use the
no routing
command to disable routing on an interface and change the interface to a layer 2 interface.
The
no
form of this command removes an access VLAN from the interface in the current context and sets it to the default VLAN ID of 1.
Command context
config-if
Parameters
<VLAN-ID>
Specifies a single ID, or a series of IDs separated by commas (2, 3, 4), dashes (2-4), or both (2-4,6). Range: 1 to 4094.
Authority
Administrators or local user group members with execution rights for this command.
Examples
On the 6400 Switch Series, interface identification differs.
Configuring interface 1/1/2 as an access interface with VLAN ID set to 20:
switch(config)# interface 1/1/2 switch(config-if)# vlan access 20
Removing VLAN ID 20 from interface 1/1/2:
switch(config)# interface 1/1/2 switch(config-if)# no vlan access 20
or:
switch(config)# interface 1/1/2 switch(config-if)# no vlan access