newbie here with a very similar question to one that was posted a couple of years back ... only slightly different (so, as the original question was asked so perfectly, I've copied it nearly verbatim and just edited it slightly ... terribly lazy I know!)
How do I tell Juniper EX4200 to push specific S-VLAN based on C-VLAN on q-in-q (dot1q-tunneling) port?
For instance I want to instruct EX4200 to perform Q-in-Q using these rules:
1) If a single-tag frame is received on ge-0/0/0 with C-VLAN=41, DO NOT PUSH S-VLAN*
2) If a single-tag frame is received on ge-0/0/0 with C-VLAN=42, push S-VLAN=5.
3) If a single-tag frame is received on ge-0/0/0 with C-VLAN=51, push S-VLAN=5.
4) If a single-tag frame is received on ge-0/0/0 with C-VLAN=52, push S-VLAN=5.
Conversely, whenever a double-tag frame is to be sent out on ge-0/0/0, the outer S-VLAN ought to be removed (popped).
"DO NOT PUSH S-VLAN" means "leave as a single tagged frame with vlan-id 41 as the only tag"
Can this be done on a Juniper EX4200? If so, please point out the specific configuration commands.