Date: Thu, 12 May 2005 10:06:33 -0500 From: Ash <omniBSD@speakeasy.net> To: Greg Donald <destiney@gmail.com>, FreeBSD mailing List <freebsd-questions@freebsd.org> Subject: Re: two ISP connections, three nics, and a NAT Message-ID: <428370F9.50204@speakeasy.net> In-Reply-To: <ea9da26c0505120721571bc135@mail.gmail.com> References: <ea9da26c0505120721571bc135@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Greg Donald wrote: > I have two ISP connections, a DSL line and a Cable Modem line. I want > to plug both connections into a FreeBSD box that has three nics in it, > one nic for each ISP connection and the last nic for my NAT. How can > I bind the connections together without any other sort of router? > I've used ipfw a bit over the past couple of years, and I've got a > basic NAT working for the other LAN PCs. I can't seem to find any > docs on how to proceed with two connections however. I've got two > connections for the sake of failover but it'd be nice to actually use > both of them instead of one or the other sitting idle all the time. > Would it be as simple as adding a static route from each connection to > the other? > > If anyone has any tips or URLs that'd be helpful. > > TIA. > > Short answer: You can't. Long answer: You can't bind the two connections from two different ISPs into a single connection, it's just not the way IP works. What you can do however, is distribute the network load evenly across the two connections through your router. You already have a router: Your FreeBSD box. One method you can try, is to distribute the load one a per machine basis. Let's say you have 4 computers in your LAN A, B, C and D. You can configure your router to send traffic originating from A and B through ISP 1, while C and D are routed through ISP 2. Unfortunately, I haven't used IPFW in a long enough time that I can't remember much about it, so I'm not sure if IPFW will allow you to do this (I *think* it does, but I'm too lazy to look it up). However, I do know that pf(4) (Firewall package ported over from OpenBSD and imported into 5.x in March of 2004) will allow you to do this. In case you want to examine the PF option, you may want to have a look at the Users Guide (ftp://ftp.openbsd.org/pub/OpenBSD/doc/pf-faq.txt) as well as an overview (http://www.bgnett.no/~peter/pf/). -Ash
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?428370F9.50204>