Re: primary and secondary ip addresses

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[Cc'ing netdev, since nobody replied since november]

On Wed, Nov 10, 2004 at 12:38:19AM +0100, Henrik Nordstrom wrote:
> On Tue, 9 Nov 2004, Neil Horman wrote:
> 
> >Can anyone tell me why when removing a primary ip address from an 
> >interface, all of its associated secondary ip addresses (those addresses 
> >on the same subnet), are also removed?  Theres a comment in the kernel 
> >thats pretty clear on the subject indicating it needs to be done, but I 
> >don't quite grasp the reasoning behind why.
> 
> A more valid question is why one can not add more than one primary in the 
> same subnet.
> 
> ip addr add x.x.x.x/y dev eth0 primary
> 
> would make sense to me, clearly indicating that these addresses are 
> maintained separately.

agreed.

> or put in another way why the addresses automatically become secondary 
> addresses to the first added address.

... and why does removing the primary address remove all secondary
addresses.  This makes it complicated if you have one interface with
multiple ip addresse, that change over time (failover, let's say.)  You
don't know yet, which address you need to remove, because you don't know
which of your peers fails. 

So you have all this complicated userspace magic that checks whether the
address that is about to be deleted is the primary, and if yes, re-add
all the other addresses.  If if is a secondary, you're happy and only
need to delete that one.

Can anyone comment what the idea of all this was?

Thanks.

-- 
- Harald Welte <laforge@xxxxxxxxxxxx>               http://www.gnumonks.org/
============================================================================
Programming is like sex: One mistake and you have to support it your lifetime

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux