Trunk Ports & 802.1Q

How trunk ports carry multiple VLANs across a single link

A trunk port is a switch port configured to carry traffic for multiple VLANs across a single physical link between network devices. Trunks use tagging (most commonly 802.1Q) so the receiving device can identify which VLAN each frame belongs to.

Why Use Trunk Ports?

Trunk Port Configuration

Access Mode vs. Trunk Mode

802.1Q Encapsulation

Trunking Protocols: ISL vs. 802.1Q

When a frame traverses a trunk link, it must be "tagged" so the receiving switch knows which VLAN it belongs to. There are two main protocols for this:

1. ISL (Inter-Switch Link)

2. IEEE 802.1Q (Dot1q)

Note: On modern Cisco switches, 802.1Q is often the only supported encapsulation method. On older Layer 3 switches, you might need to manually specify it using switchport trunk encapsulation dot1q.

Deep Dive: Native VLAN

The Native VLAN is a unique concept in 802.1Q trunking. While all other VLANs are tagged to identify them, traffic for the Native VLAN is sent across the trunk untagged.

Key Characteristics:

Security & Best Practices

Critical Rule: The Native VLAN must match on both ends of the trunk link!

If Switch A uses VLAN 1 as native and Switch B uses VLAN 99, you will receive "Native VLAN mismatch" errors on the console, and traffic might be misdirected (VLAN leaking).

Security Tip: It is a security best practice to change the Native VLAN from the default (VLAN 1) to an unused VLAN ID (e.g., VLAN 999) to prevent specific types of attacks known as VLAN Hopping.

Troubleshooting Trunk Ports

Quick CLI example:
Switch(config)# interface gigabitEthernet0/1
Switch(config-if)# switchport mode trunk
Switch(config-if)# switchport trunk encapsulation dot1q
Switch(config-if)# switchport trunk encapsulation dot1q ! Required on some L3 switches
Switch(config-if)# switchport trunk native vlan 99
Switch(config-if)# switchport trunk allowed vlan 10,20,30

Trunks are fundamental when designing multi-VLAN networks and are commonly used between switches, and between switches and routers or virtualization hosts.

Go to Trunking Lab →