Switchport Access Mode vs Trunk Mode

Rashmi Bhardwaj | Blog,BUZZ,Routing & Switching
Advertisements

In networking, particularly in the context of configuring network switches, “switchport access mode” and “switchport trunk mode” are two important concepts used to manage VLANs (Virtual Local Area Networks). In this article, we will refer only to the Cisco platform switches like Catalyst series.

As a general case, freshers in networking domain (like CCNA aspirants etc.) tend to come across TRUNK and ACCESS terminologies in Switching.

Related CCNA Routing & Switching Interview Questions

Advertisements

In most of Cisco switches, switchports are configured in “dynamic desirable” mode by default. This means if we connect devices, it will negotiate to form a trunk.

We can custom set switchports as either trunk or access mode since by letting default setting in place (the “dynamic desirable”), there will be less control on switch port behaviour.

switchport access mode vs trunk mode

Trunk ports are generally used in the switch to switch communication or switch to Router (Router on a stick). Trunks carry multiple VLANs across devices and maintain VLAN tags in Ethernet frames for receiving directly connected device differentiates between different VLANs. Access ports are part of only one VLAN and normally used for terminating end devices likes PC, Laptop and printer.

Using the “Switchport mode access” command forces the port to be an access port while and any device plugged into this port will only be able to communicate with other devices that are in the same VLAN.

Using the “Switchport mode trunk” command forces the port to be trunk port.

Switchport Access Mode

This mode is used to connect end devices like computers, printers, and IP phones to a VLAN.

  • Single VLAN: The port can only be assigned to one VLAN. All traffic through this port is untagged and belongs to the assigned VLAN.
  • Use Case: Typically used for devices that do not need to be aware of VLANs, such as desktop computers and other endpoints.
  • Configuration Example (Cisco IOS):
interface FastEthernet0/1
  switchport mode access
  switchport access vlan 10

Switchport Trunk Mode

This mode is used to carry traffic for multiple VLANs across a single physical link, typically between switches or between a switch and a router.

  • Multiple VLANs: The port can carry traffic for multiple VLANs. Each frame is tagged with a VLAN identifier (except for frames in the native VLAN, which may be untagged).
  • Use Case: Used to connect network devices that need to handle traffic from multiple VLANs, such as between switches or from a switch to a router.
  • Tagging: Uses IEEE 802.1Q tagging to identify frames from different VLANs.
  • Configuration Example (Cisco IOS):
interface FastEthernet0/1
  switchport mode trunk
  switchport trunk allowed vlan 10,20,30

Comparison Table : Access Mode vs Trunk Mode

Below table describes the difference between Trunk port and Access port mode on Cisco Switches-

PARAMETERTRUNK MODEACCESS MODE
TerminologyA trunk port can carry traffic in one or more VLANs on the same physical link. Trunked ports differentiate Vlans by either adding a tag to the packet (802.1Q) or encapsulation the packet (ISL).Access ports are part of only one VLAN and normally used for terminating end devices likes PC, Laptop and printer.
Default Behavior (Cisco Switches)By default, a trunk interface can carry traffic for all VLANs.By default, an access port carries only one VLAN
ConfigurationTo designate a port to a trunk mode – “Switchport mode trunk”To designate a port to access mode – “Switchport mode access”
Use case·Switch to Switch connectivity ·Switch to Router (When using Router on a Stick or dot1q trunk) ·Switch to Server (specific cases only especially in VM technology)·Switch to PC/laptop ·Switch to Printer ·Switch to Router Note – This is typical standard procedure when such switch port serves end users such as PC, printer, or servers.
VLAN TagsPort configured in Trunk mode will carry VLAN tagsPort configured in Access mode will not carry VLAN tags (stripped of VLAN tags)
Verification commands·Show Vlan brief ·show interface x/x switchport·Show interface trunk ·show interface x/x switchport
Download the comparison table switchport acsess mode vs trunk mode.

ABOUT THE AUTHOR


Leave a Comment

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

Shopping Cart