🔀Trunking Port & Access Port

Introduction

What is Trunk & Access Port

Trunk Port

A trunk port is a type of port on a switch used to connect two switches or other network devices together. The main feature of a trunk port is its ability to transmit data from multiple VLANs over a single physical connection. This means that the port can send traffic from multiple VLANs to switches or other network devices connected to that port.

  1. Supporting Multiple VLANs: A trunk port allows traffic from multiple VLANs to pass through a single connection. This is useful when you have more than one VLAN in your network and need to transmit data between VLANs.

  2. Tagging Frames: Data transmitted through a trunk port is typically tagged with additional information indicating its original VLAN. This allows the receiving switch to distinguish data from different VLANs passing through the port.

  3. Using Trunking Protocols: Trunk ports often utilize trunking protocols such as IEEE 802.1Q or ISL (Inter-Switch Link) to handle VLAN tagging and manage traffic passing through the port.

  4. Connecting Switches: Trunk ports are used to connect switches together, enabling larger networks with multiple VLANs and devices to communicate and work together.

Access Port

An access port on a switch is a type of port that is typically assigned to a single VLAN. It is used to connect end devices such as computers, printers, or servers to the switch. The main characteristics of an access port are:

  1. Single VLAN Assignment: An access port is configured to belong to a specific VLAN. It does not tag VLAN information on the frames that it sends and receives, as it assumes all incoming and outgoing traffic belongs to the designated VLAN.

  2. Limited to One VLAN: Unlike trunk ports, which can handle traffic from multiple VLANs, an access port operates within the confines of a single VLAN. It provides connectivity for devices within that VLAN only.

  3. Simplicity: Access ports are straightforward in their operation, making them easy to configure and manage. They are commonly used in scenarios where devices need simple network connectivity without the need for VLAN segregation or complex routing.

  4. Typical Usage: Access ports are typically used to connect end devices directly to the network, ensuring that each device is associated with a specific VLAN for traffic management and security purposes.


Configuration

VLAN 10 : 10.10.10.0/24 VLAN 20 : 20.20.20.0/24

Add VLAN Name

Switch>enable
Switch#config terminal

///Add VLAN///
Switch(config)#vlan 10
Switch(config-vlan)#name vlan10
Switch(config)#vlan 20
Switch(config-vlan)#name vlan20

Add Trunk Port

Switch>enable
Switch#config terminal
Switch(config)#int fa4/1
Switch(config-if)#switchport mode trunk

Add Access Port

Switch>enable
Switch#config terminal

///Add Access Port For VLAN10///
Switch(config)#int fa0/1
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 10
Switch(config)#int fa1/1
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 10

///Add Access Port For VLAN20///
Switch(config)#int fa2/1
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 20
Switch(config)#int fa3/1
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 20

Clients can communicate within the same VLAN ID, but they cannot communicate with different VLAN IDs. This is because switches operate at Layer 2, where they only read the MAC addresses of clients, not their IP addresses. To enable communication between different VLAN IDs, a router is required.

Last updated