netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: Daniel Walter <dwalter@barracuda.com>
Cc: Florian Westphal <fw@strlen.de>,
	David Miller <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: ipv6: Add support for RTA_PREFSRC
Date: Mon, 11 Apr 2011 09:58:25 +0200	[thread overview]
Message-ID: <20110411075825.GA21943@Chamillionaire.breakpoint.cc> (raw)
In-Reply-To: <1302506552.8923.21.camel@localhost>

Daniel Walter <dwalter@barracuda.com> wrote:
> On Thu, 2011-04-07 at 14:25 -0700, Florian Westphal wrote:
> > David Miller <davem@davemloft.net> wrote:
> > > This would be akin to ipv4's FIB_RES_PREFSRC
> > 
> > OK, I'll bite.
> > 
> > Whats wrong with using ipv6 addrlabels to pick the desired address,
> > and, if there is a problem, why is it not fixable?
> > 
> > Just wondering...
> Hi,
> 
> As far as I've understood addrlabels, they allow me to define the
> overall preferred source. As soon I want to select the default src
> only for a given route, addrlabels cannot do the job.
> for example:
> ip-addresses on eth0
> 2001:0DB8::1/64
> 2001:0DB8::2/64
> routes
> 2001:0DB8::/64
> 2001:0DB8:0:dead::/64 via 2001:0DB8::1234/64
> 
> addrlabel allow me to set the default source address to 2001:0DB8::1 for
> both routes. with pref_src selection one is able to set the default
> outgoing address for each route to the needed address, which may be
> 2001:0DB8::1 for the first route, and 2001:0DB8::2 for the remaining.
> 
> Please feel free to correct me if I misunderstood something.

ip addrlabel add label 1000 prefix 2001:db8::1
ip addrlabel add label 1000 prefix 2001:db8::/64
ip addrlabel add label 1001 prefix 2001:db8::2
ip addrlabel add label 1001 prefix 2001:0DB8:0:dead::/64

ip route add 2001:db8:0:dead::/64 via 2001:db8::1234

This should tell the stack to pick 2001:db8::1 as the
source address when talking to 2001:db8::/64, and to
use 2001:db8::2 when talking to 2001:0DB8:0:dead::42.

      reply	other threads:[~2011-04-11  7:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-02  3:46 ipv6: Add support for RTA_PREFSRC David Miller
2011-04-04  7:56 ` Daniel Walter
2011-04-07  1:37   ` David Miller
2011-04-07  9:23     ` Daniel Walter
2011-04-07 20:27       ` David Miller
2011-04-07 21:25     ` Florian Westphal
2011-04-11  7:22       ` Daniel Walter
2011-04-11  7:58         ` Florian Westphal [this message]

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=20110411075825.GA21943@Chamillionaire.breakpoint.cc \
    --to=fw@strlen.de \
    --cc=davem@davemloft.net \
    --cc=dwalter@barracuda.com \
    --cc=netdev@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).