What Does 'Trunk Port' Mean?

What is a Trunk Port?
Image by victor217 on Freepik

A trunk port is a network port that is capable of carrying traffic for multiple VLANs (Virtual Local Area Networks). This allows a single physical connection to be used to carry traffic for multiple logical networks.

This is achieved by tagging each packet with a VLAN ID, which is used to identify the packet’s corresponding VLAN. This opens the door for traffic from different VLANs to be distinguished as it travels over the shared physical link. Trunk ports are typically used to connect network devices such as switches and routers together.

By allowing multiple VLANs to share the same physical link, trunk ports make it easier to organize and manage network traffic and to create logical network segments to improve security and isolation.

More information

Trunk ports use a protocol called “802.1Q” to tag each packet with a VLAN ID. This protocol defines a method for inserting a 4-byte tag into the Ethernet frame header. The tag includes a VLAN ID, which is used to identify the packet’s corresponding VLAN, as well as other information such as priority.

Trunk ports can be configured in a number of different ways. One common method is to enable all VLANs to traverse the trunk by default and then use VLAN access control lists (ACLs) or other security measures to restrict access as needed. Another method is to configure the trunk port to only permit specific VLANs to traverse it. This is known as “trunking on specific VLANs.”

Trunking can also be configured to make it possible for the creation of VLANs that span multiple switches, known as VLANs across multiple switches. This allows you to create larger logical networks that span multiple physical switches. This is useful for creating large, flat networks with fewer internal routers and also for creating virtual network segments for security and isolation.

Trunk ports can also be configured to prioritize traffic for different VLANs using Quality of Service (QoS). This can be used to give priority to certain types of traffic, like VoIP or video conferencing traffic, to ensure that they are delivered with minimal delay and jitter.

Trunk ports are a critical component of modern networking infrastructure, and they play a key role in creating flexible, scalable, and secure networks. It’s important to have a good understanding of how to configure and manage trunk ports in order to make the best use of this feature in your network.

Trunk Ports and OSI Layer 2

Trunk ports are associated with OSI Layer 2, also known as the Data Link Layer. The OSI model is a conceptual framework for understanding the different layers of a network, and it is often used to describe the different layers of a network protocol stack.

At Layer 2, the Data Link Layer, the packets are encapsulated in a data link frame (such as Ethernet frames) and are used to transmit data over a physical link. The data link frame contains a destination MAC address, a source MAC address, and a payload, which is the actual data being transmitted.

Trunk ports operate at the Data Link Layer, and they are used to permit multiple VLANs to share the same physical link. This is achieved by tagging each packet with a VLAN ID, which is used to identify the packet’s corresponding VLAN. This enables traffic from different VLANs to be distinguished as it travels over the shared physical link.

When the frame is received by the end device (for example, a switch or a router), the device examines the VLAN tag of the frame and, based on that, forwards the frame to the appropriate VLAN. This is how trunk ports create multiple logical networks over a single physical link, making it possible for more organized and efficient use of network resources.

In summary, trunk ports enable the multiplexing of multiple virtual LANs over a single physical link. This is possible because of the tag (VLAN ID) that is inserted into each packet at the Data Link Layer of the OSI model, allowing different VLANs to be distinguished over a shared physical link.