summaryrefslogtreecommitdiff
path: root/docs/qos.rst
diff options
context:
space:
mode:
authorKim <kim.sidney@gmail.com>2019-03-05 21:38:31 +0100
committerGitHub <noreply@github.com>2019-03-05 21:38:31 +0100
commit650fcb9ec61df80af97d871ebaa9799c99fd0354 (patch)
treeea142bd6378606bd33170891cf0dc111509791f9 /docs/qos.rst
parentff91f9de2e4ee89cbbea195daaa261416fdf09e8 (diff)
parentb8eb1d61d2328c98d4e7015f9b5b69137e3f6558 (diff)
downloadvyos-documentation-650fcb9ec61df80af97d871ebaa9799c99fd0354.tar.gz
vyos-documentation-650fcb9ec61df80af97d871ebaa9799c99fd0354.zip
Merge pull request #12 from hlmtre/patch-1
Update qos.rst; add general example
Diffstat (limited to 'docs/qos.rst')
-rw-r--r--docs/qos.rst62
1 files changed, 62 insertions, 0 deletions
diff --git a/docs/qos.rst b/docs/qos.rst
index d3ec2271..672adaa5 100644
--- a/docs/qos.rst
+++ b/docs/qos.rst
@@ -53,6 +53,68 @@ Once a traffic-policy is created, you can apply it to an interface :
set interfaces ethernet eth0 traffic-policy in WAN-IN
set interfaces etherhet eth0 traffic-policy out WAN-OUT
+
+A Real-World Example
+^^^^^^^^^^^^^^^^^^^^
+
+This policy sets download and upload bandwidth maximums (roughly 90% of the speeds possible), then divvies
+up the traffic into buckets of importance, giving guaranteed bandwidth chunks to types of
+traffic that are necessary for general interactive internet use, like web browsing, streaming, or gaming.
+
+After identifying and prioritizing that traffic, it drops the remaining traffic into a general-priority
+bucket, which it gives a lower priority than what is required for real-time use. If there is no real-time
+traffic that needs the bandwidth, the lower-priority traffic can use most of the connection. This ensures
+that the connection can be used fully by whatever wants it, without suffocating real-time traffic or
+throttling background traffic too much.
+
+.. code-block:: sh
+
+ set traffic-policy shaper download bandwidth '175mbit'
+ set traffic-policy shaper download class 10 bandwidth '10%'
+ set traffic-policy shaper download class 10 burst '15k'
+ set traffic-policy shaper download class 10 ceiling '100%'
+ set traffic-policy shaper download class 10 match dns ip source port '53'
+ 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 priority '5'
+ set traffic-policy shaper download class 10 queue-type 'fair-queue'
+ set traffic-policy shaper download class 20 bandwidth '10%'
+ set traffic-policy shaper download class 20 burst '15k'
+ set traffic-policy shaper download class 20 ceiling '100%'
+ 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'
+ 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 default bandwidth '70%'
+ set traffic-policy shaper download default burst '15k'
+ 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'
+ set traffic-policy shaper upload bandwidth '18mbit'
+ set traffic-policy shaper upload class 2 bandwidth '10%'
+ set traffic-policy shaper upload class 2 burst '15k'
+ set traffic-policy shaper upload class 2 ceiling '100%'
+ set traffic-policy shaper upload class 2 match ack ip tcp ack
+ set traffic-policy shaper upload class 2 match dns ip destination port '53'
+ 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 syn ip tcp syn
+ set traffic-policy shaper upload class 2 priority '5'
+ set traffic-policy shaper upload class 2 queue-limit '16'
+ set traffic-policy shaper upload class 2 queue-type 'fair-queue'
+ set traffic-policy shaper upload class 5 bandwidth '10%'
+ set traffic-policy shaper upload class 5 burst '15k'
+ set traffic-policy shaper upload class 5 ceiling '100%'
+ 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'
+ 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 default bandwidth '60%'
+ set traffic-policy shaper upload default burst '15k'
+ 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'
+
Traffic policies in VyOS
------------------------