Network Implementation 20% Lesson 7 of 14

Lesson 2.2.2 — Trunking: Native VLAN, Voice VLAN & 802.1Q Tagging

Avatar Of Asad IjazAsad Ijaz ·Sep 18, 2026 ·6 min read
50% through domain
Illustration Of A Woven Multi-Colored Ribbon Stretching Between Two Switches, Representing Multiple Vlans On One Link

Domain 2.0 | Network Implementation — 20% of exam

Learning Objectives

By the end of this lesson, you will be able to:

  • Explain how 802.1Q tagging identifies which VLAN a frame belongs to as it crosses a trunk link
  • Configure and interpret a trunk port, including its allowed VLAN list and native VLAN setting
  • Explain what the native VLAN is, why it exists, and the risks of a native VLAN mismatch
  • Explain the purpose of a voice VLAN and how it lets a single switch port serve both a phone and a PC
  • Identify common trunking misconfigurations and recognize their symptoms

Key Terms

TermDefinition
802.1Q TaggingThe standard that inserts a 4-byte tag into an Ethernet frame identifying which VLAN it belongs to as it crosses a trunk
Trunk PortA switch port configured to carry traffic for multiple VLANs simultaneously, distinguishing them by tag
Native VLANThe one VLAN on a trunk whose traffic is sent untagged, for backward compatibility with equipment that doesn’t understand 802.1Q
Voice VLANA separate VLAN carried on an access port alongside the regular data VLAN, used to give VoIP phone traffic its own logical network without a second cable
Allowed VLAN ListThe explicit set of VLAN IDs permitted to cross a specific trunk port; VLANs not on the list are blocked from that trunk

Explanation

Recap: Why Trunks Exist

The previous lesson established that VLANs separate switch ports into isolated logical networks, and that access ports carry exactly one VLAN’s traffic, untagged. But switches rarely operate alone — VLANs need to span multiple switches, and a router or Layer 3 switch often needs to see traffic from several VLANs over a single link, which is exactly the scenario router-on-a-stick relies on. That’s the job of a trunk: one physical link, carrying multiple VLANs at once, each frame tagged so every device along the way knows which VLAN it belongs to.

How 802.1Q Tagging Actually Works

802.1Q is the IEEE standard that defines how VLAN tagging works. When a frame needs to cross a trunk, the sending switch inserts a small 4-byte tag into the Ethernet frame header, containing (among other fields) a 12-bit VLAN ID field. That 12-bit field is why VLAN IDs range from 0 to 4094 usable values (4095 is reserved) — it’s simply the largest number that field can hold.

As the tagged frame travels across the trunk, every switch along the path reads that VLAN ID to know which VLAN’s rules and forwarding table to apply. When the frame finally reaches an access port on the destination VLAN, the switch strips the tag back off before delivering it to the end device — end hosts never see or need to understand 802.1Q tags themselves.

Diagram Showing The 802.1Q Tag Fields Inserted Into An Ethernet Frame, Including Tpid And Vlan Id
How An 802.1Q Tag Is Inserted Into A Frame To Identify Its Vlan Across A Trunk

How An 802.1Q Tag Is Inserted Into A Frame To Identify Its VLAN Across A Trunk

Configuring a Trunk Port

A basic trunk configuration looks like this:

SW1(config)# interface GigabitEthernet0/1
SW1(config-if)# switchport mode trunk
SW1(config-if)# switchport trunk allowed vlan 10,20,30
SW1(config-if)# switchport trunk native vlan 99

The switchport trunk allowed vlan line is worth calling out specifically: by default, a trunk carries every VLAN configured on the switch, which is rarely what an administrator actually wants. Explicitly listing the allowed VLAN list restricts the trunk to only the VLANs that genuinely need to cross it — a basic but important security and traffic-management practice, since it prevents VLANs from unnecessarily leaking onto links (and switches) that have no legitimate reason to see them.

Native VLAN: Untagged by Design

