Key Takeaways
- A double tagging attack is a VLAN hopping technique where an attacker sends a frame with two 802.1Q tags to bypass VLAN isolation.
- The first tag matches the trunk port’s native VLAN, while the second tag identifies the VLAN the attacker is trying to reach.
- Prevention requires moving each trunk's native VLAN to an unused VLAN ID, keeping hosts off VLAN 1, and tagging native VLAN traffic where the switch supports it.
VLAN hopping attacks are a persistent threat in enterprise networks that rely on IEEE 802.1Q tagging for network segmentation.
When an attacker successfully executes a double tagging attack, they can bypass the logical barriers designed to separate user groups and send traffic across different VLANs. This vulnerability often stems from misconfigured switch ports or a lack of awareness regarding how Ethernet frames are processed at the network edge.
Without proper mitigation strategies, organizations face risks ranging from lateral movement within their own infrastructure to unauthorized traffic on other VLANs.
This article explains the mechanics behind a double tagging VLAN attack and the configuration changes that can stop it.
What Is a Double Tagging Attack?
A double tagging attack is a type of VLAN hopping attack where an attacker places two IEEE 802.1Q tags on a single Ethernet frame.
Understanding the attack requires knowing what’s inside an 802.1Q tag, since the whole exploit hinges on one specific field getting stripped.
The IEEE 802.1Q tag is 4 bytes and contains several fields that identify and prioritize VLAN traffic:
|
Field |
Size |
Purpose |
|---|---|---|
|
Tag Protocol Identifier (TPID) |
16 bits |
Set to 0x8100, identifies the frame as 802.1Q-tagged traffic |
|
Priority Code Point (PCP) |
3 bits |
Marks the frame’s traffic-priority class |
|
Drop Eligible Indicator (DEI) |
1 bit |
Flags the frame as droppable if the link is congested |
|
VLAN Identifier (VID) |
12 bits |
Identifies the VLAN associated with the tag |
The VID is the field that matters most for double tagging because it identifies the VLAN associated with each tag. The attack takes advantage of how switches handle the outer tag on a double-tagged frame.
Unlike traditional spoofing attacks that attempt to mimic a user's MAC address, double tagging targets the switch port configuration itself.
The double tagging attack succeeds because the switch does not validate whether the inner tag is authorized for the specific physical port receiving the frame. This behavior creates a vulnerability in networks where trunk ports are configured with a native VLAN that permits untagged traffic or allows specific outer tags to pass through without verification.
See your security gap before attackers do.
See continuous trust in action on a platform that includes RADIUS, PKI and AI security.
How a Double Tagging Attack Works
The execution of a double tagging attack requires knowledge of network topology and the configuration of the intermediate switches.
The mechanism relies on the switch's behavior when it receives a frame with more than one VLAN identifier. According to IEEE 802.1Q standards, many switches treat the outermost tag as the primary identifier for ingress processing but may not inspect deeper tags depending on configuration mode.
When the frame arrives on an access port in the trunk's native VLAN, the switch forwards it across the trunk untagged, which removes the outer tag and exposes the inner tag to the next switch.
The attack occurs in the following steps:
- The attacker crafts a double-tagged frame. The frame contains two 802.1Q tags. The outer tag matches the native VLAN configured on the first switch, while the inner tag identifies the target VLAN.
- The first switch processes the outer tag. Because the outer tag corresponds to the native VLAN, the switch removes that tag as it forwards the frame.
- The inner tag remains. The frame now contains the second 802.1Q tag. When the frame reaches the next switch, that switch can process the remaining tag and associate the frame with the target VLAN.
- The frame enters the target VLAN. If the switches are configured in a way that permits this behavior, the attacker can inject traffic into a VLAN they would not normally have access to.
The attack can be executed using standard Linux packet-crafting utilities and is particularly effective in environments where network administrators have not enforced strict port modes.
If a switch port has Dynamic Trunking Protocol (DTP) enabled, it may automatically negotiate a trunk link, converting an access port into a trunk port. Double tagging does not need a negotiated trunk. It works from an ordinary access port whose VLAN matches the native VLAN of the trunk; DTP abuse is a separate technique called switch spoofing.
The success of the attack depends entirely on the absence of validation logic within the switch that checks for tag integrity or validates whether the inner VLAN is permitted for the given port context.
Without such hardening, double tagging lets an attacker inject one-way traffic into VLANs they should not reach; replies are not switched back to the attacker's port.
What Makes Networks Vulnerable to Double Tagging?
The primary configuration weaknesses that can contribute to successful double tagging attacks involve:
- trunk port configuration
- dynamic negotiation
- native VLAN handling
These settings determine how switches process VLAN tags and whether an attacker can exploit the way tagged and untagged traffic is handled.
The table below lists the configuration issues that can increase the risk of VLAN hopping:
|
Configuration Weakness |
Why It Matters |
|---|---|
|
Improper trunk port configuration |
Trunk ports that are not explicitly configured can create unintended access-to-trunk conversions, potentially exposing the network to VLAN hopping attacks. |
|
Dynamic trunk negotiation |
When dynamic negotiation is enabled, switches may automatically negotiate trunk links. This can allow an access port to become a trunk, creating conditions that an attacker may exploit. |
|
Native VLAN configuration |
A native VLAN that permits untagged traffic can create the condition that double tagging exploits. An attacker can use an outer tag matching the native VLAN, so the first switch removes it while the inner tag remains. |
|
Weak port configuration |
Ports that are not explicitly configured for their intended role can increase the attack surface and make VLAN segmentation easier to bypass. |
The risks associated with successful double tagging extend beyond simple connectivity issues.
An attacker can send traffic to systems in other departments, reach sensitive administrative systems, pivot toward core infrastructure, or, in a multi-tenant environment, cross tenant boundaries in violation of compliance requirements.
The attack also blinds monitoring tools that assume traffic stays within its assigned VLAN.
Impacts include unauthorized access to internal resources and one-way traffic injection into segmented zones. In a multi-tenant environment, the ability to hop between VLANs can lead to cross-tenant data exposure, violating isolation guarantees required for compliance standards.
Double tagging attacks demonstrate that network segmentation is only as secure as the weakest link in the physical layer or the configuration of the edge devices.
The security plan that scales with you.
Our solutions can scale from mid-market to global enterprises. Compare options and see how our solutions protect you from costly breaches and ensure peace of mind.
How to Prevent a Double Tagging VLAN Attack
Preventing double tagging starts with removing the native VLAN conditions the attack relies on.
Trunk and access port configurations should be reviewed to ensure native VLAN traffic is properly isolated, unused VLANs are not unnecessarily carried across trunks and ports cannot dynamically assume an unintended role.
The following are some methods to solve the various configuration weaknesses:
- Move the native VLAN off VLAN 1 and real user VLANs: Dedicate an unused VLAN ID to native traffic on every trunk. Because no access port belongs to that VLAN, the switch never forwards an attacker's frame across the trunk untagged, so the outer tag stays on and the inner tag is never exposed.
- Force tagging on the native VLAN: On switch platforms that support it, configuring native VLAN traffic to be tagged removes the implicit handling of native traffic as untagged and reduces the conditions a double-tagging attack relies on.
- Prune unused VLANs from every trunk: Limit each trunk to the VLANs it needs. This reduces the number of VLANs that could potentially be reached if a double-tagged frame passes through.
- Set access ports to access mode explicitly: Explicitly configuring access ports prevents them from dynamically negotiating into a trunk role and reduces the attack surface for switch spoofing.
The mitigation strategies mentioned above do not require new hardware. They require reviewing existing trunk and access port configurations and removing default or unnecessary settings that can increase the risk of VLAN hopping.
Also, network administrators must implement strict port security measures and regularly audit switch configurations to confirm compliance. Automated scanning tools can help identify ports that are misconfigured or vulnerable to such attacks, allowing teams to patch vulnerabilities before they are exploited.
Move Beyond Port-Based Trust
Native VLAN hardening removes the condition double tagging depends on, but it answers a narrower question than the one most security teams have: should this device be on this port at all?
A hardened trunk still assumes the device physically connected to it belongs there. Certificates give that assumption something to verify.
You can think about certificates as a stronger alternative to passwords. It's like a passport that can be locked onto a device that says you should get into the system and you should be authorized this level of access.Micah Spady, Director of Product Marketing at SecureW2
Deployment of 802.1X authentication and Port-Based Network Access Control (PNAC) adds another layer of defense by tying network access to user identity rather than just port configuration.
The IEEE 802.1X standard for port-based network access control requires a device to authenticate before a switch port passes traffic beyond the authentication exchange itself. Under 802.1X, a device must authenticate at its access port before that port forwards any of its traffic, so an unknown device cannot inject a crafted frame in the first place.
JoinNow Cloud RADIUS enforces that 802.1X authentication at every port and assigns each device to its correct VLAN based on a verified identity, rather than relying on a static native VLAN assignment an attacker can probe for gaps.
Certificates issued from a managed public key infrastructure (PKI) remove the other half of the exposure: JoinNow Dynamic PKI replaces shared passwords and static credentials with certificates bound to a specific device, so the identity behind every authenticated port is one an attacker cannot forge with a crafted frame.
Schedule a demo to see how authenticated network access closes the gap that having VLAN segmentation and trunk hardening alone can leave open.
Frequently Asked Questions
How does double tagging work in practice?
Double tagging works by sending an Ethernet frame with two 802.1Q tags where the outer tag matches the native VLAN of a trunk port. The first switch processes the outer tag, strips it and forwards the packet while leaving the inner tag intact.
What is the difference between single tagging and double tagging?
Single tagging uses one 802.1Q header to identify a VLAN, which is the standard method for network segmentation. Double tagging adds a second header on top of the first, allowing the packet to bypass the initial VLAN filter and reach a different segment.
How common are double tagging attacks on modern networks?
Current switches with properly configured native VLANs are generally not vulnerable, while legacy and misconfigured environments remain at risk. The prevalence of such attacks is low in hardened networks but persists where trunk configurations default to dynamic negotiation or unmanaged native VLANs.
Can Q-in-Q (802.1ad) be confused with double tagging attacks?
Q-in-Q, or IEEE 802.1ad provider bridging, intentionally stacks tags to carry multiple customer VLANs over a single link. However, unlike legitimate Q-in-Q, double tagging attacks exploit unvalidated inner tags in unmanaged environments.
Does disabling DTP prevent all VLAN hopping?
Disabling Dynamic Trunking Protocol (DTP) on non-trunk ports prevents automatic trunk conversion, which is a common entry point for switch spoofing. However, it does not stop double tagging, which works from an access port that shares the trunk's native VLAN.
How can I detect if my network is vulnerable to double tagging?
Detection involves scanning for switches with improperly configured native VLANs and verifying that all trunk ports are static. Tools can also be used to craft test packets with multiple tags to simulate an attack without affecting production traffic.