3.4.8. switchport access vlan

Syntax

switchport access vlan <1-4094>

No switchport access vlan

Parameter


<1-4094> Specifies the access VLAN ID.


Default

Default is vlan 1

Mode

Port Configuration

Usage

Use the switchport access vlan port configuration command to set native vlan on interface. The vlan will be pvid on interface as well. Use the no form of this command to restore to default vlan You can verify your setting by entering the show interfaces switchport command.

Example

This example sets Access port gi10 native VLAN ID to 100.

Switch(config)# interface gi10
Switch(config-if)# switchport mode access
Switch(config-if)# switchport access vlan 100
Switch# show interfaces switchport gi10
Port : gi10
Port Mode : Access 
Ingress Filtering : enabled
Acceptable Frame Type : untagged-only
Ingress UnTagged VLAN ( NATIVE ) : 100
Trunking VLANs Enabled:
Port is member in:
Vlan Name Egress rule
------- ----------------------- -----------------
100 VLAN-one-hundred Untagged
Forbidden VLANs:
Vlan Name
------- -----------------------