[SATLUG] Routing from one box to two different ISPs
Samuel Leon
leon36 at gmail.com
Thu Apr 5 12:44:18 CDT 2007
David Salisbury wrote:
> Hey fellow SATLUGgers!
>
> I'm trying to get something working on a Linux box that I have, and so far no luck. Basically I have a box with two NICs and two different providers, one for each NIC (Cable and DSL, say). Both have static IPs and can be pinged successfully from elsewhere in the world. However, if I try to access a web server I have running on the box (which IS bound to each interface in the web server conf), it works over the DSL interface (eth0) but not the RR one (eth1).
>
> It seems to me, based on the routing table below, that that's because packets coming in over eth1 try to get back out over eth0 since that's the default route. I've tried adding another default route with the other RR gateway IP for the eth1 interface, but that just confuses the box and makes both routes not work.
>
> Kernel IP routing table
> Destination Gateway Genmask Flags Metric Ref Use Iface
> <RR Broadcast IP> * <RR Netmask> U 0 0 0 eth1
> <DSL Broadcast IP> * <DSL Netmask> U 0 0 0 eth0
> 127.0.0.0 * 255.0.0.0 U 0 0 0 lo
> default <DSL Gateway IP> 0.0.0.0 UG 0 0 0 eth0
>
> Basically I'm doing this for reduncancy's sake, so if one connection goes down you could still access the box through the other one. I think I basically just need to make Linux route the packets based on the interface they come in on (so they go out on the one they came in on), but so far no luck on finding how to do this. Has anyone had any luck trying to do something like this?
>
> David
>
> PS I have checked out the following link:
> http://tldp.org/HOWTO/Adv-Routing-HOWTO/lartc.rpdb.multiple-links.html
> But don't know how to translate that info into my routing table, or if I can?
>
> PPS Sorry for the font, just want to make sure the routing table shows up easy to read!
>
I will be doing something similar (someday). I haven't tried it yet and
the only resources I have are:
http://community.smoothwall.org/forum/viewtopic.php?t=4820
_http://www.netlife.co.za/content/view/47/34/
Sam
_
More information about the SATLUG
mailing list