Multiple routes to the same destination

David Gilbert dgilbert at dclg.ca
Sat Jun 24 17:35:58 UTC 2006


>>>>> "Christopher" == Christopher Martin <outsidefactor at iinet.net.au> writes:

Christopher> Actually, round robin is exactly what I want. And I am
Christopher> not saying I don't use a routing protocol, in fact I do,
Christopher> but I want packets to be able to use two or more diverse
Christopher> paths of equivalent cost.

No.  round-robin will deliver packets out-of-order.  TCP will behave
very badly with this (at the very least, smart selective-ack hosts
will transmit a lot of selective-ack packets --- but dumb
non-selective-ack hosts will start asking for a lot of
retransmission).  Other protocols tolerance for OOO packets varies.

Generally devices that use multiple routes (like a cisco) rather than
things that simply accept multiple routes (like windoze) have some set
of rules that generally deliver all traffic for a set of hosts down
one of the available routes.

"Etherchannel" (a simple layer two bonding that is available in
FreeBSD as ng_fec) does this by XORing the last couple of bits of the
MAC addresses (source and dest) and uses this to choose one of two or
one of four links to forward the packet.  I suspect
equal-cost-multipath on Ciscos does the same with IP addresses.

Linux does all this with it's flow table --- that is each 5-tuple of
source ip,port dest ip,port (and protocol) is stored as a "flow" in a
big hash table.  The table stores things like the next-hop interface
and destination.

Now... this is an unscalble solution --- it's reasonably trivial to
knock over a linux router with a simple DOS ... details left to the
interested reader.

Dave.

-- 
============================================================================
|David Gilbert, Independent Contractor.       | Two things can be          |
|Mail:       dave at daveg.ca                    |  equal if and only if they |
|http://daveg.ca                              |   are precisely opposite.  |
=========================================================GLO================


More information about the freebsd-net mailing list