On Fri, 2004-12-17 at 14:48, Henrik Nordstrom wrote: > On Fri, 17 Dec 2004, David S. Miller wrote: > > > By definition, a secondary IP address on an interface is not to be used > > as a source. > > But you can, but adding a route with such address as source or > applications excplicitly binding to this source address. Even when not bound, a secondary address could be used as src if within a fitting scope+mask. > And it is > highly useful to be able to use different source addresses in the same > subnet for different purposes. You can. You can also have multiple primary addresses each on different subnets and scope. And each primary can have multiple secondary addresses. > > It is the whole reason for the distinction between primary and secondary > > IP addresses, and it is why all secondaries are deleted once the primary > > is removed (because there are no valid source addresses to choose from > > any longer, therefore IP valid communications are no longer possible). > > Which is a false assumption in very many situations. The operative term is "IP valid communications are no longer possible". When you attach an IP address for the first time on a port/interface thats a signal "IP communication using this device is now Valid". Its like ifconfiging up a device - but only for IP processing purposes. When you delete that IP address that created that signal i.e the primary address/first address attached, you are signaling "IP communication using this device is now no longer Valid". Thats why those secondary addresses are deleted. Someone please take note of this somewhere in some FAQ since it has been an issue of contention for a long time. A routing protocol implementation MUST take the above into consideration. Having said the above, I think it would make sense to have a "promotion" scheme so that in the case a primary address is deleted, one could promote the next secondary address in line. But that should be optional. Now where is the fireman who wants to do this? I could help cheering since i know the code. cheers, jamal - : send the line "unsubscribe linux-net" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html