Skip to content
[menu][close]

FOUNDRYNETNo. 001SEPTEMBER 2026SWITCHING

Native VLAN: Untagged Trunk Traffic, Mismatches and VLAN Hopping

The native VLAN is the one VLAN a trunk sends without a tag. It is useful for phones, access points and hypervisors, and it is also the starting point for VLAN hopping.

On this page

The native VLAN is the one VLAN on an 802.1Q trunk whose frames cross the link without a tag. Any untagged frame that arrives on the trunk is placed into the native VLAN, and frames belonging to the native VLAN leave the trunk untagged; on most switches it defaults to VLAN 1.

That one exception to tagging is behind several real outages and one well-known attack, so it deserves more than the paragraph it gets on the VLANs, trunks and broadcast domains page. This page covers what the native VLAN is in standard terms, why it still exists, what happens when the two ends disagree, how VLAN hopping by double tagging works, and the configuration that closes those gaps.

01 What does the native VLAN do on a trunk?

IEEE 802.1Q does not use the phrase "native VLAN". It gives every bridge port a PVID (port VLAN identifier) and an untagged set. When a frame arrives with no VLAN tag, or with a priority tag that carries VLAN ID 0, the port assigns it to the PVID. On transmit, the port sends a frame untagged if its VLAN is in the port's untagged set and tagged otherwise. "Native VLAN" is the vendor name for a trunk whose PVID VLAN is also its one untagged VLAN.

So the native VLAN has two jobs, one per direction:

  • Ingress: untagged frames received on the trunk join the native VLAN.
  • Egress: frames in the native VLAN are sent without a tag.

Every other VLAN on the trunk is tagged in both directions. An access port is the degenerate case: one VLAN, untagged both ways, and the host never sees a tag.

The native VLAN exists for devices that sit on a trunk but cannot or should not tag everything: an IP phone passing a PC's untagged traffic through to the switch while tagging its own voice traffic, a wireless access point whose management address is untagged while its client SSIDs are tagged, a hypervisor host whose management interface sits untagged on the same uplink as tagged guest VLANs, and older devices that predate 802.1Q. Link-local control frames are a separate case: standard spanning tree BPDUs, LACP and LLDP are sent untagged whatever the native VLAN is, because they belong to the port rather than to a VLAN.

02 Native VLAN syntax across platforms

Vendors express the same idea in different ways. Cisco sets it per trunk, Junos per interface with a matching logical unit, Foundry's IronWare with a dual-mode port, and Linux with a PVID flag on the bridge port.

Setting the native (untagged) VLAN on a trunk, by platform
PlatformCommand shapeDefaultNote
Cisco IOSswitchport trunk native vlan 999VLAN 1vlan dot1q tag native tags it globally
Junos (ELS)set interfaces xe-0/0/1 native-vlan-id 999None setA unit with the matching VLAN must exist to receive untagged frames
Foundry IronWaredual-mode 999 on a tagged portVLAN 1 for untagged portsThe port must be a tagged member of VLAN 999
Linux bridgebridge vlan add dev eth1 vid 999 pvid untaggedVLAN 1 PVIDNeeds vlan_filtering on the bridge

The Junos behaviour trips people up. The native-vlan-id statement reference says you must also configure a logical interface with the same VLAN ID for untagged packets to be received, and that from Junos 17.1R1 the no-native-vlan-insert statement lets you send untagged traffic without a native VLAN ID. A Junos trunk with native-vlan-id but no matching VLAN membership drops untagged frames silently. On IronWare, the dual-mode port described on the FastIron switch family page was the Foundry way to carry a PC's untagged traffic through an IP phone while the phone tagged voice.

03 What happens when the native VLAN does not match?

A trunk is two ports, and each has its own native VLAN setting. If switch A uses VLAN 1 as native and switch B uses VLAN 999, a frame from VLAN 1 leaves A untagged, arrives at B with no tag and is placed into VLAN 999. The two VLANs are now bridged into one broadcast domain across that link, in both directions. Hosts in VLAN 1 on A and hosts in VLAN 999 on B can ARP for each other and DHCP offers cross between them. Nothing is down, so the fault can go unnoticed for weeks.

Two mechanisms usually catch it on Cisco gear. CDP carries the native VLAN in its advertisements and logs a %CDP-4-NATIVE_VLAN_MISMATCH message when the two ends differ. Per-VLAN spanning tree (PVST+) tags its BPDUs with the originating VLAN, and a switch that receives a BPDU for one VLAN on another VLAN's native port puts the port into a PVID-inconsistent blocking state for the affected VLANs. With MSTP or RSTP there is no per-VLAN BPDU to compare, so the mismatch bridges silently unless CDP or LLDP reports it. The symptoms to look for when nothing logs it: DHCP leases handed out from the wrong scope, ARP entries for addresses that belong to another subnet, and MAC addresses from one VLAN appearing in the other VLAN's forwarding table on the far switch. Spanning tree behaviour per mode is on the MSTP regions and instances page.

04 How does VLAN hopping through the native VLAN work?

Double tagging is the classic attack that uses the native VLAN, and it needs three conditions: the attacker's access port is in the same VLAN as the native VLAN of a trunk, the first switch strips the native VLAN tag before forwarding on that trunk, and the target VLAN is carried on the trunk.

  1. The attacker sends a frame with two 802.1Q tags: the outer tag is the native VLAN, say VLAN 1, and the inner tag is the target, say VLAN 20.
  2. The first switch reads the outer tag, sees VLAN 1, and forwards the frame toward the trunk. Because VLAN 1 is native on that trunk, it removes the outer tag and sends the frame "untagged". The inner tag is still there.
  3. The second switch receives a frame whose first tag says VLAN 20 and delivers it into VLAN 20.

