In article <[EMAIL PROTECTED]> you write:
>I currently have a machine with two equal-cost routes via two interfaces:
>
>0.0.0.0                10.1.1.1        0.0.0.0 UG      0       0       0  eth1
>0.0.0.0                10.1.1.1        0.0.0.0 UG      0       0       0  eth2
>
>It does load-share.  If you test by pinging a single IP address,
>everything goes out one interface...  then try a second IP address, it
>uses the other.  The load sharing is done by selecting one of the two 
>equal-cost routes on an IP-by-IP basis.  It's done, apparently, by address
>and not by network; packets to (for example) 1.2.3.4 will use eth1,
>packets to 1.2.3.5 will use eth2.  

Hmmm...that's not what I'm seeing.  Hmmm...hang on, you have the same
gateway in both places, and that gives me an idea...

OK, what I had before was:

        route add default eth1          # using proxy ARP
        route add default eth2          # on both interfaces

or:

        route add -net 12.34.56.0 netmask 255.255.255.0 eth1
        route add default gw 12.34.56.1 eth1
        route add -net 23.45.67.0 netmask 255.255.255.0 eth2
        route add default gw 23.45.67.1 eth2

Both of the above don't work; everything gets routed out eth2 using
eth1's interface address.

The following _does_ work:

        route add -net 12.34.56.0 netmask 255.255.255.0 eth1
        route add default gw 12.34.56.1 eth1
        route add -net 23.45.67.0 netmask 255.255.255.0 eth2
        route add 12.34.56.1 eth2               # bogosity
        route add default gw 12.34.56.1 eth2

_Now_ I get load sharing.  The "bogosity" line relies on proxy ARP
support in the upstream router.  The following returns an error, even
though it is more "correct":

        route add 12.34.56.1 gw 23.45.67.1 eth2
        route add default gw 12.34.56.1 eth2
        (says "no route to host")

I think it would be useful if the equal cost multipath code could be
adjusted such that a gateway which is the target of a default route is
equivalent to any other gateway that is also the target of a default
route if the metrics are the same.  Right now the code only works if there
are two routes to the same gateway.

-- 
Zygo Blaxell, Linux Engineer, Corel Corporation.  [EMAIL PROTECTED] (work) or
[EMAIL PROTECTED] (play).  Opinions above are my own, not Corel's.
Linux mokona 2.2.9 #1 Jun 12 02:07 EDT 1999 i586 up 21:05
Linux naga 2.0.36 #1 Dec 29 13:11 EST 1998 up 12 days, 8:44
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]

Reply via email to