How to configure and assign a Cisco switch access port to a VLAN
Access ports in switches are normally used to connect end devices like workstations and printers. Access ports belong to only a single VLAN and do not provide any identifying marks on the Ethernet frames. When configuring an access port, you also want to define which VLAN the port belongs to.
To configure and assign a switch access port to a VLAN, open a console connection to the switch and run the following IOS commands from interface configuration mode.
omnisecu.com.sw01>enable omnisecu.com.sw01#configure terminal Enter configuration commands, one per line. End with CNTL/Z. omnisecu.com.sw01(config)#interface fa0/1 omnisecu.com.sw01(config-if)#switchport mode access omnisecu.com.sw01(config-if)#switchport access vlan 10 omnisecu.com.sw01(config-if)#exit omnisecu.com.sw01(config)#interface fa0/10 omnisecu.com.sw01(config-if)#switchport mode access omnisecu.com.sw01(config-if)#switchport access vlan 20 omnisecu.com.sw01(config-if)#exit omnisecu.com.sw01(config)#exit omnisecu.com.sw01#