14 QINQ CONFIGURATIONWhen configuring QinQ, go to these sections for information you are interestedin:■ “Introduction to QinQ” on page 133■ “Configuring Basic QinQ” on page 135■ “Configuring Selective QinQ” on page 136■ “Configuring the TPID Value to Be Carried in VLAN Tags” on page 137■ “QinQ Configuration Example” on page 137Introduction to QinQUnderstanding QinQ In the VLAN tag field defined in IEEE 802.1Q, only 12 bits are used for VLAN IDs,so a switch can support a maximum of 4,094 VLANs. In actual applications,however, a large number of VLANs are required to isolate users, especially inmetropolitan area networks (MANs), and 4,094 VLANs are far from satisfying suchrequirements.The port QinQ feature is a flexible, easy-to-implement Layer 2 VPN technique,which enables the access point to encapsulate an outer VLAN tag in Ethernetframes from customer networks (private networks), so that the Ethernet frameswill travel across the service provider’s backbone network (public network) withdouble VLAN tags. The inner VLAN tag is the customer network VLAN tag whilethe outer one is the VLAN tag assigned by the service provider to the customer. Inthe public network, frames are forwarded based on the outer VLAN tag only, withthe source MAC address learned as a MAC address table entry for the VLANindicated by the outer tag, while the customer network VLAN tag is transmitted aspart of the data in the frames.Figure 39 shows the structure of 802.1Q-tagged and double-tagged Ethernetframes. The QinQ feature enables a device to support up to 4,094 x 4,094 VLANsto satisfy the requirement for the amount of VLANs in the MAN.