The attack is one-way: replies from VLAN 20 never come back to the attacker through the same path. That still allows a spoofed packet to reach a server in a VLAN the attacker should not reach, which is enough for a UDP-based attack or a denial of service. The related switch spoofing attack is different: a host negotiates a trunk with DTP on a port left in dynamic mode, and then sees every VLAN. Both are closed by configuration.

05 How do you secure the native VLAN?

The goal is to make sure no user port shares a VLAN with any trunk's native VLAN, and that untagged traffic on trunks is either deliberate or impossible. On Cisco IOS, a hardened trunk and access port pair looks like this:

! a VLAN that exists only to be the native VLAN on trunks
vlan 999
 name NATIVE-UNUSED
!
! optional, global: tag native VLAN frames on every 802.1Q trunk
vlan dot1q tag native
!
interface GigabitEthernet1/0/48
 description uplink to dist-a.example.net
 switchport mode trunk
 switchport nonegotiate
 switchport trunk native vlan 999
 switchport trunk allowed vlan 10,20,30
!
interface GigabitEthernet1/0/5
 description user port
 switchport mode access
 switchport access vlan 10
 switchport nonegotiate
 spanning-tree portfast
 spanning-tree bpduguard enable

The steps, in order:

  1. Create a dedicated native VLAN such as 999 and assign it to no access port anywhere. A double-tagged frame needs an access port in the native VLAN to start from.
  2. Set it as native on both ends of every trunk. Change both sides in the same window; for the seconds between the two changes, the link bridges the old and new native VLANs.
  3. Leave the native VLAN out of the allowed list where nothing on the trunk should send untagged frames, so untagged frames are dropped. Leave it in where a phone, access point or hypervisor relies on untagged traffic, and give that device's untagged traffic its own VLAN instead of VLAN 1.
  4. Tag the native VLAN where the platform supports it and both ends agree. With tagging on, a trunk carries no untagged data frames at all and double tagging fails at the first switch.
  5. Turn off trunk negotiation. Set access ports to access mode and trunks to trunk mode with negotiation disabled, which stops switch spoofing.
  6. Move management off VLAN 1 and stop using VLAN 1 for anything you can avoid. Unconfigured ports default into it.

Native VLAN hardening fits next to the other edge protections: BPDU guard on host ports and port-based authentication with 802.1X and dynamic VLAN assignment, which keeps unknown devices out of user VLANs in the first place.

Check both ends; the setting is per port, not per link.

  • Cisco IOS: show interfaces trunk lists each trunk with its mode, encapsulation, native VLAN and allowed VLANs. show interfaces Gi1/0/48 switchport shows the trunking native mode VLAN for one port.
  • Junos: show ethernet-switching interface xe-0/0/1 shows VLAN membership with tagged and untagged flags.
  • Neighbour protocols: CDP mismatch messages appear in the log; with LLDP, the 802.1 port VLAN ID TLV shows the far end's PVID in show lldp neighbors detail when both sides send it.
  • Packet capture: mirror the trunk and look for frames without an 802.1Q header. On a trunk with the native VLAN tagged or excluded, the only untagged frames should be link-local control protocols. The capture setup is on the port mirroring and SPAN page.

07 Common native VLAN mistakes

  • Different native VLANs on the two ends. Two VLANs merge into one broadcast domain on that link. Fix both ends to the same value.
  • Native VLAN equal to a user VLAN. That is the condition double tagging needs. Use a VLAN with no access ports.
  • Removing the native VLAN from the allowed list on a trunk to a phone or access point. The device's untagged traffic, often its own management, disappears. Check what the far end sends untagged before you prune.
  • Tagging native frames on one side only. The tagging side sends tagged frames for VLAN 999; the other side expects them untagged and may drop them or treat them differently.
  • Junos native-vlan-id without the matching VLAN. Untagged frames are dropped, which looks like a dead link to the device on the far end.
  • Changing the native VLAN on a management trunk remotely. If your session reaches the switch through the native VLAN, the first side you change cuts you off. Use out-of-band access or change the far side first.

The native VLAN is the one place on a trunk where the 802.1Q tag is deliberately left off; the tag format itself and the rest of the trunk design are collected in the switching guides.

08 Questions

What is the native VLAN used for?

It carries untagged traffic on an 802.1Q trunk: a PC behind an IP phone, an access point or hypervisor management address, or an older device that cannot tag. Untagged frames arriving on the trunk are placed into it.

Is the native VLAN always VLAN 1?

By default on most switches, yes, but it is configurable per trunk. Best practice is to change it to a dedicated VLAN with no access ports, and to set the same value on both ends of the trunk.

What happens if the native VLANs do not match?

Untagged frames from one side land in a different VLAN on the other, so the two VLANs merge into one broadcast domain on that link. Cisco CDP logs a native VLAN mismatch, and PVST+ blocks the port as PVID-inconsistent; with MSTP or RSTP the merge can go unnoticed.

How does double tagging VLAN hopping work?

An attacker in the native VLAN sends a frame with two tags. The first switch strips the outer native VLAN tag on the trunk, and the next switch delivers the frame into the VLAN named by the inner tag. It only works one way and only when an access port shares the native VLAN.

Should I tag the native VLAN?

Where both ends support it and nothing on the trunk depends on untagged traffic, yes. Tagging the native VLAN means a trunk carries no untagged data frames, which defeats double tagging. Enable it on both ends at once.