Re: equal cost multipath at which layer?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 19, 2001 at 10:02:06AM -0400, Mordechai Ovits wrote:
> On Tuesday 19 June 2001 05:01, Andi Kleen wrote:
> > > How does equal cost multipath in linux work?  Does it round robin each
> > > packet as they come in?
> >
> > No, it round robins routes. A route is a (SRCIP, DSTIP, TOS) tripple
> > [simplified].
> 
> I understand that it keep switching between "equivalant" routes.  But does it 
> decide each packet on its own merits, or does a tcp session keep following 
> the same route?  IOW, a packet hits the routing code; two routes match.  Does 
> the fact that this packet is part an established TCP session have any sway 
> over which route gets picked?

It has nothing to do with TCP sessions. Linux maintains a routing cache, and
as long as the routing cache does not trash or is not flushed the path
decision for a single route stays identical 

(this implies that if you want rebalancing you need to flush it regularly)

> 
> > There are other ways in Linux to do per packet round-robin though; but it
> > is not recommended because it reorders packets badly and kills performance
> > for most network protocols.
> 
> I know about packet reordering.  That's one of the reason why I want sessions 
> to be "sticky".

The routing cache has a similar effect in practice; just that you cannot 
load balance multiple flows to same src/dst.

> 
> > > Do routing daemons on linux install multiple default routes?  Can they?
> >
> > Multiple default routes are a different thing; it does active failover
> > unlike standard multipath routes (the later keep that job currently for the
> > routing daemon) 
> 
> Do you mean that ECMP treats default routes differently?  And what qualifies 
> as "active failover"?  Does it stop trying to use a default route if the 
> neighbor is unreachable?  And how does it determine reachability?

The default route failover is a independent mechanism; matching the one
described in RFC 1122.  For reachability the neighbour cache with its timers
and ARP etc. probes is used.

The multipath route is currently not hooked up with the neighbour cache; instead
it relies on a routing daemon doing the reachability probing via a real 
routing protocol.

For more details please read the source.

> 
> > Latest zebra seems to support multipath routes e.g. with
> > OSPF and there is also a patchkit for gated.
> 
> Where would I find this patchkit for gated?  

Somewhere on ftp.inr.ac.ru. It may be dated and free gated is very buggy
anyways.


-Andi
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux