Cisco Switch - How to Add a Port to a VLAN

Below was added onto a 2950 (version 12.1(22)) and shows you how to add a port to a VLAN.

In this case we will add interface fa0/1 to vlan 9.

switch(config)# interface fa0/1
switch(config-if)# switchport access vlan 9
switch(config-if)# switchport mode access

 To check you settings run the following,

switch# show run
Building configuration...

Current configuration : 3598 bytes
version 12.1
!interface FastEthernet0/1
description -= VLAN 9 =-
 switchport access vlan 9
 switchport mode access
 spanning-tree portfast

Or run the following to check which ports are within each VLAN,

switch# sh vlan br

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Fa0/1, Fa0/2, Fa0/6
9    VLAN0009                         active    Fa0/9, Fa0/10, Fa0/11, Fa0/12
                                                Fa0/19, Fa0/21, Fa0/22
1002 fddi-default                     act/unsup
1003 token-ring-default               act/unsup
1004 fddinet-default                  act/unsup
1005 trnet-default                    act/unsup

About the Author


R Donato

Rick Donato is the Founder and Chief Editor of He currently works as an SDN/NFV Solutions Architect and has a keen interest in automation and the cloud.

You can find Rick on Twitter @f3lix001