On Wed, Aug 03, 2011 at 04:44:49PM +0200, Marco wrote: > Hi Stuart, > > /etc/hostname.trunk0 > trunkproto loadbalance trunkport bge0 trunkport bge1 > inet public1 255.255.255.248 bcaddr > inet alias public2 255.255.255.248 bcaddr > inet alias public3 255.255.255.248 bcaddr > inet alias 10.private1 255.255.255.248 bcaddr > inet alias 10.private2 255.255.255.248 bcaddr > inet alias 10.private3 255.255.255.248 bcaddr
Never use a netmask different then 255.255.255.255 for aliases unless they are for different network. This is the only way to get a reliable main address. > inet6 alias private:f020::4 64 > inet6 alias private:f020::3 64 > inet6 alias private:f020::2 64 > inet6 alias public::f020::4 64 > inet6 alias public::f020::3 64 > inet6 alias public::f020::2 64 > up > Unsure about inet6. Their source address selection is so complex and stupid that you never know what you get. But I guess you could try a prefixlen of 128 for the secondary IPv6 addrs and see if that helps. > rfc3484 rules 2 (scope) and 7 (pref-public) apply. > > If the order is reversed 2,3,4 instead of the above 4,3,2 ping6 selects 4 > as srcaddr. > > If I remove the 'alias' keyword from the inet6 addr I wish to be > "preferred" I see no difference. Alias never had anything to do with "preferred" addresses. It just told ifconfig to use a different ioctl() that does not remove a possibly previously configured IP address. IPv6 has different ioctl behaviours. > For me it seems the network stack just takes the "most-recently-added" > net6 address as the "greatest" as to use the term from the rfc. > > If you take the addresses 4,5,3 (in this order) it will select ::3 as > source. > > Whats the purpose of 'alias' in the inet6 context if its not honored? > What do you think the purpose of 'alias' is in the inet6 context? inet6 does not have the concept of aliases, alias is the default behaviour. -- :wq Claudio
