In Traffic Policy you configure traffic classes by defining some kind of matching criteria. One of those criteria can be VLAN ID. I have found several possible commands in VyOS CLI that could do the job (I am not sure what the differences of these commands should be) but in my tests none of them matched traffic by VLAN ID.
In my lab, traffic tagged with VLAN ID 40 was coming into eth1 interface.
set interfaces ethernet eth0 description 'WAN' set interfaces ethernet eth0 address '20.20.20.1/24' set interfaces ethernet eth1 description 'LAN' set interfaces ethernet eth1 address '192.168.10.254/24' set interfaces ethernet eth1 address '192.168.20.254/24' set interfaces ethernet eth1 vif 40 address '192.168.40.254/24' set protocols static interface-route 192.168.0.0/16 next-hop-interface eth1 set protocols static route 20.20.20.0/24 next-hop 20.20.20.20 set traffic-policy shaper ASDF bandwidth '100kbps' set traffic-policy shaper ASDF class 40 bandwidth '40%' set traffic-policy shaper ASDF default bandwidth '2%' set interfaces ethernet eth0 traffic-policy out 'ASDF'
Having the configuration above, none of the following 3 commands (nor any of their combinations) matched VLAN40 traffic:
set traffic-policy shaper ASDF class 40 match VLAN-MATCH interface 'eth1.40'
set traffic-policy shaper ASDF class 40 match VLAN-MATCH vif 40
set traffic-policy shaper ASDF class 40 match VLAN-MATCH ether protocol '802.1Q'
Tests done with both 1.2 and 1.3 versions, no difference.