From owner-freebsd-hackers Fri Dec 7 18:23:26 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from harrier.prod.itd.earthlink.net (harrier.mail.pas.earthlink.net [207.217.120.12]) by hub.freebsd.org (Postfix) with ESMTP id B02D337B417 for ; Fri, 7 Dec 2001 18:23:17 -0800 (PST) Received: from dialup-209.245.130.204.dial1.sanjose1.level3.net ([209.245.130.204] helo=mindspring.com) by harrier.prod.itd.earthlink.net with esmtp (Exim 3.33 #1) id 16CX92-0000We-00; Fri, 07 Dec 2001 18:23:16 -0800 Message-ID: <3C11799C.8775EB88@mindspring.com> Date: Fri, 07 Dec 2001 18:23:24 -0800 From: Terry Lambert X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: rick norman Cc: freebsd-hackers@freebsd.org Subject: Re: Nat through two DSL References: <5.0.2.1.0.20011207131945.009fe1d0@mail.training.telia.se> <3C10F658.6070001@isi.edu> <20011207170742.GB80922@virtual-voodoo.com> <3C110131.CF806ED2@lmco.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG rick norman wrote: > > What would be nice would be to load balance on a per connection > basis, not a per packet basis, between the two modems. > Any ideas how to do this ? This whole thread is a bit odd, in that the DSL lines in question are going to go back to the same DSLAM, and therefore end up on the same wire, anyway, so it's questionable how much load balancing is going to get you anyway. But I digress... The way you would want to deal with this is in the route cloning code, by selecting a destination interface based on a cloned entry that you create when you initiate the conection. This is called "flow balancing". This really doesn't make a lot of sense, if you think about it, since the hardware on the other end is not going to cooperate with you, and send return packets on the same source flow. To get around this, you might want to avoid trying to make it look like one channel, at all. Then establish outbound connections "from" per interface IP addresses. You could do this manually by binding the sockets locally before making the outbound connections. FreeBSD won't do this for you automatically. The main problem that is unaddressed in doing it automatically is the load balancing algorithm being used. Least connections and round-robin are both less than ideal. Really, you want to do it based on "least load". The Alt-Q people may or may not be able to help you on this. FreeBSD supports doing this with Cisco protocols, but the hardware on the other end has to cooperate. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message