Configuration Guide

How to Configure a Trunk Port on a Cisco Switch

To configure a trunk: set the port to trunk mode, then optionally restrict the allowed VLANs and set the native VLAN. A trunk carries multiple VLANs between switches over one link.

Trunks link switches so VLANs span the whole network. See the trunk lab for hands-on practice.

Step 1: Set the port to trunk mode

interface gi0/1
switchport mode trunk
Forces the port to trunk (carries all VLANs by default)

Step 2: Restrict the allowed VLANs (recommended)

switchport trunk allowed vlan 10,20,99Only these VLANs cross — better security and less broadcast noise

Step 3: Set a dedicated native VLAN

switchport trunk native vlan 99
switchport nonegotiate
Untagged VLAN set off VLAN 1; DTP disabled to prevent spoofing

Verification

show interfaces trunk confirms the port is trunking with the right native VLAN and allowed list. Same-VLAN devices on different switches should now ping across the trunk.

Frequently asked questions

How do I configure a trunk port on a Cisco switch?

In interface config: switchport mode trunk. Then optionally restrict VLANs with switchport trunk allowed vlan and set the native VLAN.

What is the native VLAN on a trunk?

The one VLAN whose traffic crosses untagged. Set it to a dedicated unused VLAN (not VLAN 1) on both ends to prevent VLAN-hopping.

Why use switchport nonegotiate?

It disables DTP so the port won't auto-negotiate trunking — closing a switch-spoofing attack vector.

How do I verify a trunk is working?

show interfaces trunk lists trunking ports, their native VLAN and allowed/forwarding VLANs.

VS
Vipul Sir — Lead Instructor, Attila Technologies20+ years in Cisco networking. Teaching CCNA, CCNP, CCIE & CyberOps in Ahmedabad since 2004.

Want hands-on training?

Learn this on real Cisco lab devices with placement support at Attila Technologies, Ahmedabad.

Start your networking career with Attila Technologies

Hands-on Cisco training, real lab devices and placement support in Ahmedabad.