All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Hannemann <arnd@arndnet.de>
To: David Miller <davem@davemloft.net>
Cc: dwmw2@infradead.org, netdev@vger.kernel.org, uweber@astaro.com
Subject: Re: Routing over multiple interfaces
Date: Tue, 02 Nov 2010 23:10:53 +0100	[thread overview]
Message-ID: <4CD08C6D.1090107@arndnet.de> (raw)
In-Reply-To: <20101101.141638.116372747.davem@davemloft.net>

Am 01.11.2010 22:16, schrieb David Miller:
> From: David Woodhouse <dwmw2@infradead.org>
> Date: Mon, 01 Nov 2010 17:12:02 -0400
> 
>> But when I do a large upload, I find that the kernel is only ever using
>> a *single* link at a time, rather than both. How can I make it use
>> *both* links? It's fine to confine each flow to a single link if it
>> doesn't saturate that link... but once the queue is full, it should
>> overflow onto the other device.
> 
> Once a TCP socket gets a routing cache entry, that's what it uses
> for the rest of the life of the connection.
> 
> The multi-pathing decision happens at the time the routing
> cache entry is created.

You should be able to come a solution with netfilter (probably not so efficient):

iptables -t mangle -A PREROUTING -d $EXTERNAL -m statistic --mode nth --every 2 -j MARK --set-mark 6
ip rule add fwmark 6 table ppp1
ip route replace $EXTERNAL via $PPP0GW
ip route replace $EXTERNAL via $PPP1GW table ppp1

Regards,
Arnd

  parent reply	other threads:[~2010-11-02 22:10 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-01 21:12 Routing over multiple interfaces David Woodhouse
2010-11-01 21:16 ` David Miller
2010-11-01 21:35   ` Eric Dumazet
2010-11-01 22:15     ` David Woodhouse
2010-11-02 19:46     ` Pascal Hambourg
2010-11-02 20:04       ` Eric Dumazet
2010-11-02 22:56         ` Pascal Hambourg
2010-11-10 14:50     ` David Woodhouse
2010-11-10 15:08       ` Eric Dumazet
2010-11-10 15:51         ` David Woodhouse
2010-11-02 18:47   ` Bandan Das
2010-11-02 22:10   ` Arnd Hannemann [this message]
2010-11-04 12:51     ` Patrick Schaaf
2010-11-04 14:01       ` Eric Dumazet
2010-11-01 21:21 ` Benjamin LaHaise

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CD08C6D.1090107@arndnet.de \
    --to=arnd@arndnet.de \
    --cc=davem@davemloft.net \
    --cc=dwmw2@infradead.org \
    --cc=netdev@vger.kernel.org \
    --cc=uweber@astaro.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.