Search

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#
Related Tutorials
• What is Virtual Local Area Network (VLAN)
• Advantages of VLAN
• How to create and name static VLAN
• How to view VLAN information using "show vlan" command
• Types of VLAN connection links - Trunk Links and Access Links
• VLAN Frame Tagging
• Inter-Switch Link (ISL) VLAN Tagging
• IEEE 802.1Q VLAN Tagging
• What is Native VLAN
• How to configure VLAN trunk link and native VLAN
• What is VLAN Trunking Protocol (VTP)
• What is VLAN Trunking Protocol (VTP) Domain
• VLAN Trunking Protocol (VTP) Modes
• VLAN Trunking Protocol (VTP) Advertisement Messages
• How to configure VLAN Trunking Protocol (VTP)
• How to view VLAN Trunking Protocol (VTP) information
• What is VLAN Trunking Protocol (VTP) Pruning