From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt0-x244.google.com (mail-qt0-x244.google.com [IPv6:2607:f8b0:400d:c0d::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.bufferbloat.net (Postfix) with ESMTPS id D6FB53CB35 for ; Mon, 10 Sep 2018 15:55:33 -0400 (EDT) Received: by mail-qt0-x244.google.com with SMTP id g44-v6so25644323qtb.12 for ; Mon, 10 Sep 2018 12:55:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=qx7HGZRyTL6L/6+yUApD2gx4b8LXrM78IzOSRR54PhY=; b=Tpiy0KsTJEP5H4HY6CvoOU5o9zKecZxmHIwnaqzuzIItrk7n1Vh8VjglVBWebLodtl WLNrMdA8LrC8MB7neGKgy2MoV4+JLiMc6dGtYnmw2d89WyWxRt4ggEfWj4LXSiAKU8uQ M3C3gwvLP9K3I7vvRwXzTT9jKODYzG3wTjmYYPW8/ru8vpUH5on98S02yvYDyLlQ0sZ0 1Wqtfo/gzBILiaRLExqION7nCzSYKjGLgkXe3/2DRfHQ6HVz8j9U1zjPKNo0hLWDoKYW IEBszlxOafLqbkssS4Z4vu6kQbClyJG8U784CCXSEMV07+zuhQngJCsyC790jOHiYQcx nT/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=qx7HGZRyTL6L/6+yUApD2gx4b8LXrM78IzOSRR54PhY=; b=XECA/mxeDxmcG1uBkpPc86jqym1c0agS0fkPVDmY5VuXILEPEn97onVOF3UN2sJ1kH bBCCUP/Ts+ExTMCOyQbP3IQWFvZNNuIzc2/U1Ur5qmBDCkW+y7qQPyoB4hQimEtrg553 XabBE0tRcXCBPdDMfNxVDtUz3uSM9yX1/ODnBJV4XWlEIPWh3CRC3qHlY0u9FemyxLEb amMMynfdEPldAh32plZmuGjhD8cHYVMZiQKiAtj7KJ25ATCBEZGX73ymzSdrsg7jHKks nI0d8/CAFe5S9Y/zmuKMnwHSeTXQuYTR5A2E4aAHBXFaqhYzMZ/ULsgs5gzrKtG/OafF iKNA== X-Gm-Message-State: APzg51AbQwIQy3hN8HTg+/Wr490plTG/3LADCEjd0iMB73B4ManDV91u +hRY5VsLqW6ZivdTsKl2tRhGRq0m45X66rJMgQ5XbsOL X-Google-Smtp-Source: ANB0VdZM5j0nTC2v/Vs7rADU7aFGMrxYNynFNOTvmOLo9JGSN+gG30OPSZxFyneMNmRYzOol0tuxqDe5iv/nkXIqWHM= X-Received: by 2002:ac8:2db3:: with SMTP id p48-v6mr17748570qta.238.1536609333324; Mon, 10 Sep 2018 12:55:33 -0700 (PDT) MIME-Version: 1.0 References: <87zhwxzh8o.fsf@toke.dk> <139B295B-7371-43DE-B472-DE629C9B8432@heistp.net> <87efe65wol.fsf@toke.dk> <6C556301-015B-4903-AE5A-F22D3517FFCC@heistp.net> In-Reply-To: From: Dave Taht Date: Mon, 10 Sep 2018 12:55:21 -0700 Message-ID: To: Pete Heist Cc: Cake List Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [Cake] Cake on elements of a bridge X-BeenThere: cake@lists.bufferbloat.net X-Mailman-Version: 2.1.20 Precedence: list List-Id: Cake - FQ_codel the next generation List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Sep 2018 19:55:34 -0000 On Mon, Sep 10, 2018 at 12:29 PM Pete Heist wrote: > > > On Sep 6, 2018, at 8:51 PM, Pete Heist wrote: > > On Sep 6, 2018, at 8:04 PM, Toke H=C3=B8iland-J=C3=B8rgensen wrote: > > Pete Heist writes: > > But now, my neighbor will access the Internet through my CPE device, > but they must have a separate IP obtained through DHCP (i.e. a > separate MAC address as well), and I want to use cake to manage the > queue for both of us. I could do this with two routers and a > transparent bridge, but I want to see if I can make it work with as > few devices as possible, preferably just one EdgeRouter-X. I had two > failures thus far: > > > DHCP relay and normal routing? Or bridging with a kernel software bridge > rather than the hardware switch? > > > I bet a regular software bridge would work. I=E2=80=99ll try it. > > It looks like I=E2=80=99ll also need to do stateful firewalling for the n= eighbors. I was able to get my transparent bridge to do this with net.bridg= e.bridge-nf-call-iptables=3D1, I believe, so this should also theoretically= work fine, somehow=E2=80=A6 :) > > > For anyone who followed this, yes, the regular soft bridge (i.e. set inte= rfaces bridge br0) works fine on the ER-X, as I suspect it would on most an= y Linux. A few notes about it: > > - Your qdisc must be added to the physical interface (e.g. eth4), not the= bridge interface > - Unlike the hardware bridge which has its own MAC, the soft bridge seems= to take the MAC of the lowest (or first listed?) interface port > - On ER-X, bridge-nf-call-iptables=3D1 is the default so nothing needs to= be changed there for firewalling > - When firewalling the bridged WAN interface, =E2=80=98in=E2=80=99 corres= ponds to bridged traffic and =E2=80=98local=E2=80=99 to routed traffic, whi= ch is different from the semantics for ordinary routed traffic > - I can do stateful firewalling for bridged hosts with =E2=80=9Caccept es= tablished and related=E2=80=9D, but have to explicitly allow DHCP (UDP sour= ce/dest port 67-68) in the WAN interface=E2=80=99s =E2=80=98in=E2=80=99 rul= es for DHCP traffic to pass through the bridge > > Performance: > > Using Cake with this setup, the fun ends at around 110 Mbit with ksoftirq= d thrashing. Unsurprisingly, there=E2=80=99s probably some overhead here wi= th the soft bridge. For my purposes though (50 Mbit), it=E2=80=99s enough, = barely=E2=80=A6 Can I encourage you to give regular ole htb+fq_codel sqm a shot with a bigger burst and cburst size for htb? Fiddling with the htb quantum isn't helping much, but try this, from: https://github.com/tohojo/sqm-scripts/issues/71 (I am thinking burst and cburst should be about 1.1ms of buffering in size) root@apu2:/home/d/git/sqm-scripts/src# git diff . diff --git a/src/functions.sh b/src/functions.sh index 226a6c5..8ad4f38 100644 --- a/src/functions.sh +++ b/src/functions.sh @@ -364,7 +364,9 @@ htb_quantum_linear() { sqm_debug "HTB_QUANTUM (linear): ${HTB_QUANTUM}, BANDWIDTH: ${BANDWIDT= H}" - echo $HTB_QUANTUM + echo $HTB_QUANTUM >> /tmp/taht.log + echo 32000 +#$HTB_QUANTUM } # Fixed step scaling @@ -438,7 +440,7 @@ get_htb_burst() { if [ -n "${HTB_MTU}" -a "${SHAPER_BURST}" -eq "1" ] ; then BURST=3D$( get_burst $HTB_MTU $BANDWIDTH ) if [ -n "$BURST" ]; then - echo burst $BURST cburst $BURST + echo burst 96000 cburst 96000 else sqm_debug "Default Burst, HTB will use MTU plus shipping and handling" fi > > _______________________________________________ > Cake mailing list > Cake@lists.bufferbloat.net > https://lists.bufferbloat.net/listinfo/cake --=20 Dave T=C3=A4ht CEO, TekLibre, LLC http://www.teklibre.com Tel: 1-669-226-2619