Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Aug 2014 14:57:19 -0700
From:      Julian Elischer <julian@freebsd.org>
To:        lev@FreeBSD.org, freebsd-net@freebsd.org
Subject:   Re: Does anybody have set of scripts to support two uplink connections (with two ISPs) without AS and BGP?
Message-ID:  <53FA5FBF.1010907@freebsd.org>
In-Reply-To: <754783310.20140824233738@serebryakov.spb.ru>
References:  <754783310.20140824233738@serebryakov.spb.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On 8/24/14, 12:37 PM, Lev Serebryakov wrote:
> Hello, Freebsd-net.
>
>   Typical task: two "home-grade" ISPs, one router. Need to monitor both
> channels, switch default route, balance outgoing traffic, manage ipfw
> firewall, etc.
>
>   For Linux here is Net::ISP::Balance
>   (http://lstein.github.io/Net-ISP-Balance/) and LSM as part of it
>   (http://lsm.foobar.fi/download/), but they are very Linux-specific.
>
>   Maybe, somebody have good set of such scripts?
>
>   Looks like /sbin/dhclient-script should be rewritten too, for example,
>   because standard one uses "default interface" detection which fails in race
>   condition of two ISPs (both uses DHCP!), for example.
>
I don't have scripts any more but I have done this.
The single biggest step is to realise that both links need separate NAT,
or if one ISP gives you real routable subnet, then the other link needs
to be NAT'd. (unless you are willing to dual-home every machine you have).

If you had a commercial ISP they might use BGP or something but with a
home-grade ISP conenction you can't do that.

Once you have two connections set up then you can use either multiple 
FIBS, or
packet redirection in ipfw to decide what connectins go to what ISP 
connection.
Incoming sessions must return to the same link that they came in from 
but how
you do that really depends on how you setup your systems.





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?53FA5FBF.1010907>