From b8bcf7e4750e506e7ef537eea0ba696be8289fc9 Mon Sep 17 00:00:00 2001 From: currite Date: Tue, 4 Aug 2020 20:14:11 +0200 Subject: qos: move ingress shaping to the end of the article Ingress Shaping is an exceptional case, it should be shown after it is explained how the standard procedure works. --- docs/qos.rst | 62 +++++++++++++++++++++++++++++++----------------------------- 1 file changed, 32 insertions(+), 30 deletions(-) diff --git a/docs/qos.rst b/docs/qos.rst index c0266461..05e66ba4 100644 --- a/docs/qos.rst +++ b/docs/qos.rst @@ -1114,6 +1114,38 @@ A simple example of Shaper using priorities. +Applying a traffic policy +========================= + +Once a traffic-policy is created, you can apply it to an interface: + +.. code-block:: none + + set interfaces etherhet eth0 traffic-policy out WAN-OUT + +You can only apply one policy per interface and direction, but you can +have several policies working at the same time: + +.. code-block:: none + + set interfaces ethernet eth0 traffic-policy in WAN-IN + set interfaces etherhet eth0 traffic-policy out WAN-OUT + set interfaces etherhet eth1 traffic-policy out WAN-OUT + set interfaces ethernet eth2 traffic-policy out LAN-IN + set interfaces ethernet eth2 traffic-policy out LAN-OUT + + +Getting queueing information +---------------------------- + +.. opcmd:: show queueing + + Use this command to see the queueing information for an interface. + You will be able to see a packet counter (Sent, Dropped, Overlimit + and Backlog) per policy and class configured. + + + .. _ingress-shaping: The case of ingress shaping @@ -1146,36 +1178,6 @@ That is how it is possible to do the so-called "ingress shaping". -Applying a traffic policy -========================= - -Once a traffic-policy is created, you can apply it to an interface: - -.. code-block:: none - - set interfaces etherhet eth0 traffic-policy out WAN-OUT - -You can only apply one policy per interface and direction, but you can -have several policies working at the same time: - -.. code-block:: none - - set interfaces ethernet eth0 traffic-policy in WAN-IN - set interfaces etherhet eth0 traffic-policy out WAN-OUT - set interfaces etherhet eth1 traffic-policy out WAN-OUT - set interfaces ethernet eth2 traffic-policy out LAN-IN - set interfaces ethernet eth2 traffic-policy out LAN-OUT - - -Getting queueing information ----------------------------- - -.. opcmd:: show queueing - - Use this command to see the queueing information for an interface. - You will be able to see a packet counter (Sent, Dropped, Overlimit - and Backlog) per policy and class configured. - .. _that can give you a great deal of flexibility: https://blog.vyos.io/using-the-policy-route-and-packet-marking-for-custom-qos-matches .. _tc: https://en.wikipedia.org/wiki/Tc_(Linux) -- cgit v1.2.3 From df8d306f1198906116c313c238497bb169c69310 Mon Sep 17 00:00:00 2001 From: currite Date: Tue, 4 Aug 2020 21:25:42 +0200 Subject: qos: advice on voip and ceiling --- docs/qos.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/qos.rst b/docs/qos.rst index 05e66ba4..f1e5f37f 100644 --- a/docs/qos.rst +++ b/docs/qos.rst @@ -1083,6 +1083,12 @@ parameters. +.. note:: If you configure a class for **VoIP traffic**, don't give it any + *ceiling*, otherwise new VoIP calls could start when there is available + bandwidth and get suddenly dropped when other classes start using + their bandwidth. + + Example ^^^^^^^ -- cgit v1.2.3 From 4d907282ca4c7c9f8cacebc8999fea5e9daea70e Mon Sep 17 00:00:00 2001 From: currite Date: Wed, 5 Aug 2020 02:37:59 +0200 Subject: qos: fix shaper burst definition Shaper definition does not correspond to HTB cburst but to HTB burst. --- docs/qos.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/qos.rst b/docs/qos.rst index f1e5f37f..0fb1233b 100644 --- a/docs/qos.rst +++ b/docs/qos.rst @@ -1029,7 +1029,7 @@ the higher the priority. Use this command to configure a Shaper policy, set its name, define a class and set the size of the `tocken bucket`_ in bytes, which will - be available to be sent at maximum speed (default: 15Kb). + be available to be sent at ceiling speed (default: 15Kb). .. cfgcmd:: set traffic-policy shaper class ceiling -- cgit v1.2.3 From 2992a05cf2bd35aa112c7c7169a2efefd5764cb9 Mon Sep 17 00:00:00 2001 From: currite Date: Wed, 5 Aug 2020 03:38:23 +0200 Subject: qos: fix and complete examples --- docs/qos.rst | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/docs/qos.rst b/docs/qos.rst index 0fb1233b..a4e56665 100644 --- a/docs/qos.rst +++ b/docs/qos.rst @@ -1098,14 +1098,12 @@ A simple example of Shaper using priorities. .. code-block:: none set traffic-policy shaper MY-HTB bandwidth '50mbit' - set traffic-policy shaper MY-HTB class 10 bandwidth '10%' - set traffic-policy shaper MY-HTB class 10 ceiling '15%' - set traffic-policy shaper MY-HTB class 10 match ADDRESS10 ip source address '192.168.10.0/24' - set traffic-policy shaper MY-HTB class 10 priority '0' - set traffic-policy shaper MY-HTB class 10 queue-type 'fair-queue' + set traffic-policy shaper MY-HTB class 10 bandwidth '20%' + set traffic-policy shaper MY-HTB class 10 match DSCP ip dscp 'EF' + set traffic-policy shaper MY-HTB class 10 queue-type 'fq-codel' set traffic-policy shaper MY-HTB class 20 bandwidth '10%' set traffic-policy shaper MY-HTB class 20 ceiling '50%' - set traffic-policy shaper MY-HTB class 20 match ADDRESS20 ip source address '192.168.20.0/24' + set traffic-policy shaper MY-HTB class 20 match PORT666 ip destination port '666' set traffic-policy shaper MY-HTB class 20 priority '3' set traffic-policy shaper MY-HTB class 20 queue-type 'fair-queue' set traffic-policy shaper MY-HTB class 30 bandwidth '10%' @@ -1117,7 +1115,6 @@ A simple example of Shaper using priorities. set traffic-policy shaper MY-HTB default ceiling '100%' set traffic-policy shaper MY-HTB default priority '7' set traffic-policy shaper MY-HTB default queue-type 'fair-queue' - Applying a traffic policy @@ -1129,17 +1126,21 @@ Once a traffic-policy is created, you can apply it to an interface: set interfaces etherhet eth0 traffic-policy out WAN-OUT -You can only apply one policy per interface and direction, but you can -have several policies working at the same time: +You can only apply one policy per interface and direction, but you could +reuse a policy on different interfaces and directions: .. code-block:: none set interfaces ethernet eth0 traffic-policy in WAN-IN set interfaces etherhet eth0 traffic-policy out WAN-OUT - set interfaces etherhet eth1 traffic-policy out WAN-OUT - set interfaces ethernet eth2 traffic-policy out LAN-IN + set interfaces etherhet eth1 traffic-policy in LAN-IN + set interfaces etherhet eth1 traffic-policy out LAN-OUT + set interfaces ethernet eth2 traffic-policy in LAN-IN set interfaces ethernet eth2 traffic-policy out LAN-OUT - + set interfaces etherhet eth3 traffic-policy in TWO-WAY-POLICY + set interfaces etherhet eth3 traffic-policy out TWO-WAY-POLICY + set interfaces etherhet eth4 traffic-policy in TWO-WAY-POLICY + set interfaces etherhet eth4 traffic-policy out TWO-WAY-POLICY Getting queueing information ---------------------------- -- cgit v1.2.3