Layer 2 selective QinQ is an extension of QinQ tunneling but is more flexible. The major difference is as follows:
QinQ tunneling adds the same outer tag to the frames that enter a QinQ interface.
Layer 2 selective QinQ adds distinctive outer tags to the frames that enter a QinQ interface according to inner tags.
On the network shown in Figure 1, Company 1 and Company 2 have more than one branch.
VLAN 2 to VLAN 500 are used on the networks of Company 1.
VLAN 501 to VLAN 4094 are used on the networks of Company 2.
Interface 1 on PE1 both receives packets from VLANs of Company 1 and Company 2.
To allow branches to communicate within Company 1 or Company 2 but not between the two companies, configure Layer 2 selective QinQ on PE1 and PE2.
Table 1 shows the planning of outer VLAN tags in the packets entering different interfaces on PE1 and PE2.
Interface 3 on PE1 or PE2 allows the packets tagged with VLAN 20 to pass.