As covered briefly in the router-on-a-stick lesson, exactly one VLAN on a trunk is the native VLAN, and its traffic is sent untagged. This exists for backward compatibility with older switches (and some non-802.1Q-aware devices) that don’t understand VLAN tags at all — untagged frames simply get treated as belonging to whatever VLAN the receiving port considers native.

That backward-compatibility feature comes with a real security tradeoff. If two switches disagree on which VLAN is native — one thinks it’s VLAN 1, the other thinks it’s VLAN 99 — untagged frames can land on the wrong VLAN entirely, silently crossing a boundary they were never supposed to cross. This mismatch also underlies a known attack technique called VLAN hopping via double tagging, where an attacker crafts a frame with two stacked 802.1Q tags; the first tag (matching the native VLAN) gets stripped by the first switch, exposing the second tag underneath and letting the frame slip onto a VLAN the attacker shouldn’t have access to.

Diagram Showing Two Switches Disagreeing On Native Vlan, Causing Untagged Traffic To Land On The Wrong Vlan
How A Native Vlan Disagreement Between Two Switches Can Misroute Untagged Traffic

How A Native VLAN Disagreement Between Two Switches Can Misroute Untagged Traffic

Because of this, many security-conscious network designs deliberately set the native VLAN to an unused VLAN ID — one with no legitimate hosts on it at all — specifically so that even a successful mismatch or double-tagging attempt lands somewhere harmless.

Voice VLAN: Two VLANs, One Port

Most desk phones today are IP phones with a built-in switch port, letting a PC daisy-chain through the phone to the wall jack. That means a single cable and a single switch port need to carry traffic for two different devices — the phone and the PC — and ideally, those two devices should sit on two different VLANs: one for voice, one for regular data.

The voice VLAN feature makes this possible without needing a second cable or a trunk in the traditional sense. The port is still fundamentally an access port for the PC’s data VLAN, but it’s also told to expect a second, tagged VLAN specifically for voice traffic coming from the phone:

SW1(config)# interface GigabitEthernet0/8
SW1(config-if)# switchport mode access
SW1(config-if)# switchport access vlan 10
SW1(config-if)# switchport voice vlan 50

Here, VLAN 10 is the regular data VLAN for the PC (untagged, standard access port behavior), while VLAN 50 is the voice VLAN, and the phone tags its own traffic with that VLAN ID before passing the PC’s untagged traffic through separately. This is technically a form of limited trunking on what still functions as an access port for data purposes — enough tagging capability to separate voice from data, without the port needing the full multi-VLAN behavior of a true trunk.

Diagram Showing An Ip Phone And Pc Sharing One Switch Port, With Tagged Voice Traffic And Untagged Data Traffic
How One Switch Port Carries A Tagged Voice Vlan And An Untagged Data Vlan Simultaneously

How One Switch Port Carries A Tagged Voice VLAN And An Untagged Data VLAN Simultaneously

Separating voice onto its own VLAN isn’t just organizational tidiness — voice traffic is latency-sensitive, and isolating it lets a network apply quality-of-service policies and prioritize it distinctly from regular data traffic sharing the same physical wire.

Verifying Trunk Configuration

Confirming a trunk is actually working as intended means checking a few specific things, not just that the port shows “connected”:

SW1# show interfaces trunk
Port      Mode    Encapsulation  Status      Native vlan
Gi0/1     on      802.1q         trunking    99

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

This output confirms three things at once: the port is actually trunking (not stuck negotiating or falling back to access mode), which VLAN is native, and exactly which VLANs are permitted to cross. All three of these need to agree with the configuration on the switch at the other end of the link, or the trunk won’t behave as expected even though it appears “up.”

Recognition-Level Verification Concepts

A few patterns are worth recognizing on sight:

  • A frame carrying a 4-byte 802.1Q tag with a 12-bit VLAN ID field is trunk traffic; an access port never sees or needs that tag.
  • A switchport trunk allowed vlan list that’s shorter than “every VLAN on the switch” indicates deliberate VLAN restriction on that trunk.
  • A port configured with both switchport access vlan and switchport voice vlan is serving a PC-plus-phone setup, not a full trunk.
  • Mismatched native VLAN values reported between two connected switches (often visible via CDP/LLDP warnings) point directly to a trunk misconfiguration risk.

