Does anybody have set of scripts to support two uplink connections (with two ISPs) without AS and BGP?
Julian Elischer
julian at freebsd.org
Sun Aug 24 22:14:24 UTC 2014
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.
More information about the freebsd-net
mailing list