[Cake] cake separate qos for lan

Jonathan Morton chromatix99 at gmail.com
Sun Mar 27 03:35:18 EDT 2016

> On 27 Mar, 2016, at 08:31, Allan Pinto <allan316 at gmail.com> wrote:
> Cache-Server
>        |
> internet Gateway ---> L2 switch   --> LInux router with cake - - [ pppoe connection ]  --> customer

Aha - that is a different topology than we usually assume.  So the egress side of the port is the right one to consider.  It’s nice to see Cake being considered for the provider's side of the link.


Cake doesn’t have its own facilities to do the sort of specific discrimination you want.  All the mechanisms it has are geared to sharing a fixed capacity as equitably as is feasible.  So you will need to divide the traffic using some other mechanism, and pass it through two separate instances of Cake.

Ideally you want one instance set for the capacity of the physical link, with all traffic passing through it, and the second instance set for the allocation for non-cache traffic, with the cache traffic bypassing it.  The customer will then get full link capacity when accessing the cache and nothing else, and latency will still be controlled well with a complex mix of traffic.

I recommend you use the IMQ mechanism (http://lartc.org/howto/lartc.imq.html) to achieve the ideal configuration above:

ip link set imq0 up

tc qdisc replace dev ppp0 root handle 1: cake pppoe-vcmux bandwidth $FULL_RATE triple-isolate

tc qdisc replace dev imq0 root handle 2: cake raw bandwidth $NONCACHE_RATE flows

iptables -t mangle -A PREROUTING -o ppp0 -s $CACHE_IP -j IMQ —todev 0

That reminds me - we need to update the documentation to properly describe the overhead and triple-isolation keywords.  You might need a different overhead setting than “pppoe-vcmux” depending on the details of your link.

 - Jonathan Morton

More information about the Cake mailing list