VLAN hopping
termKept in this browser · My desk
Sending traffic into a VLAN that the sender's switch port does not belong to, without passing through a router, by abusing trunk negotiation (switch spoofing) or the untagged native VLAN of a trunk (double tagging).
Switch spoofing makes a port left in a negotiating mode, Cisco's default dynamic auto, form a trunk with a host that speaks the Dynamic Trunking Protocol; the host then reaches every VLAN the trunk carries, in both directions. Double tagging needs only an access port in the trunk's native VLAN and works one way. Both were tested by Cisco and @stake in 2002 and implemented in the Yersinia framework in 2005.
What it is. VLAN hopping is sending traffic into a VLAN (virtual local area network) that the sender's switch port does not belong to, without passing through a router or firewall. It matters because VLANs are routinely used as security boundaries, a guest network on one VLAN and payment terminals on another, and a hop crosses that boundary at layer 2, below every filter applied at the routed interface. The techniques abuse trunk negotiation (switch spoofing), the untagged native VLAN of a trunk (double tagging) or the trust a switch gives to tagged frames on a port meant for one VLAN.
The tag being abused. An 802.1Q tag is four bytes inserted after the source address: the Tag Protocol Identifier 0x8100, which IANA (Internet Assigned Numbers Authority) lists as the Customer VLAN Tag Type, then a 16-bit field holding a 3-bit priority code point, a drop eligible indicator and a 12-bit VLAN identifier whose usable values run from 1 to 4094 (the IEEE (Institute of Electrical and Electronics Engineers) types model forbids 0 and 4095 as VLAN indices). A trunk carries many VLANs by tagging each frame; an access port carries one and expects untagged frames. Every hop technique is a way of getting a tag the attacker chose honoured by a switch that should have rejected it.
The early record. The National Vulnerability Database (NVD) record CVE-1999-1129, published on 1 September 1999, states the problem in its first form: Cisco Catalyst 2900 VLAN switches let remote attackers inject 802.1Q frames into another VLAN by forging the VLAN identifier in the trunking tag. Sean Convery's Black Hat USA 2002 slides, reporting Cisco and @stake tests, note that a SANS paper on the subject was already two years old. They describe the basic attack (a station spoofs a switch with ISL (Inter-Switch Link) or 802.1Q signalling, usually with DTP (Dynamic Trunking Protocol) as well, and becomes a member of all VLANs, if the port's setting favours trunking) and the double-encapsulated one (the switch performs only one level of decapsulation, traffic flows one way only, it requires the trunk to share the attacker's native VLAN, and it works even if trunking is set to off). CVE-2005-4440 (21 December 2005) records double tagging as demonstrated by the Yersinia framework, which S21sec's David Barroso and Alfredo Andrés presented at Black Hat Europe 2005 together with DTP, STP (Spanning Tree Protocol) and VTP (VLAN Trunking Protocol) attacks.
Switch spoofing, worked. A port left in a negotiating mode, Cisco's default dynamic auto, forms a trunk with a host that speaks DTP; the Catalyst 9300 guide confirms dynamic auto as the default and states that a trunk carries all VLANs, 1 to 4094, by default. A host that sends DTP announcing itself as desirable therefore receives a trunk, configures tagged subinterfaces for VLAN 10, 20 and 30, and talks to each directly, in both directions, as if it were a switch. Nothing in the attack is malformed: the switch is doing what its default configuration allows.
Double tagging, in one line. A host in the trunk's native VLAN sends a frame with two tags; the first switch strips the outer one when it forwards the frame untagged on the native VLAN, and the next switch reads the inner tag and delivers the frame into the victim VLAN. Cisco's 2008 campus design guide calls it a remote possibility that needs the native VLAN identifier and carries traffic in one direction only; the IEEE editor's 2022 note explains why it works, since a bridge can remove a tag but does not double tag and does not look beyond the tag it reads.
Other doors. Voice VLANs are a legitimate tagged path into an access port, and VoIP Hopper (version 2.0 released on 15 August 2011, after DEF CON 19) shows the abuse: it imitates an IP phone's discovery, LLDP-MED (Link Layer Discovery Protocol, Media Endpoint Discovery) or DHCP (Dynamic Host Configuration Protocol) options, to learn and join the voice VLAN. And the IEEE 802.1Q management model's own defaults, ports that admit all frames and ingress filtering off, are the permissive ones, so access ports deserve checking: a port that accepts any tag behaves like the 1999 Catalyst.
The fixes are configuration. Fix host ports as access ports with negotiation off, fix trunks as trunks with negotiation off and an explicit list of allowed VLANs, give each trunk a native VLAN that no access port uses or tag the native VLAN, keep VLAN 1 out of user traffic, and park unused ports in an unused, disabled VLAN; the 2022 network infrastructure guidance of the National Security Agency (NSA), sections 9.1 to 9.3 with switchport trunk native vlan 500 as its example, and the Cisco switch STIG (Security Technical Implementation Guide) finding V-220646 of the Defense Information Systems Agency (DISA) require exactly these. Convery's slides gave the same list in 2002, with a reminder that defaults change between platforms, so the operational mode should be checked with show interface switchport rather than assumed.
Limits and neighbours. Voice VLANs and priority-tagged frames are the legitimate tags on access ports, and the 2022 VLAN 0 bypass (CERT Coordination Center note VU#855201) shows why an allow-list of frame types matters: a frame tagged with VLAN 0 does not hop, but it can slip past ARP (Address Resolution Protocol) inspection and RA (Router Advertisement) guard on its way to a host that strips the tag. A hop is not a routing failure either: inter-VLAN traffic that passes through a router or firewall is policy, and policy is where the boundary should be enforced. Neighbours: double tagging, DTP, priority tag, native VLAN, trunk port, 802.1Q, port security and 802.1X.
Also known as: vlan hopping, vlan hop, switch spoofing, vlan hopping attack
Sources
- Sean Convery (Cisco Systems), Hacking Layer 2: Fun with Ethernet Switches, Black Hat USA 2002 (read 2026-11-23): Cisco and @stake tests; macof since May 1999 (Ian Vitek, Perl; C port by Dug Song); 155,000 entries a minute filled a 131,052-entry Catalyst 6506 table in 70 seconds; existing entries keep forwarding; port security and its modes; STP root claims, the dual-homed requirement, a gigabit backbone reduced to 10 Mb half duplex; BPDU guard and root guard; DTP switch spoofing and double 802.1Q encapsulation, one-way, needs the trunk's native VLAN; port security does not help against ARP spoofing
- Cisco, VLAN Configuration Guide, IOS XE 17.12.x (Catalyst 9300), Configuring VLAN Trunks, 28 July 2023, read through WebFetch (read 2026-11-23): access, trunk, dynamic auto, dynamic desirable; default dynamic auto; nonegotiate prevents DTP frames; native VLAN 1 by default; all VLANs 1 to 4094 allowed on a trunk
- Cisco, Campus Network for High Availability Design Guide, Cisco Validated Design, 21 May 2008, PDF bytes saved by WebFetch (read 2026-11-23): enable root guard or BPDU guard on access ports; disable trunking on host ports; trunks on with no negotiation; native VLAN on an unused ID or tagged; double 802.1Q encapsulation is one-way and needs the native VLAN ID
- NSA, Network Infrastructure Security Guidance, PP-22-0266, March 2022, AHA-hosted copy (read 2026-11-23): section 9.1 disable dynamic trunking, an adversary on a dynamic port could make it a trunk; section 9.3 default VLAN disallowed, unique native VLAN on trunks, unused disabled VLANs
- DISA, Cisco IOS Switch L2S STIG, finding V-220646 (guide dated 2026-05-01), stigviewer.com (read 2026-11-23): native VLAN other than the default on every 802.1q trunk; tagging native traffic as the alternative; the double-tagging mechanism described
- David Barroso and Alfredo Andrés (S21sec), Yersinia: Framework for layer 2 attacks, Black Hat Europe 2005, PDF at Dartmouth (read 2026-11-23): STP, CDP, DTP, DHCP, HSRP, 802.1Q and VTP; STP has no authentication; DTP mitigation: all ports DTP off
- NIST National Vulnerability Database (NVD), CVE-1999-1129, record through the NVD API (read 2026-11-23): Cisco Catalyst 2900 VLAN switches allow remote attackers to inject 802.1Q frames into another VLAN by forging the VLAN identifier in the trunking tag; published 1 September 1999
- NIST National Vulnerability Database (NVD), CVE-2005-4440, record through the NVD API (read 2026-11-23): the 802.1Q VLAN protocol lets attackers bypass segmentation with a message carrying two 802.1Q tags, the second acted on by a downstream switch after the first is stripped, as demonstrated by Yersinia, the double-tagging VLAN jumping attack; published 21 December 2005
- IANA, IEEE 802 Numbers registry (read 2026-11-23): EtherTypes 0x0800 IPv4, 0x0806 ARP, 0x8100 Customer VLAN Tag Type (C-Tag, formerly called the Q-Tag), 0x88A8 Service VLAN tag (S-Tag), 0x86DD IPv6
- IEEE 802.1, ieee802-dot1q-types YANG module (read 2026-11-23): priority code point 3 bits, VLAN identifier 12 bits, usable range 1 to 4094; 0 and 4095 not permitted as VLAN indices
- Mick Seaman, Using VLAN Tags to convey priority, IEEE P802.1Q-Rev editor's note, 19 January 2022 (read 2026-11-23): every received frame is classified to a VID; VID 0 is not a valid PVID; bridges do not transmit priority-tagged frames, do not double tag and do not look beyond a C-VLAN tag
- VoIP Hopper project page, SourceForge (read 2026-11-23): a GPLv3 tool, written in C, that runs a VLAN hop security test into a voice VLAN by imitating an IP phone (LLDP-MED spoofing, DHCP options, the phone's MAC address) to discover and join the voice VLAN; version 2.0 released 15 August 2011 after DEF CON 19, 2.04 on 26 April 2012
- IEEE 802.1, ieee802-dot1q-bridge YANG module, revision 2023-10-26 (read 2026-11-23): PVID default 1; acceptable frame types admit-only-VLAN-tagged-frames, admit-only-untagged-and-priority-tagged and admit-all-frames, the default; enable-ingress-filtering default false