Port-Specific Tags in L2VPN

You can assign a VLAN (Virtual LAN) with port specific tag to VPLS/VPWS using the configure vpls vsi add service vlan vl command. Because this is a single VLAN, the base VID is used when dot1q include is enable. For example, when VLAN 100 that has ports on Ethernet port 1 with port tag 10 and 11 is assigned to L2VPN, the tag that is carried by the pseudo wire is 100. The configuration for this example is as follows:
create vlan exchange tag 100
config vlan exchange add ports 1 tagged 10
config vlan exchange add ports 1 tagged 11
config vpls vsi1 add service vlan exchange
Similarly, the following is an example for VPWS. There can only be a single VLAN port in the VLAN for assignment to VPWS to be successful:
create vlan exchange tag 100
config vlan exchange add ports 1 tagged 10
config l2vpn vpws pw1 add service vlan exchange

VLAN Port State

VLAN port state is the same as the state of the Ethernet port.

ACLs

You can use the existing match vlan-id ACL (Access Control List) to accomplish counting and metering. You can assign the ACL to both ingress and egress port. The followings are the examples of such configuration. The port 3 tag is 4 and the port 4 tag is 5. These ACLs will match the frame vlan-ID, and the vlan-ID specified in the match criteria is independent of the port tag.
Content of acl.pol
entry tag_1 { 
   if {    
     vlan-id 4; 
     } then {    
       packet-count tag_1_num_frames;    
       meter tag_1_meter; 
     }
} 
entry tag_2 { 
   if {    
     vlan-id 5; 
     } then {    
       byte-count tag_2_num_bytes;    
       meter tag_2_meter; 
     }
} 
Content of acl_egress.pol
entry tag_1_egr { 
   if {    
     vlan-id 4; 
     } then {    
       packet-count tag_1_egr_num_frames;    
       meter tag_1_egr_meter; 
     }
} 
entry tag_2_egr { 
   if {    
     vlan-id 5; 
     } then {    
       byte-count tag_2_egr_num_bytes;    
       meter tag_2_egr_meter; 
     }
}