-
-
Save beardicus/1415a09537b28681f46e to your computer and use it in GitHub Desktop.
| # | |
| # fair-queue based settings for EdgeRouter Lite traffic shaping | |
| # | |
| # download is typically 30 and change. everything can burst to 100% | |
| # of bandwidth, priority rules keep the garbage in check | |
| set traffic-policy shaper download | |
| set traffic-policy shaper download bandwidth 30Mbit | |
| # set default download priority | |
| set traffic-policy shaper download default bandwidth 70% | |
| set traffic-policy shaper download default ceiling 100% | |
| set traffic-policy shaper download default priority 3 | |
| set traffic-policy shaper download default queue-type fair-queue | |
| # megasuper priority dns and ssh and icmp | |
| set traffic-policy shaper download class 10 bandwidth 10% | |
| set traffic-policy shaper download class 10 ceiling 100% | |
| set traffic-policy shaper download class 10 priority 5 | |
| set traffic-policy shaper download class 10 queue-type fair-queue | |
| set traffic-policy shaper download class 10 match icmp ip protocol icmp | |
| set traffic-policy shaper download class 10 match ssh ip source port 22 | |
| set traffic-policy shaper download class 10 match dns ip source port 53 | |
| # semipriority http and https | |
| set traffic-policy shaper download class 20 bandwidth 10% | |
| set traffic-policy shaper download class 20 ceiling 100% | |
| set traffic-policy shaper download class 20 priority 4 | |
| set traffic-policy shaper download class 20 queue-type fair-queue | |
| set traffic-policy shaper download class 20 match http ip source port 80 | |
| set traffic-policy shaper download class 20 match https ip source port 443 | |
| # garbage bittorrent | |
| set traffic-policy shaper download class 30 bandwidth 10% | |
| set traffic-policy shaper download class 30 ceiling 100% | |
| set traffic-policy shaper download class 30 priority 1 | |
| set traffic-policy shaper download class 30 queue-type fair-queue | |
| # FIXME: no port ranges in QOS rules. | |
| # instead, mark packets in a firewall rule and match on that | |
| #set traffic-policy shaper download class 30 match bittorrent ip source port 6881-6889 | |
| set traffic-policy shaper download class 30 match transmission ip source port 51413 | |
| set interfaces ethernet eth1 traffic-policy out download | |
| # upload is typically 5.5-ish. should be clamped at less than 100% | |
| # of advertised bandwidth to avoid buffer bloat and lag | |
| set traffic-policy shaper upload | |
| set traffic-policy shaper upload bandwidth 5Mbit | |
| # high priority, interactive, ssh, dns, icmp | |
| set traffic-policy shaper upload class 2 bandwidth 10% | |
| set traffic-policy shaper upload class 2 ceiling 100% | |
| set traffic-policy shaper upload class 2 priority 5 | |
| set traffic-policy shaper upload class 2 queue-type fair-queue | |
| set traffic-policy shaper upload class 2 queue-limit 16 | |
| set traffic-policy shaper upload class 2 match icmp ip protocol icmp | |
| set traffic-policy shaper upload class 2 match ssh ip destination port 22 | |
| set traffic-policy shaper upload class 2 match dns ip destination port 53 | |
| # high priority but not quite so much, http, https | |
| set traffic-policy shaper upload class 5 bandwidth 10% | |
| set traffic-policy shaper upload class 5 ceiling 100% | |
| set traffic-policy shaper upload class 5 priority 4 | |
| set traffic-policy shaper upload class 5 queue-type fair-queue | |
| set traffic-policy shaper upload class 5 match http ip destination port 80 | |
| set traffic-policy shaper upload class 5 match https ip destination port 443 | |
| # everything else is middle-of-the-road priority | |
| set traffic-policy shaper upload default bandwidth 60% | |
| set traffic-policy shaper upload default ceiling 100% | |
| set traffic-policy shaper upload default priority 3 | |
| set traffic-policy shaper upload default queue-type fair-queue | |
| # crashplan traffic only, set DSCP to 32 in crashplan, matches 8 here (?) | |
| set traffic-policy shaper upload class 10 bandwidth 10% | |
| set traffic-policy shaper upload class 10 ceiling 100% | |
| set traffic-policy shaper upload class 10 priority 2 | |
| set traffic-policy shaper upload class 10 queue-type fair-queue | |
| set traffic-policy shaper upload class 10 match crashplan ip dscp 8 | |
| # bulk, bittorrent from transmission client on default port | |
| set traffic-policy shaper upload class 20 bandwidth 10% | |
| set traffic-policy shaper upload class 20 ceiling 100% | |
| set traffic-policy shaper upload class 20 priority 1 | |
| set traffic-policy shaper upload class 20 queue-type fair-queue | |
| set traffic-policy shaper upload class 20 match bittorrent ip source port 51413 | |
| set interfaces ethernet eth0 traffic-policy out upload |
So these QoS settings gave me an excellent example to copy and make sense of for my VyOS box (the config translates over 1-to-1; copy and paste). Suddenly QoS makes sense. Thank you.
The lower the priority number, the higher the priority. The default priority value is 0, the highest priority
https://docs.vyos.io/en/latest/configuration/trafficpolicy/index.html
(command line of edgeos 3.0.1 says the same)
The lower the priority number, the higher the priority. The default priority value is 0, the highest priority
https://docs.vyos.io/en/latest/configuration/trafficpolicy/index.html(command line of edgeos 3.0.1 says the same)
Looks like the docs were wrong when I set this up: https://forum.vyos.io/t/error-in-vyos-qos-documentation-incl-the-old-vyatta-6-x-docs/5257
Seemed to work for me, but maybe it was just the bandwidth restrictions that helped. Yikes!
Hmm, no example for firewall marking? :-(