lkml.org 
[lkml]   [2001]   [Oct]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: issue: deleting one IP alias deletes all

Hello,

Tim Hockin wrote:

> If you have several IP aliases on an interface (eth0:0, eth0:1, eth0:2) you
> get inconsistent behavior when downing them.
>
> * if I 'ifconfig down' eth0:1, I am left with eth0:0 and eth0:2
> * if I 'ifconfig down' eth0:0, eth0:1 and eth0:2 go away, too
>
> I assert that this should not happen. I have a simple patch to fix this
> behavior, but I want to know a few things.
>
> * Is this supposed to happen? Why?
> * Is it correct that both the real interface and the first alias are marked
> as primary (! IFA_F_SECONDARY), while all other aliases are secondary? It

If you look again into the sources you can see that
secondary addresses are those that are attached when there is
already IP address from the same subnet. The aliases don't play
here nor their number. The analyze points that the semantic
covers the selection of source addresses (probably when you don't
use preferred source address in your routes) and in some way they
look as an IP address lookup and kernel routes handling
optimizations. The other thing that I don't know is that may be
there is some compatibility reasons for such secondary flag.

> seems to me that ALL ALIASES should be secondary. Is this wrong? Why?

IMO, to keep the semantic of "attaching or detaching an IP
address" clear and independent, all addresses should be primary
because it is hard to keep correct setup when it is dynamicaly
changed. There is already mechanism (the scope) to make one address
"secondary" in the source address selection mechanism or even there
is a preferred source to make it primary. This is my opinion but
may be I'm missing some other usage. At least, the current handling
looks very dangerous.

Regards

--
Julian Anastasov <ja@ssi.bg>

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:10    [W:0.483 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site