QinQ tunneling increases the number of VLANs by adding a same outer VLAN tag to tagged packets that enter the same interface.
On the network shown in Figure 1, Company 1 has two branches which are connected to PE1, and Company 2 has three branches. Two of them are connected to PE2, and the third one is connected to PE1. Company 1 and Company 2 can plan their own VLANs.
To allow branches to communicate within Company 1 or Company 2 but not between the two companies, configure QinQ tunneling on PE1 and PE2. The configuration roadmap is as follows:
On PE1, user packets entering Port 1 and Port 3 are encapsulated with an outer VLAN tag 10, and user packets entering Port 2 are encapsulated with an outer VLAN tag 20.
On PE2, user packets entering Port 1 and Port 2 are encapsulated with an outer VLAN tag 20.
Port 4 on PE1 and Port 3 on PE2 allow the packets tagged with VLAN 20 to pass.
Table 1 shows planning of outer VLAN tags of Company 1 and Company 2.