Bit of an update/better explanation of the problem, in case anyone has any hints...
Here's the issue: I'm trying to set up 2 adsl connections (for backup purposes but mainly because the upstream speed is only 256 kbps on each, and I need at least 512). I originally planned on getting them from 2 different ISP's, but ended up with the same provider for both. I've been reading a lot about routing and load balancing in Linux (currently using Mandrake 10), and over on
lartc there's a pretty good how-to on all that stuff, even an example that seemed just what I needed. Here's what I currently have, more or less (ASCII-art stolen from lartc):
Code:
________
+------------+ /
| | |
+-------------+ Provider 1 +------- GW1
__ | ip1 | | /
___/ \_ +------+-------+ +------------+ |
_/ \__ | if1 | /
/ \ | | |
| Local network -----+ Linux router | | Internet
\_ __/ | | |
\__ __/ | if2 | \
\___/ +------+-------+ +------------+ |
| ip2 | | \
+-------------+ Provider 2 +------- GW2
| | |
+------------+ \________
The problem is, all exmple configurations I've seen so far have GW1 different from GW2, but in my case it's the same gateway
My local network is 192.168.0.0/24
if1 is ppp0, if2 is ppp1
ip1 is something like 200.190.190.1 and usually ip2 get's the next address or something very similar, like 200.190.180.2. GW1 and GW2 are both 10.10.10.1 (I'm making up the numbers, I don't have access to the linux router right now, but they're pretty close as far as I can remember)
So I add the routes like this:
ip route add 200.190.190.0/32 dev ppp0 src 200.190.190.1 table T1
ip route add default via 10.10.10.1 table T1
ip route add 200.190.180.2/32 dev ppp1 src 200.190.180.2 table T2
ip route add default via 10.10.10.1 table T2
and the rules:
ip rule add from 200.190.190.1 table T1
ip rule add from 200.190.180.2 table T2
With those rules, I can succesfully use either ppp0 or ppp1 as the default connection and browse from all PC's on the LAN
ip route add default via 10.10.10.1 dev ppp0 (or ppp1)
But when it comes time to add a default route and make it multipath, I can only connect from the Linux router itself (yes, after a reboot, I can now sucesfully ping and browse ---using Lynx-- from the router), all other PC's on the LAN are left without any connection to the outside
ip route add default scope global nexthop via 10.10.10.1 dev ppp0 weight 1 \
nexthop via 10.10.10.1 dev ppp1 weight 1
My wild guess is that it gets completely confused by the fact that both gateways are the same, so it can't choose, but I'm a complete routing newbie, so I may be screwing up somewhere and I'm just not seeing it.
I guess I could solve the issue just by splitting the network in two, and making half the PC's use the first connection and the other half the second one, but I wouldn't have automatic failover (unless I can come up with a way to switch everyone to a single interface if the other one goes down...), but it's really nagging me (I LOVE perfection :P )
If anyone has some advice, I'd be REALLY grateful!
Cheers, Joey