PracticeLabs
Week 3Lesson 3Required44 min estimated0% progress

Trunks, 802.1Q, and Native VLAN

Configure and verify an 802.1Q trunk, explain native VLAN behaviour, stay aware of DTP, and diagnose a native-VLAN mismatch and an allowed-list mismatch from show interfaces trunk.

Lesson orientation

What you'll learn (5 objectives)~44 min: video → lesson → check → apply → lab prep

Learning objectives

  • Explain why a switch-to-switch link must be a trunk and how 802.1Q carries many VLANs on one port
  • Describe the 802.1Q tag as a 4-byte field carrying a 12-bit VLAN ID, and state when the switch strips it
  • Explain native VLAN behaviour, the default-VLAN security exposure, and the native-VLAN-mismatch failure
  • Stay aware of DTP modes and justify configuring trunks statically with nonegotiate
  • Diagnose an allowed-VLAN-list mismatch and a native-VLAN mismatch from show interfaces trunk and apply the fix

Terms you will see

Trunk802.1QTagTPIDVLAN ID (VID)Native VLANAllowed VLAN listDTPnonegotiate

Time breakdown

  • Read the notes20 min
  • Encapsulation Lab — locate the tag6 min
  • Mismatch diagnosis practice8 min
  • Lab stage — trunk, native VLAN, DTP10 min

Assigned video

Opens on YouTube
Recommended video

VLANs Part 2 — Trunks & 802.1Q (Day 17)

By Jeremy's IT Lab · Opens externally on YouTube

Assigned watch
~12 min

The link opens in a new browser tab. Return here when you finish watching.

Watch for these concepts

  • Where the 4-byte 802.1Q tag is inserted in the frame
  • The native VLAN travelling untagged while every other VLAN is tagged
  • show interfaces trunk confirming mode, native VLAN, and allowed/forwarding VLANs

Go beyond the video

The assigned video introduces the idea. CCNA Practice Labs completes the learning path: clarify core concepts, explore how each device behaves, visualize the communication path, check your understanding, and prepare for hands-on lab work.

Watch the concept → understand it → visualize it → practice it → apply it.

Why a trunk is needed

An access port belongs to one VLAN, so a single access link between two switches could only ever carry one VLAN across. A trunk is a switch-to-switch — or switch-to-router — link that carries many VLANs at once. The problem it has to solve is identity: when a frame arrives over a link shared by VLANs 10, 20 and 30, the receiving switch must know which VLAN it came from, so that its MAC table and its flooding stay per-VLAN exactly as the previous lesson requires.

802.1Q tagging
As a frame leaves a trunk port, the switch inserts a 4-byte tag into the Ethernet header, between the source MAC and the EtherType. Inside it is a 12-bit VLAN ID, which is why the usable VLAN range tops out near 4094. The receiving switch reads the tag, forwards the frame only within that VLAN, and strips the tag before handing the frame to a plain access host. Access ports therefore always see untagged frames. ISL is obsolete; CCNA expects 802.1Q.
Where the tag sits
Untagged:  [ Dest MAC | Src MAC | EtherType | Payload | FCS ]
Tagged:    [ Dest MAC | Src MAC | 802.1Q | EtherType | Payload | FCS ]
                                  |
                                  4 bytes: TPID 0x8100 + PCP/DEI + 12-bit VLAN ID

The native VLAN is the untagged one

802.1Q leaves exactly one VLAN on the trunk untagged: the native VLAN, which defaults to VLAN 1. Any untagged frame arriving on a trunk is treated as native-VLAN traffic. Two consequences follow, and they are the reason this lesson is the longest of the week.

The security exposure of leaving it at VLAN 1
VLAN 1 is the default for everything, and carries management and control traffic on an unhardened switch. Leaving the native VLAN there means stray untagged frames land in a well-known VLAN that an attacker can guess. Hardening sets the native VLAN to a dedicated, unused VLAN — 99 in the examples below — on both ends of every trunk.
Native VLAN mismatch — and why it hides
Both ends must agree. If SW1 says native VLAN 1 and SW2 says native VLAN 99, each side puts untagged traffic into a different VLAN, silently bridging two broadcast domains. What makes this genuinely nasty is that every tagged VLAN keeps working perfectly, so the network looks healthy. CDP logs the mismatch, which is one of the reasons the discovery lesson closes this week.

The allowed-VLAN list is a separate control. By default a trunk carries every VLAN; switchport trunk allowed vlan restricts which may cross, limiting both the security surface and unnecessary broadcast flooding. If a VLAN is allowed on one end but omitted on the other, that one VLAN loses connectivity across the link while everything else works — a different symptom from a native mismatch, with no CDP log to help you.

DTP — know it, then turn it off

The Dynamic Trunking Protocol is a Cisco-proprietary protocol that lets two switch ports negotiate whether their link becomes a trunk. For CCNA you need awareness rather than mastery: know the modes and the resulting link type, then disable it on known uplinks. The exam-relevant point is that leaving DTP enabled produces unpredictable, negotiable trunks, which is both a reliability and a security problem.

