In this article, we will discuss switchport and switchport modes. While working on Cisco platform switches, you may come across Trunk Mode and Access Mode. Let’s start the discussion in mode detail.
What is Switchport Mode in Cisco Switches
The term “Switchport” refers to an OSI Model layer 2 switch interface, on which routing is disabled. So, you will be not able to assign an IP address to a switchport interface. Generally, a switchport is used while configuring the VLANs on the Cisco Switch.
Note: All interfaces of a Layer 2 switch are “switchport”!
Different Types of Switchport – Access & Trunk
Switchport has two modes, i.e. Switchport mode trunk and switchport mode access. Let’s first understand the definition of both, Access Port and Trunk Ports.
Access Ports: Access Ports belong to a single VLAN and carry the traffic of a single VLAN only.
Trunk Ports: Trunk Ports, usually carry the traffic of multiple VLANs and by default will be the member of all VLANs configured on the switch.
To understand Switchports more clear, you can have a look at the below image:
On the top side of the screenshot, two interfaces are configured on each switch to carry the data of two VLANs i.e. VLAN 100 & VLAN 200. Each switchport is Access Port.
However, on the bottom side of the screenshot, only a single interface is sufficient to carry the data of two VLANs, i.e. VLAN 100 & VLAN 200. This switchport is Trunk Port.
Difference between Switchport Mode – Access and Trunk
In this session, we will discuss the difference between Trunk Port and Switch Port. The below table helps you with the differences between both of them.
Recommended: Get Cisco CCNA LAB
Access Port | Trunk Port |
---|---|
Access Port, is the member of single VLAN, and carry the traffic of that particular VLAN only. | Trunk Port, carry the traffic of multiple VLANs. By default, Trunk ports member of all VLANs configured in the switch. |
It is usually used to connect the end devices like Laptop, Printer, Computer, etc. | It is usually used to establish the connectivity between Switch to Switch or Switch to Router (i.e. Router on a Stick) |
Usually, less bandwidth is required while connecting the access port across devices. | Trunk port usually required More bandwidth as compared to Access ports. |
No VLAN tagging is performed, so no additional protocol required on Access Ports. | For VLAN tagging, it used additional protocols depending on the environments. Two Protocols, i.e. IEEE 802.1Q or DTP (Cisco Proprietary) |
Access Port Configuration: GNS3_SW2(config-if)#switchport mode access | Trunk Port Configuration: GNS3_SW2(config-if)#switchport mode trunk |
By default, Cisco switches configured as “dynamic desirable“. Dynamic Desirable configuration decides whether the interface will be in Access mode or Truck mode depending on neighbor device behaviors.
However, It is highly recommended to configure the switch port manually rather than dynamic desirable.
Configuration – Switchport Mode Access
In this session, we will discuss the configuration of the Access Mode of a switchport. As we already discussed, switchport used to connect with the End Points, i.e. Computer, Printer, Laptops, etc.
Note: You must need proper priviledgges to configure Swichport configuraiton!
The Below configuration will explain to you to configure the switchport of a CISCO IOS switch.
Another easy way to configure switchport is “switchport host”, which also configure the port as a switchport. It will also configure STP portfast feature.
Note: Before configuring the switchport host, you need to sure that only Host is connected with switch.
Configuration – Switchport Mode Trunk
In this session, we will configure the switchport as a trunk. As we previously discussed, a trunk port is used to carry multiple VLAN traffic.
Below is the trunk port configuration for Cisco IOS Switches:
By default, the trunk will be the member of all VLANs configured on the switch. So, it will carry out the traffic of each VLAN configured on the switch. You can restrict the switch to send the traffic of a particular VLAN using the below command:
Related Articles
- How to configure GRE Tunnel between Cisco Routers
- Cisco line vty Explanation and Configuration
- Cisco Packet Tracer 7.3 Free Download (Offline Installers)
- How to disable Automatic DNS Lookup In Cisco Devices
- Download GNS3: Latest Version [Offline Installer]
Reference
Summary
In this article, we discussed and configure the Trunk ports and Access ports of a switchport. Access ports basically members of a single VLAN and carry the traffic of a single VLAN. On the other hand, the Trunk port carries the traffic of multiple VLANs and by default the members of all configured VLANs. By default, Cisco Switches are configured as dynamic desirable. It is highly recommended to configure the interface manually because it creates duplex and speed-related issues.
Did you like this article? Please share this article on social platfroms using below buttons and shows us some love 🙂
Support our work:
If you appreciate what we do and would like to contribute to our efforts, we kindly ask you to consider buying us a coffee. Your small donation can go a long way in helping us cover the costs of hosting, maintenance, and further development.
Please consider buying us a coffee ( or 2 ) as a token of appreciation.
We are always thankful for your never-ending support.