NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: How to use two WAN connections at once?



On Wed, Nov 14, 2012 at 11:17:27AM +0100, Frank Wille wrote:
> Hi,
> 
> I have two WAN connections (e.g. ADSL), which I both want to use transparently
> from my LAN. A kind of load-balancing would be nice, because the first WAN
> port is slower than the second, but more stable.
> 
> Is that possible with ipfilter or pf? How would I do that?

Yes, it is possible.  I have done just what you want.

The trick is to use PF to pin each flow to a particular WAN connection.
In that way, if WAN 1 is disrupted *temporarily*, flows on that
connection may stall for a while, but they have the possibility to
recover, which is important.  Meanwhile, you establish all new flows on
WAN 2 while the WAN 1 disruption persists.  When WAN 1 recovers, you may
establish new flows on either connection, again, and the WAN 1 flows

I have not tried load-balancing, myself, but I don't see any reason that
it should not be possible.

What is most tricky, after producing the right PF rules, is to come
up with the proper metric for WAN connection "badness" and to set the
criteria for stop establishing flows on a connection.

Dave

-- 
David Young
dyoung%pobox.com@localhost    Urbana, IL    (217) 721-9981


Home | Main Index | Thread Index | Old Index