QoS by Subnet?

Hi All:

A little background into my setup - I have two interfaces on my VyOS installation (WAN/LAN). We have a guest wireless network that I’d like to limit bandwidth to that it on a different subnet than our “normal” legitimate traffic. Both of these networks enter VyOS on the same interface. I’ve seen examples of using VyOS to limit bandwidth by interface - can I limit bandwidth using QoS rules by subnet instead? Thanks!

Just wanted to update this thread for anyone else who may be trying to do this. You simply need to create class matches inside the traffic-policy tree, like this example below. In this example, we have a 900mbit pipe, and we’re limiting the 10.170.0.1/16 subnet to 200mbit.

traffic-policy { shaper DOWNLOAD-POLICY { bandwidth 900mbit class 2 { bandwidth 200mbit burst 15k ceiling 200mbit match NETADMIN { ip { destination { address 10.170.0.1/16 } } } queue-type fair-queue } default { bandwidth 900mbit burst 15k queue-type fair-queue } }