Skip to content
Nexus
Go back

VLAN Trunking Explained: How Multiple VLANs Travel Over a Single Link

Edit page

Table of Contents

Open Table of Contents

Introduction

In modern networks, VLANs (Virtual Local Area Networks) are everywhere. They help us segment networks, improve security, and reduce broadcast traffic. But what happens when you have multiple switches and you want the same VLANs to exist across all of them?

This is where VLAN Trunking comes in.

In this post, we’ll understand:


What is a VLAN? (Quick Recap)

A VLAN is a logical segmentation of a switch network. Devices in different VLANs:

Example:

Even if they are connected to the same physical switch, they behave like they are on different networks.


What is VLAN Trunking?

A trunk link is a special type of switch port that can carry traffic from multiple VLANs at the same time over a single physical cable.

In short: VLAN Trunking = Multiple VLANs over one link

Without trunking, you would need:

With trunking:


Why Do We Need Trunking?

Imagine this setup:

If you connect them using a normal access port:

If you use a trunk port:

So trunking is used to:


Access Port vs Trunk Port

FeatureAccess PortTrunk Port
Carries VLANsOnly ONE VLANMultiple VLANs
Used forEnd devices (PC, printer)Switch-to-switch, switch-to-router
TaggingUntaggedTagged (802.1Q)

Example:


How Trunking Works (802.1Q Tagging)

The most common trunking protocol is:

IEEE 802.1Q (dot1q)

What does it do?

What’s inside the tag?

On the receiving switch:

This is how multiple VLANs safely share the same cable.


What is the Native VLAN?

In 802.1Q trunking:

By default (on Cisco):

Native VLAN = VLAN 1

⚠️ Security Tip:

Never use VLAN 1 as native VLAN in production. Always:


Trunking Between Switches and Routers

1. Switch to Switch

2. Router-on-a-Stick

This saves:


Basic Configuration Example (Cisco)

Configure a trunk port on a switch:

Switch(config)# interface g0/1
Switch(config-if)# switchport mode trunk
Switch(config-if)# switchport trunk allowed vlan 10,20,30
Switch(config-if)# switchport trunk native vlan 999

Verify trunk:

Switch# show interfaces trunk

Common Issues and Best Practices

❌ Common Issues:

✅ Best Practices:


Conclusion

VLAN Trunking is a core concept in networking that makes modern scalable networks possible.

To summarize:

If you’re preparing for CCNA, networking interviews, or real-world network design, mastering VLAN trunking is a must.


If you want, I can also write posts on:


Edit page
Share this post on:

Next Post
TCP Three-Way Handshake