Date: Mon, 10 Oct 2011 08:59:36 +0100 From: krad <kraduk@gmail.com> To: Matthew Seaman <m.seaman@infracaninophile.co.uk> Cc: pepe <plaine@gmail.com>, freebsd-questions@freebsd.org Subject: Re: two networks in one server? Message-ID: <CALfReycipV9YWF=buJjvVTa3zXZcztu0acv5no9uPRBkL0f0Uw@mail.gmail.com> In-Reply-To: <4E9187AC.6000006@infracaninophile.co.uk> References: <CANNwXraKe6mQuhJic6F=XOJt3SsBfhM9Ft9dNzE98OLCWXgV2Q@mail.gmail.com> <4E9187AC.6000006@infracaninophile.co.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
On 9 October 2011 12:38, Matthew Seaman <m.seaman@infracaninophile.co.uk>wrote: > On 09/10/2011 10:36, pepe wrote: > > I'm just asking before trying if it possible to use two network uplinks > in > > one server so other would be just backup way in? > > I have currently connection from two ISPs and server is up with one > > connection. Is it possible to add another nic and wire that to connection > > from another isp? So isp 1 would be in normal use in/out, but isp 2 could > be > > used connecting in? > > This is a very commonly asked question around the Internet. > > The answer is -- it's a lot harder to do properly than you might think. > Requires understanding Internet routing protocols like BGP and you will > need the cooperation of both ISPs to make it all work. > > However there is a "light" version which might work for you. Keywords > here are "policy based routing." In this case you can use firewall > software to forward packets by an alternate gateway. This only affects > the outward path from your system: no good at all if all the incoming > traffic is using an uplink that fails, but you can use it to load > balance across multiple links. > > Cheers, > > Matthew > > -- > Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard > Flat 3 > PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate > JID: matthew@infracaninophile.co.uk Kent, CT11 9PW > > There is a simpler version now in freebsd. You could spawn an additional version of sshd with the setfib command, and have a different default route in the relevant fib table. If you have a bunch of services you need to run like that maybe you could wrap them up in a jail and use the fib on the jail. Have a look at setfib. NOTE: it appears you need to set a compile time option for your kernel "options ROUTETABLES=X" where X is the number of routing tables you require
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CALfReycipV9YWF=buJjvVTa3zXZcztu0acv5no9uPRBkL0f0Uw>