Static Routing Question

Lists @ Aptedtech lists at aptedtech.com
Sat Mar 20 02:12:05 UTC 2004


I have a private lan being nat'd behind 3 dsl lines on a linux box and I
would like to load balance between the three.  My default route is:

/sbin/ip route add default equalize \
        nexthop via $DSLIPADDR1  dev ppp0 weight 1 \
        nexthop via $DSLIPADDR2  dev ppp1 weight 1 \
        nexthop via $DSLIPADDR3  dev ppp2 weight 1 \

This all works great until one of the dsl lines goes down.  The kernel takes
the route out of the routing table and when the interface comes back up, the
multipath route is not restored.  I have used "protocol static" under the
assumption that the kernel would put the route back in once the interface
comes up, but instead it only puts ppp0 back in as default and takes the
entire default route out until the one interface having trouble comes back
up.

My configuration is simple, I just need the system to keep my multipath
route as in tact as possible.  If one of the interfaces goes down for a few
minutes, it is removed from the routing table, when it comes back up, it is
reinserted.  I know there has to be a better & cleaner solution than writing
some shell script to run every few minutes to check all the interfaces and
routes.  Any input or pointers would be appreciated.  Thanks all.

-Chris





More information about the redhat-list mailing list