Consider the following example in which an S-VLAN interface is configured with an S-VLAN ID of 4 and the C-VLAN tag as any. Only packets that are double tagged, which contain both the S-VLAN and C-VLAN tags, are matched for this S-VLAN subinterface. Packets that are only S-VLAN tagged and do not contain a C-VLAN tag are not matched for the S-VLAN subinterface.
host1(config)#interface fastEthernet 2/0 host1(config-if)#encapsulation vlan host1(config-if)#interface fastEthernet 2/0.1 host1(config-if)#svlan id 4 any host1(config-if)#svlan ethertype 8100
The following are the limitations in this setup when the user at the CE-side tags all the packets from the CE-side, including C-VLAN tagged or untagged packets, with an S-VLAN ID to identify a particular user:
To enable Ethernet raw mode encapsulation and to enable the S-VLAN subinterface to remove or add the S-VLAN tag at the PE-facing routers in the first scenario, two pseudowires need to be created. Figure 1 illustrates such a scenario in which a sending CE device and a receiving CE device are connected using PE routers through a MPLS network.
Figure 1: Martini Circuit with Two Pseudowires Between PE-Facing Routers

Two customer premise equipment (CPE)-facing interfaces send a packet each to the local CE device, CE1. The Ethernet packet is tagged with both an S-VLAN ID and a C-VLAN ID from CPE1, while the packet from CPE2 contains only the S-VLAN ID. These packets are forwarded to the local PE-router, PE1. In this case, two pseudowires are required for the two conditions. Configuring the C-VLAN ID as 0 by using the anyUntagged keyword in the svlan id svlanIDValue command enables both double-tagged and single-tagged traffic that matches the S-VLAN ID to pass through the S-VLAN subinterface. Using such a configuration, you need to create only one pseudowire and only one S-VLAN subinterface on PE routers.
If an S-VLAN subinterface is configured with Ethertype as 0x8100 and C-VLAN ID as any, a VLAN subinterface for the same ID shall cannot be configured, and vice-versa. For example, you cannot configure the following two commands simultaneously:
host1(config-if)#svlan id X any host1(config-if)#svlan ethertype 8100
and
host1(config-if)#vlan id X
If you configure such a setting, the set of commands that is configured first takes precedence. Consider the following two cases with this configuration:
If the S-VLAN subinterface is configured with any value other than an Ethertype 8100, both S-VLAN and VLAN interfaces for the same ID can be configured together as listed earlier. In such cases, the packets are expected to arrive with an S-VLAN ID other than 0x8100 and the C-VLAN Ethertype as 0x8100, which helps to uniquely identify the subinterface for all the following traffic patterns:
The following set of commands generates in appropriate error messages when you attempt to configure them on a VLAN major interface:
host1(config-if)#interface fastEthernet 1/1.1 host1(config-if)#svlan id X anyUntagged host1(config-if)#svlan Ethertype 0x8100 host1(config-if)#interface fastEthernet 1/1.2 host1(config-if)#vlan id X
where X represents a valid V-LAN ID.
The following examples are valid configurations on a VLAN major interface:
host1(config-if)#interface fastEthernet 1/1.1 host1(config-if)#svlan id X anyUntagged host1(config-if)#svlan Ethertype 0x8100 host1(config-if)#interface fastEthernet 1/1.2 host1(config-if)#vlan id Y host1(config-if)#interface fastEthernet 1/1.3 host1(config-if)#svlan id X X
where the V-LAN ID value, X, is not the same as Y.