lkml.org 
[lkml]   [2001]   [Aug]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: iproute2 routing problem.
Jean-Sebastien Morisset wrote:

> I have an ADSL modem on ppp0, and a CableModem on eth1. The plan is to
> make all services available on the ADSL, and use the CableModem as my
> default route (load balancing and fail-over are planned). Unfortunately,
> Linux gets confused if a public IP comes in on ppp0 since it's default
> route is eth1.

Assuming that you have cable already set up as the default route, why not do
something like this:

ip rule add to 10.1.1.0/24 lookup main pref 500
ip rule add from 64.39.178.10 lookup adsl pref 1000
ip route add default via 64.39.160.16 dev ppp0 table adsl

This way anything local gets routed over eth1, and anything nonlocal coming from
your DSL address (as it would if someone connects to your services over that
address) gets sent out over the DSL connection.

You should be able to set up some kind of variation of this for failover/load
balancing. I've done some custom work in this area for work and a local
failover takes about 5ms after detection of a problem.

Chris

--
Chris Friesen | MailStop: 043/33/F10
Nortel Networks | work: (613) 765-0557
3500 Carling Avenue | fax: (613) 765-2986
Nepean, ON K2H 8E9 Canada | email: cfriesen@nortelnetworks.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:17    [W:0.032 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site