two networks in one server?
kraduk at gmail.com
Mon Oct 10 07:59:37 UTC 2011
On 9 October 2011 12:38, Matthew Seaman <m.seaman at 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
> > 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
> > 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.
> Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard
> Flat 3
> PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
> JID: matthew at 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
More information about the freebsd-questions