vlan access
Syntax
vlan access< vlan id >没有vlan access [< vlan id >]
描述
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没有routingcommand to disable routing on an interface and change the interface to a layer 2 interface.
The没有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 to4094.
Authority
Administrators or local user group members with execution rights for this command.
Examples
On the 6400 Switch Series, interface identification differs.
Configuring interface1/1/2as an access interface with VLAN ID set to20:
switch(config)#interface 1/1/2switch(config-if)#vlan access 20
Removing VLAN ID20从接口1/1/2:
switch(config)#interface 1/1/2switch(config-if)#没有vlan access 20
or:
switch(config)#interface 1/1/2switch(config-if)#没有vlan access