[Cake] Enforcing video quality question

Jeremy Marks jmarks2 at gmail.com
Fri Feb 19 18:26:12 EST 2021


Learning how to have this level of control on incoming traffic is really interesting. I would be very interested in a looking at an example script, if it is possible to attach a text file or a tiny instructive post on the CAKE site. 



On Feb 19, 2021, at 5:06 PM, John Sager <john at sager.me.uk> wrote:

You will need to specify the hosts explicitly, unless you can live with them all sharing one bandwidth class. In that case if you have more than one using bandwidth they would share the bandwidth in that class equally. I assume from your original post that you want each host to be limited in bandwidth to a specific value, but to do that you need a class for each host in the ingress HTB. What you probably need is a scheduler that has a limit per flow up to an overall ceiling beyond which it shares equally. I'm not aware that any of the schedulers do anything like that.

John

On 19/02/2021 20:33, Peter Lepeska wrote:
> "I'll put together a toy iptables rules file and a toy script with the
> necessary tc commands. "
> Wow -- that would be really appreciated. Question: will you need to explicitly call out the inside IP address of the host being shaped? Or, can it be set to shape each inside host?
> I'm not sure you can post to mailing list but maybe give it a shot (since there may be general interest) and if it fails email me directly?
> Thanks!!!
> Peter
> On Fri, Feb 19, 2021 at 2:04 PM John Sager <john at sager.me.uk <mailto:john at sager.me.uk>> wrote:
>    Yes. The marks are set on egress so you can select on inside IP address,
>    port, protocol - in fact many characteristics that iptables rules can test
>    for. I'll put together a toy iptables rules file and a toy script with the
>    necessary tc commands. It'll take me a few days though as I'm busy with
>    other stuff currently.
>    PS does the cake list allow attachments? It will be a small zip file.
>    John
>    On 19/02/2021 15:02, Peter Lepeska wrote:
>     > Hi John
>     >
>     > Does this result in the ability to set per internal host max ingress
>     > bandwidth? If so, any chance you can share a snippet of a script? I
>    will be
>     > trying to reproduce your setup.
>     >
>     > Thank you!
>     >
>     > Peter
>     >
>     > On Fri, Feb 19, 2021 at 7:16 AM John Sager <john at sager.me.uk
>    <mailto:john at sager.me.uk>
>     > <mailto:john at sager.me.uk <mailto:john at sager.me.uk>>> wrote:
>     >
>     >     That's basically what I do. I set marks on outgoing traffic in
>    the mangle
>     >     table which are copied to connmark before egress. Then on ingress the
>     >     connmark is restored to the packet and punted to ifb0 using 'action
>     >     connmark
>     >     action mirred egress redirect dev $IFB' as an ingress filter on the
>     >     incoming
>     >     interface (ppp0 in my case). Then I have HTB classes on ifb0
>    which set rate
>     >     limits for different traffic classes indicated by the marks. I
>    have only 6
>     >     traffic classes (I bundle all video into one class), but as marks
>    are 32
>     >     bits wide there is lots of scope for classes for individual IP
>    addresses.
>     >
>     >     John
>     >
>     >     On 18/02/2021 19:28, Toke Høiland-Jørgensen via Cake wrote:
>     >      > Peter Lepeska <bizzbyster at gmail.com
>    <mailto:bizzbyster at gmail.com> <mailto:bizzbyster at gmail.com
>    <mailto:bizzbyster at gmail.com>>>
>     >     writes:
>     >      >
>     >      >> A user on the OpenWrt forum suggested hashlimit rules
>    supported by
>     >      >> iptables. How does that idea sound to you?
>     >      >
>     >      > That will result in a cliff-edge policer (i.e., as soon as a
>    device goes
>     >      > over its limits it will see every packet get dropped). This
>    doesn't
>     >      > interact too well with the burstiness of TCP, so you'll likely get
>     >      > erratic behaviour of the traffic if you do that. Doing the
>    same thing
>     >      > with HTB means the router will queue+shape each class (and
>    with FQ-CoDel
>     >      > on the leaves, you'll get a nice AQM behaviour as well), so
>    that will be
>     >      > smoother and less prone to bloat :)
>     >      >
>     >      > -Toke
>     >      > _______________________________________________
>     >      > Cake mailing list
>     >      > Cake at lists.bufferbloat.net <mailto:Cake at lists.bufferbloat.net>
>    <mailto:Cake at lists.bufferbloat.net <mailto:Cake at lists.bufferbloat.net>>
>     >      > https://lists.bufferbloat.net/listinfo/cake
>     >      >
>     >     _______________________________________________
>     >     Cake mailing list
>     > Cake at lists.bufferbloat.net <mailto:Cake at lists.bufferbloat.net>
>    <mailto:Cake at lists.bufferbloat.net <mailto:Cake at lists.bufferbloat.net>>
>     > https://lists.bufferbloat.net/listinfo/cake
>     >
_______________________________________________
Cake mailing list
Cake at lists.bufferbloat.net
https://lists.bufferbloat.net/listinfo/cake


More information about the Cake mailing list