Switchport Access Vlan - Cisco 300 Series Cli Manual

Stackable managed switches
Hide thumbs Also See for 300 Series:
Table of Contents

Advertisement

Virtual Local Area Network (VLAN) Commands
OL-32830-01 Command Line Interface Reference Guide
Command Mode
Interface (Ethernet, Port Channel) Configuration mode
User Guidelines
Trunk and general mode ports can be changed to access mode only if all VLANs
(except for an untagged PVID are first removed
If the port mode is changed to access and the access VLAN does not exist, then
the port does not belong to any VLAN.
Examples
Example 1 - The following example configures gi 1 1 as an access port (untagged
layer 2) VLAN port.
switchxxxxxx(config)#
switchxxxxxx(config-if)#
switchxxxxxx(config-if)#
Example 2 - The following example puts the port gi 1 2 into private-vlan host mode.
switchxxxxxx(config)#
switchxxxxxx(config-if)#

56.13 switchport access vlan

An interface in access mode can belong to only one VLAN. The switchport access
vlan Interface Configuration command reassigns an interface to a different VLAN
than it currently belongs to.
Use the no form of this command to restore the default configuration.
Syntax
switchport access vlan
no switchport access vlan
Parameters
vlan-id
—Specifies the VLAN ID to which the port is configured.
interface gi11
switchport mode access
switchport access vlan
interface gi12
switchport mode private-vlan host
vlan-id
2
56
1062

Advertisement

Table of Contents
loading

Table of Contents