Subject: Re: IPv6 aliases on networking interfaces
To: None <tech-net@NetBSD.org>
From: David Young <dyoung@pobox.com>
List: tech-net
Date: 09/27/2005 14:30:07
On Tue, Sep 27, 2005 at 01:25:44PM +0100, Matthias Scheler wrote:
> 
> 	Hello,
> 
> I've just added an IPv6 alias address to the one and only network interface
> on my server like this:
> 
> 	ifconfig wm0 inet6 ab:cd:ef:89::2 alias 
> 
> But "ifconfig" displays it as a second IPv6 address:
> 
> 	tron@colwyn:~>ifconfig wm0
> 	wm0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
> [...]
>         	inet6 ab:cd:ef:89::1 prefixlen 64
> 	        inet6 ab:cd:ef:89::2 prefixlen 64
> 
> And the network stack actually treats it like a normal IPv6 addresses and
> uses it for outgoing connections which is not what I wanted.
> 
> Is there any way to prevent this?

Matthias,

There is no sure-fire way to prevent it.  (In my experience, it requires
entirely too much operator care to get the address ordering right.)

Look at the source-address selection patches that I posted a few weeks
ago.  The 'preference' idea is equally applicable to IPv6 as to IPv4,
although I have not written code for the IPv6 case.

Dave

-- 
David Young             OJC Technologies
dyoung@ojctech.com      Urbana, IL * (217) 278-3933