Switchport Modes | Trunk Port | Access Port

switchport-mode-access-and-trunk

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.

switchport-mode-access-and-trunk

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:

access-link-vs-trunk-link

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

EIGRPOSPF
EIGRP Stands for Enhanced Interior Gateway Routing ProtocolOSPF Stands for Open Shortest Path First
Hybrid Routing ProtocolLink-State Routing Protocol
Cisco ProprietaryOpen Standard Routing Protocol
EIGRP uses Bandwidth, Load, Total Delay, Reliability, MTU, Hop Count as it's metricUses path cost as its routing metric
Support Unequal cost load balancingOnly Support equal-cost load balancing
AD Value:
EIGRP Summary Route - 5
Internal EIGRP - 90
External EIGRP - 170
AD Value
OSPF - 110
Uses DUAL AlgorithmUses Dijkstra Algorithm
Multicast address is 224.0.0.10Multicast address is 224.0.0.5 & 224.0.0.6
Convergence Time is very less.Convergence Time is more than EIGRP.

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.

[simterm]GNS3Network_SW2# configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
GNS3Network_SW2(config)# interface FastEthernet 0/1
GNS3Network_SW2(config-if)# switchport mode access
GNS3Network_SW2(config-if)# switchport access vlan 100
GNS3Network_SW2(config-if)#end
GNS3Network_SW2#[/simterm]

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.

[simterm]GNS3Network_SW2# configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
GNS3Network_SW2(config)# interface FastEthernet 0/1
GNS3Network_SW2(config-if)# switchport host
GNS3Network_SW2(config-if)#switchport access vlan 100
GNS3Network_SW2(config-if)#end
GNS3Network_SW2#[/simterm]

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:

[simterm]GNS3Network_SW2# configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
GNS3Network_SW2(config)# interface FastEthernet 0/1
GNS3Network_SW2(config-if)#switchport mode trunk
GNS3Network_SW2(config-if)#end
GNS3Network_SW2#[/simterm]

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:

[simterm]GNS3Network_SW2# configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
GNS3Network_SW2(config)# interface FastEthernet 0/1
GNS3Network_SW2(config-if)# switchport mode trunk
GNS3Network_SW2(config-if)# switchport trunk allowed vlan 10-11
GNS3Network_SW2(config-if)#end
GNS3Network_SW2#[/simterm]

Related Articles

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 🙂

You May Also Like

About the Author: Vikash Kaushik

Leave a Reply

Your email address will not be published. Required fields are marked *

Share via
Copy link