From owner-freebsd-net@FreeBSD.ORG Wed Nov 14 21:13:53 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1C945EC3 for ; Wed, 14 Nov 2012 21:13:53 +0000 (UTC) (envelope-from postnet@dragas.dyndns.org) Received: from mail.dragas.org (unknown [IPv6:2001:41d0:2:ca45::3]) by mx1.freebsd.org (Postfix) with ESMTP id A8F108FC0C for ; Wed, 14 Nov 2012 21:13:52 +0000 (UTC) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.dragas.org (Postfix) with ESMTP id C7CB6E4408 for ; Wed, 14 Nov 2012 22:13:51 +0100 (CET) Received: from mail.dragas.org ([127.0.0.1]) by localhost (dragas.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7v-1J6C0WpUo for ; Wed, 14 Nov 2012 22:13:46 +0100 (CET) Received: from dragasmbp.lan (unknown [87.238.26.165]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.dragas.org (Postfix) with ESMTPSA id 77CA2E449D for ; Wed, 14 Nov 2012 22:13:46 +0100 (CET) From: Stefano Marinelli Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: "Weighted round robin" for LAGG - anyhow? Message-Id: <646662D0-E66C-4168-B351-482B06ACF26A@dragas.dyndns.org> Date: Wed, 14 Nov 2012 22:13:45 +0100 To: freebsd-net@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) X-Mailer: Apple Mail (2.1499) X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Nov 2012 21:13:53 -0000 Hello everybody, I've been trying to do some experiments to improve my ADSL speed. The = idea is to bond two ADSLs, create two OpenVPN TAP channels connected to = a remote (fast connected) server and doing a round-robind LAGG = aggregation on both nodes. The remote end will NAT. The operation is = successful but, as by design of the R-R configuration, I just get the = the slowest link speed * 2. "loadbalance" mode is way slower. The first ADSL is more or less 2.2 Mbit/sec, the second one about 1.4 = MBit/sec so the gain is minimal. It's useful just for fault-tolerance. I thought about doing some sort of "weighted round-robin", giving a = weight to the two tap interfaces. Something like "send 2 packets to the = first one, than one to the second one". I found some patches [1] for Linux (I'm compiling a kernel right now), = but no information about FreeBSD. My tests show that FreeBSD has a = better bonding throughput (in Linux, I just get a bit more than 2.3 = Mbit/sec, on FreeBSD I can almost get the theorical 2.8Mbit/sec). Did anyone ever tried something like that? I tried to have a look at the = if_lagg source code, but I think it'd be quite difficult for me to do = something like that, even trying to adapt those Linux patches.=20 [1] = http://sourceforge.net/projects/bonding/forums/forum/77912/topic/2048022 Thank you, Stefano=