switchport access




switchport access vlan {vlan-id | dynamic}

no switchport access

Syntax Description:

access vlan vlan-id

Configure the interface as a static-access port; valid values are from 1 to 1005.

access vlan dynamic

Specify that the access mode VLAN is dependent on the VLAN Membership Policy Server (VMPS) protocol. The port is assigned to a VLAN based on the source MAC address of a host (or hosts) connected to the port. The switch sends every new MAC address received to the VMPS server to obtain the VLAN name to which the dynamic-access port should be assigned. If the port already has a VLAN assigned and the source has already been approved by the VMPS, the switch forwards the packet to the VLAN.


Command Description:

Use the switchport access interface configuration command to configure a port as a static-access or dynamic-access port. If the mode is set to access, the port operates as a member of the configured VLAN. If set to dynamic, the port starts discovery of its VLAN assignment based on the incoming packets it receives. Use the no form of this command to reset the access mode to the default VLAN for the switch.

The no switchport access command resets the access mode VLAN to the appropriate default VLAN for the device.

The port must be in access mode before the switchport access vlan command can take effect. For more information, see the switchport mode command.

An access port can be assigned to only one VLAN.

The VMPS server (such as a Catalyst 6000 series switch) must be configured before a port is configured as dynamic.

These restrictions apply to dynamic-access ports:


This example shows how to assign a port already in access mode to VLAN 2 (instead of the default VLAN 1):

Switch(config-if)#switchport access vlan 2 

You can verify your settings by entering the show interfaces interface-idswitchport privileged EXEC command and examining information in the Administrative Mode and Operational Mode rows.


Related commands:
switchport mode
show interface

� Cisco Systems, Inc. 2001, 2002, 2003
World Wide Education

Converted from CHM to HTML with chm2web Pro 2.85 (unicode)