FREE SHIPPING on Orders Over US$79
United States

QinQ vs VLAN vs VXLAN: A Comprehensive Introduction of Switch Functions

SheldonDec 20, 20211 min read

Overview of VLAN, VXLAN and QinQ
VLAN
VLAN is a technology to segment network into several broadcast domains. In each broadcast domain, users can communicate with each other freely. As for connections between different VLANs, VLAN tagging and inter-VLAN routing are two necessary terms that users must know. VLAN tagging is to add a special tag into the frame when it passes through the VLAN trunk port which allows frames from different VLANs to cross. And one of its VLAN tagging methods is IEEE 802.1Q. In CLI and Web user interface of switches, VLAN configuration is simple and easy.
QinQ
QinQ, also known as VLAN stacking or double VLAN, is standardized by IEEE 802.1ad. It encapsulated the VLAN tag with two layers (double tagging)—an inner tag of a private network and an outer tag of the public network. As there are increasing users in networks, which require large numbers of VLAN IDs. The traditional VLAN tagging that uses IEEE 802.1Q is unable to identify and isolate users’ data on expanding metro Ethernet works. Therefore, QinQ is used to extend the VLAN numbers up to 4096×4096, which can save public VLAN IDs effectively.
There are two kinds of QinQ implementations, basic QinQ and selective QinQ. Basic QinQ is a tagging method based on a port which will default tag all packets. Selective QinQ can identify the inner VLAN tag according to the MAC address, IP protocol, etc., and then determine which tag it should be added.
VXLAN
VXLAN, also called virtual extensible LAN , is designed to provide layer 2 overlay networks on top of a layer 3 network by using MAC address-in-user datagram protocol (MAC-in-UDP) encapsulation. In simple terms, VXLAN switches can offer the same services as VLAN switches does, but with greater network scalability and flexibility. Similar to QinQ, VXLAN has a relatively fixed packet format too. With VXLAN MAC-in-UDP encapsulation, the original packets will be added on a VXLAN header and then placed in an UDP-IP packet.
The Differences Between QinQ, VLAN and VXLAN
VLANs have been used to solve different problems like Layer 2 network isolation, flood and as routing interface. VLAN configuration is now available in most systems and network equipment such as Ethernet switches, routers and firewalls. However, the following comparison mainly focuses on VLAN tagging. To realize communication between different VLANs in networking, VLAN tagging is an essential part.
As has mentioned above, VLAN tagging uses the network protocol IEEE 802.1Q or ISL (Inter-Switch Link) to tag frames flowing through different VLANs. Frames that are tagged with this method have only one tag. However, QinQ VLAN switches is more flexible than VLAN switches. On one hand, it can add tags to the incoming frames or packets selectively. On the other hand, the outer VLAN tag solves the problem of limited VLAN IDs. And the unique inner tag avoids conflict between the private VLAN IDs and the public VLAN IDs, providing a simple layer 2 VPN solution for small-scale or large enterprise networks.
When it comes to VXLAN, it offers the same functions as QinQ in some degree, but its working layer is more extensible. VXLAN encapsulates packets by MAC-in-UDP, extending layer 2 networks greatly. As we know, with the advancement of cloud computing, tenants have more demanding requirements for network builds, especially for the virtualized data center, which enhances the need for layer 2 networks. MAC-in-UDP supports the use of 24-bit VINDs, which allows a data center to accommodate multiple tenants, breaking the physical distance and deployment restriction. That’s why VXLAN is becoming more popular in cloud computing and virtualized data center in recent years. However, compare to VLAN and QinQ, VXLAN technology is more expensive and complicated.
To better understand the differences between QinQ, VLAN, and VXLAN, the following table offers a simple comparison to help choose the appropriate technology for different scenarios.
Feature / Technology
VLAN
QinQ
VXLAN
Tag Type
Single 802.1Q tag
Double 802.1Q tags (S-Tag + C-Tag)
VXLAN Network Identifier
(VNI, UDP encapsulation)
VLAN Scalability
Up to 4,096 VLANs
Extended VLAN space
Up to 16 million VNIs
Typical Use Case
Enterprise campus networks
ISP / Metro Ethernet / Multi-tenant networks
Data centers / cloud networks
Network Layer
Layer 2
Layer 2
Layer 2 over Layer 3
Encapsulation Overhead
Low
Medium
Higher (UDP encapsulation)
Configuration Complexity
Low
Medium
High
Ideal Network Size
Small to medium
Medium to large
Large-scale, cloud-scale
From the comparison above, it’s clear that different technologies place different requirements on switching hardware. To support these scenarios, FS Enterprise Switches are designed to provide flexible VLAN, QinQ, and VXLAN features, enabling seamless scalability from campus networks to cloud infrastructures.
Frequently Asked Questions About QinQ, VLAN and VXLAN
When comparing QinQ, VLAN, and VXLAN, the real challenge is often deciding which technology fits a specific network scenario. The FAQs below highlight the key questions that typically come up during network design and equipment selection.
Q1: What is the main difference between QinQ and VLAN?
A: The main difference lies in scalability. VLAN uses a single IEEE 802.1Q tag and is limited to around 4,000 VLANs, while QinQ adds a second tag, allowing service providers or large networks to carry multiple customer VLANs over the same infrastructure.
Q2: When should I use QinQ instead of a standard VLAN?
A: QinQ is typically used when VLAN scalability becomes a limitation, especially in service provider, campus aggregation, or multi-tenant environments where multiple customer VLANs need to be preserved across a shared network.
Q3: Is VXLAN a replacement for VLAN or QinQ?
A: VXLAN is not a direct replacement. It is an overlay technology designed to extend Layer 2 networks over a Layer 3 infrastructure, primarily to overcome VLAN scalability limitations in large-scale data center and cloud environments.
Q4: What type of switch is required for VXLAN deployment?
A: VXLAN deployments usually rely on high-performance Layer 3 switches designed for data center or cloud environments, where hardware-based VXLAN encapsulation and decapsulation are required to maintain performance at scale.
Q5: How should I choose between VLAN, QinQ, and VXLAN?
A: The choice depends on network size and complexity. VLAN is suitable for small to medium networks, QinQ fits large Layer 2 or multi-tenant environments, and VXLAN is ideal for highly scalable data center and cloud architectures.
Conclusion
Network segmentation is no longer a one-size-fits-all problem. VLAN, QinQ, and VXLAN represent different approaches to network segmentation as networks grow in size and complexity. Rather than competing solutions, they form a progression—from simple Layer 2 segmentation, to large-scale VLAN extension, and finally to overlay-based virtualization for cloud-scale environments.
Rather than replacing one another, these technologies coexist to serve different network sizes, architectures, and operational requirements, and understanding their application scenarios helps build scalable, future-ready networks—while professional guidance and high-performance switch solutions are available at FS.COM.