Switchport Access Vlan - Cisco 300 Series Cli Manual

Small business 300 series managed switches command line interface guide release 1.3
Hide thumbs Also See for 300 Series:
Table of Contents

Advertisement

32
Virtual Local Area Network (VLAN) Commands
switchxxxxxx(config-if)#

switchport access vlan

2
32.12 switchport access vlan
An interface in access mode can belong to only one VLAN. Use the switchport
access vlan Interface Configuration command to reassign an interface to a
different VLAN than it currently belongs to.
Use the no form of this command to restore the default configuration.
Syntax
vlan-id
switchport access vlan
no switchport access vlan
Parameters
vlan-id
vlan
—Specifies the VLAN ID to which the port is configured.
Default Configuration
The interface belongs to the default VLAN.
Command Mode
Interface Configuration (Ethernet, port-channel) mode
User Guidelines
The command automatically removes the port from its previous VLAN and adds it
to the specified VLAN.
If the interface is a forbidden member of the specified VLAN, it does not become a
member of the VLAN. An error message is displayed ("An interface cannot
become a member of a forbidden VLAN. This message will only be displayed
once.") and the command continues to execute if there are more interfaces in the
interface list.
Examples
Example 1—The following example sets 152 as an access port and assigns it to
VLAN 2 (and removes it from its previous VLAN).
switchxxxxxx(config)#
interface 152
498
78-21075-01 Command Line Interface Reference Guide

Advertisement

Table of Contents
loading

Table of Contents