diff options
author | Christian Poessinger <christian@poessinger.com> | 2018-10-05 17:10:22 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2018-10-05 17:10:22 +0200 |
commit | b930bd7ee68b439c2a01440d6802fcd2bb083ebc (patch) | |
tree | 0460d7da69da256c9acafd03cc3ea523f631c475 /docs/ch03-quick-start.rst | |
parent | 2fc316646c8e99034c9f80867dd5f0227b6362ee (diff) | |
download | vyos-documentation-b930bd7ee68b439c2a01440d6802fcd2bb083ebc.tar.gz vyos-documentation-b930bd7ee68b439c2a01440d6802fcd2bb083ebc.zip |
Quick Start: add basic QoS settings
Diffstat (limited to 'docs/ch03-quick-start.rst')
-rw-r--r-- | docs/ch03-quick-start.rst | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/docs/ch03-quick-start.rst b/docs/ch03-quick-start.rst index cf6c2169..11912947 100644 --- a/docs/ch03-quick-start.rst +++ b/docs/ch03-quick-start.rst @@ -101,3 +101,64 @@ Commit changes, save the configuration, and exit configuration mode: Done vyos@vyos# exit vyos@vyos$ + +Basic QoS +--------- + +The traffic policy subsystem provides an interface to Linux traffic control +(tc_). + +One common use of traffic policy is to limit bandwidth for an interface. In +the example below we limit bandwidth for our LAN connection to 200 Mbit download +and out WAN connection to 50 Mbit upload: + +.. code-block:: sh + + set traffic-policy shaper WAN-OUT bandwidth '50Mbit' + set traffic-policy shaper WAN-OUT default bandwidth '50%' + set traffic-policy shaper WAN-OUT default ceiling '100%' + set traffic-policy shaper WAN-OUT default queue-type 'fair-queue' + set traffic-policy shaper LAN-OUT bandwidth '200Mbit' + set traffic-policy shaper LAN-OUT default bandwidth '50%' + set traffic-policy shaper LAN-OUT default ceiling '100%' + set traffic-policy shaper LAN-OUT default queue-type 'fair-queue' + +Resulting in the following configuration: + +.. code-block:: sh + + traffic-policy { + shaper WAN-OUT { + bandwidth 50Mbit + default { + bandwidth 50% + ceiling 100% + queue-type fair-queue + } + } + shaper LAN-OUT { + bandwidth 200Mbit + default { + bandwidth 50% + ceiling 100% + queue-type fair-queue + } + } + } + +Once defined, a traffic policy can be applied to each interface using the +interface-level traffic-policy directive: + +.. code-block:: sh + + set interfaces ethernet eth0 traffic-policy out 'WAN-OUT' + set interfaces ethernet eth1 traffic-policy out 'LAN-OUT' + +Note that a traffic policy can also be defined to match specific traffic +flows using class statements. + +VyOS 1.2 (Crux) also supports HFSC (:code:`set traffic-policy shaper-hfsc`) + +See further information in the `QoS and Traffic Policy`_ chapter. + +.. _tc: http://en.wikipedia.org/wiki/Tc_(Linux) |