Command
Switchport Access Vlan
Use
Sets the VLAN that the interface belongs to.
Syntax
Switch(config-if)#switchport access vlan <vlan # >
Example
In this example, port fa0/2 on SW3 is set to VLAN 10. Here is the VLAN information on SW3 before the changes. Notice that all interfaces belong
to VLAN 1.
SW3#show vlan brief VLAN Name Status Ports |
Next, int fa0/2 is configured for VLAN 10.
SW3#conf t |
Finally, the VLAN information for SW3 is displayed with fa0/2 assigned to VLAN 10.
SW3(config-if)#do show vlan brief VLAN Name Status Ports |