DTP modes and the resulting link
Local modeBehaviourWith trunk / desirable neighbourWith auto neighbour
switchport mode trunk (+ nonegotiate)Forces a trunk; DTP offTrunkTrunk
switchport mode dynamic desirableActively asks to trunkTrunkTrunk
switchport mode dynamic autoTrunks only if askedTrunkAccess — two autos never trunk

The single fact worth memorising is the last cell: two dynamic auto ends never form a trunk, because neither side initiates. The correct production habit is switchport mode trunk plus switchport nonegotiate, which pins the trunk and stops DTP frames entirely. VTP, a separate protocol that synchronises the VLAN database, is out of scope here.

Configure and verify a static trunk

Static 802.1Q trunk with a hardened native VLAN
Switch(config)# interface GigabitEthernet0/1
Switch(config-if)# switchport mode trunk
Switch(config-if)# switchport trunk native vlan 99
Switch(config-if)# switchport trunk allowed vlan 10,20,30
Switch(config-if)# switchport nonegotiate

Switch# show interfaces trunk
show interfaces trunk — the four things to read
Port        Mode         Encapsulation  Status        Native vlan
Gi0/1       on           802.1q         trunking      99

Port        Vlans allowed on trunk
Gi0/1       10,20,30

Port        Vlans allowed and active in management domain
Gi0/1       10,20,30

Port        Vlans in spanning tree forwarding state and not pruned
Gi0/1       10,20,30

Read it as four separate answers. Mode and Status confirm the port is actually trunking rather than merely configured to. Native vlan is the column you compare against the far end — differing values are the fingerprint of a native mismatch. The allowed block shows what you permitted; the forwarding block shows what is genuinely passing, and a VLAN present on one switch but missing from the other's forwarding block is the fingerprint of an allowed-list mismatch. On ISL-capable platforms switchport trunk encapsulation dot1q is set first; many modern switches are 802.1Q-only and skip it.

Two faults, two fingerprints

Telling the two trunk faults apart
Native VLAN mismatchAllowed-list mismatch
SymptomTagged VLANs all work; untagged traffic crosses into the wrong VLANOne specific VLAN loses connectivity; every other VLAN is fine
Where it showsThe Native vlan columns differ between the two endsThe VLAN is missing from one end's allowed/forwarding block
CDP logYes — CDP reports a native VLAN mismatchNo log at all
FixSet both ends to the same native VLANswitchport trunk allowed vlan add <id> on the end that is missing it
Troubleshooting — VLAN 20 broken, VLAN 10 fine, no CDP log
Symptom: VLAN 20 hosts on SW2 cannot reach VLAN 20 hosts on SW1, but VLAN 10 crosses the trunk normally and no CDP native-mismatch message appears. Diagnosis: show interfaces trunk lists VLAN 20 in SW1's forwarding block but not in SW2's — an allowed-list omission. The absent CDP log is what rules out a native mismatch. Fix: switchport trunk allowed vlan add 20 on SW2's trunk. Use add rather than a bare allowed vlan 20, which would replace the whole list and break VLAN 10 as well.

What you should retain

  • A trunk carries many VLANs on one link; 802.1Q inserts a 4-byte tag holding a 12-bit VLAN ID.
  • The native VLAN travels untagged and defaults to VLAN 1; harden it to a dedicated unused VLAN.
  • A native mismatch hides behind working tagged VLANs — compare the Native vlan columns on both ends.
  • An allowed-list mismatch breaks exactly one VLAN and produces no CDP log.
  • Two dynamic auto ends never form a trunk; prefer switchport mode trunk plus nonegotiate.
  • show interfaces trunk answers mode, native VLAN, allowed VLANs, and forwarding VLANs in one command.
Pause and predictNot scored — nothing is recorded

Before you read on

SW1 and SW2 are joined by a working trunk. Tagged VLANs 10 and 20 pass fine. Two faults exist: SW1 shows native vlan 1 while SW2 was set to native vlan 99, and separately VLAN 20 is absent from SW2's allowed list. (1) Why do the tagged VLANs still work? (2) Which output reveals each fault? (3) What are the two fixes, and where?

Interactive tool
Required~6 min

Encapsulation Lab

Open the frame header stack and locate the 802.1Q tag relative to the source MAC, then find the 12-bit VLAN ID inside it. Seeing the tag as a real insertion into a real frame is what stops it being an abstract four bytes.

Lab preparation

Prepare for the lab

Available nowWeek 3

Week 3 Lab — VLAN and Trunk (stage 2 of 4)

Continue the same SW1/SW2 topology from Lesson 2. You configure a static 802.1Q trunk carrying VLANs 10 and 20, harden the native VLAN to 99 on both ends, pin the port with nonegotiate, then diagnose a deliberately broken trunk carrying both faults at once.

This lesson prepares you to:

  • Configuring switchport mode trunk and an allowed VLAN list on both ends
  • Setting a matching non-default native VLAN and reading the CDP mismatch log
  • Observing that two dynamic-auto ends never form a trunk
  • Separating an allowed-list omission from a native mismatch in CLI output

The redundant links you build here are what the STP and EtherChannel lessons operate on — keep the topology.

Open the lab

Study deeper

Topic guides extend this lesson — they do not replace the first-party walkthrough above.

VLANs & Trunks

For the full trunking reference — tag format detail, ISL history, and the complete verification command set