Common Exam Traps

  • 802.1Q tags are inserted only on trunk links, not access links. An access port’s frames are always untagged from the end device’s perspective.
  • The native VLAN is untagged by design, not by mistake — but a native VLAN mismatch between two switches is a real misconfiguration and a security exposure, not a normal, harmless variation.
  • A voice VLAN port is not the same as a full trunk port. It’s still fundamentally an access port for data, with just enough additional tagging capability to separate voice traffic.
  • By default, a trunk permits every VLAN on the switch unless explicitly restricted with an allowed VLAN list — don’t assume a trunk is automatically limited to only the VLANs currently in active use.
  • Double-tagging VLAN hopping specifically exploits native VLAN behavior — this is why moving the native VLAN off VLAN 1 (or off any VLAN with real hosts) is considered a security best practice, not just a cosmetic choice.

Lesson 2.2.2 Practice Quiz — Trunking: Native VLAN, Voice VLAN & 802.1Q Tagging

17 questions covering 802.1Q tagging, trunk configuration, native VLAN risks, and voice VLAN.

N10-009 · Domain 2.2
Question 1Plain
What does an 802.1Q tag identify as a frame crosses a trunk link?
The 802.1Q tag's VLAN ID field identifies which VLAN a frame belongs to as it crosses a trunk link.
Question 2Plain
How many bits does the 802.1Q VLAN ID field use, and what range of usable VLAN IDs does that produce?
The VLAN ID field is 12 bits, giving a usable range of 0 to 4094 (4095 is reserved).
Question 3Plain
By default, if no allowed VLAN list is explicitly configured, which VLANs does a trunk carry?
By default, a trunk permits every VLAN on the switch unless the administrator explicitly restricts it with an allowed VLAN list.
Question 4Choose Two
Which two statements about the native VLAN are correct? (Choose two.)
The native VLAN's traffic is untagged by default, and a mismatch between two switches' native VLAN settings can misroute traffic and enables double-tagging VLAN hopping — a genuine security concern. VLAN 4095 is reserved, not the automatic native VLAN, and no second cable is involved.
Question 5Choose Two
Which two statements about voice VLAN are correct? (Choose two.)
Voice VLAN lets one port serve a phone (tagged voice VLAN) and a PC (untagged data VLAN) simultaneously — the port stays fundamentally an access port for data, not a full trunk, and it actually enables better QoS handling for voice, not less.
Question 6Choose Two
Which two statements about a trunk's allowed VLAN list are correct? (Choose two.)
The allowed VLAN list restricts which VLANs cross a trunk, and deliberately limiting it to only the VLANs that need to be there is a recommended security practice — it can be changed at any time and applies to all VLANs on the trunk, not just the native one.
Question 7Scenario
An administrator notices a trunk between two switches is carrying VLANs that have no legitimate reason to cross that particular link. What should be done to reduce this exposure?
Explicitly restricting the allowed VLAN list to only the VLANs genuinely needed on that trunk directly addresses unnecessary VLAN exposure, without breaking the trunk's actual function.
Question 8Scenario
CDP reports a native VLAN mismatch between two connected switches. What is the correct response?
A native VLAN mismatch is a genuine misconfiguration that can misroute untagged traffic and enable double-tagging attacks — the fix is aligning both switches to agree on the native VLAN.
Question 9Scenario
An office has IP phones with a built-in switch port so a PC can daisy-chain through the phone to the wall jack. The network team wants the phone and PC on separate VLANs without running a second cable. What feature accomplishes this?
Voice VLAN is designed exactly for this scenario — separating an IP phone's traffic from a daisy-chained PC's traffic over one cable and one switch port.
Question 10Scenario
A security team wants to reduce the risk of double-tagging VLAN hopping attacks across the network. Which practice most directly addresses this?
Since double-tagging attacks exploit the native VLAN's untagged handling, moving the native VLAN to an unused ID with no real hosts means even a successful attempt lands somewhere harmless.
Question 11Scenario
A port is configured with "switchport mode trunk," but "show interfaces trunk" shows it is not actually in trunking status. What is the most likely cause?
Trunking requires agreement (or successful negotiation) on both ends of the link. If the far-end port isn't also configured for trunking, the link won't come up as a trunk even though one side requested it.
Question 12Exhibit
Based on this configuration, which VLANs are permitted to cross this trunk?
SW1(config)# interface GigabitEthernet0/1 SW1(config-if)# switchport mode trunk SW1(config-if)# switchport trunk allowed vlan 10,20,30
The explicit "switchport trunk allowed vlan 10,20,30" line restricts this trunk to exactly those three VLANs.
Question 13Exhibit
Based on this output, what is the native VLAN on this trunk, and is it actively trunking?
SW1# show interfaces trunk Port Mode Encapsulation Status Native vlan Gi0/1 on 802.1q trunking 99
The Native vlan column shows 99, and the Status column confirms "trunking," meaning the port is actively operating as a trunk with VLAN 99 as native.
Question 14Exhibit
Based on this configuration, what will happen to traffic from the phone versus the PC on this port?
SW1(config)# interface GigabitEthernet0/8 SW1(config-if)# switchport mode access SW1(config-if)# switchport access vlan 10 SW1(config-if)# switchport voice vlan 50
The access vlan command sets the untagged data VLAN (10) for the PC, while the voice vlan command tells the port to expect tagged voice traffic on VLAN 50 from the phone — both riding the same physical cable, separated logically.
Question 15Exhibit
Based on this CDP message, what is the underlying issue?
%CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch discovered on GigabitEthernet0/1 (1), with SW2 GigabitEthernet0/2 (99).
This message flags exactly that: the two switches disagree about which VLAN is native on this trunk, which is a misconfiguration that should be corrected.
Question 16Exhibit
A packet capture decode shows the following fields for a frame crossing a trunk. Which VLAN does this frame belong to?
Ethernet II, TPID: 0x8100 (802.1Q Virtual LAN) .... 0000 0000 0001 0100 = VLAN ID: 20 Priority: 0 DEI: 0
The decoded VLAN ID field explicitly shows 20 — that's the VLAN this frame belongs to. The TPID (0x8100) simply identifies the frame as 802.1Q tagged; it isn't itself a VLAN number.
Question 17Exhibit
Comparing these two switches' trunk configurations for the same link, what problem will occur?
SW1(config-if)# switchport trunk allowed vlan 10,20,30 SW2(config-if)# switchport trunk allowed vlan 10,20
Since SW2's allowed VLAN list doesn't include VLAN 30, traffic for that VLAN will be blocked at SW2 even though SW1 permits it — VLANs 10 and 20, present on both lists, continue to work normally.
📝

Summary

802.1Q inserts a tag containing a 12-bit VLAN ID into frames crossing a trunk, letting every switch along the path know which VLAN each frame belongs to.

A trunk port's allowed VLAN list should be explicitly restricted to only the VLANs that genuinely need to cross it, rather than left at the default of allowing every VLAN.

The native VLAN carries untagged traffic for backward compatibility, but a native VLAN mismatch between switches can misroute traffic and underlies the double-tagging VLAN hopping attack technique.

A voice VLAN lets a single access port serve both an IP phone (tagged voice VLAN) and a PC (untagged data VLAN) over one cable, supporting separate QoS treatment for latency-sensitive voice traffic.

Verifying a trunk means checking its mode, native VLAN, and allowed VLAN list all agree with the switch on the other end — not just confirming the link is up.

Avatar Of Asad Ijaz

Lead Networking Architect and Editor at NetworkUstad. BS in Computer Networks and Security, CCNP and CCNA certified, with 11+ years of experience in enterprise network design, implementation, and troubleshooting. Writes practical tutorials on routing, IPv4 management, network automation, and security fundamentals.