netdev
[Top] [All Lists]

Re: primary and secondary ip addresses

To: Harald Welte <laforge@xxxxxxxxxxxx>
Subject: Re: primary and secondary ip addresses
From: Paul Jakma <paul@xxxxxxxx>
Date: Thu, 16 Dec 2004 16:48:31 +0000 (UTC)
Cc: Henrik Nordstrom <hno@xxxxxxxxxxxxxxx>, Neil Horman <nhorman@xxxxxxxxxx>, linux-net@xxxxxxxxxxxxxxx, netdev@xxxxxxxxxxx
In-reply-to: <20041216092831.GO2862@xxxxxxxxxxxxxxxxxxxxxxx>
Mail-followup-to: paul@xxxxxxxxxxxxxxxxxx
References: <41912F7A.6000408@xxxxxxxxxx> <Pine.LNX.4.61.0411100034320.10593@xxxxxxxxxxxxxxxxxxxxx> <20041216092831.GO2862@xxxxxxxxxxxxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
On Thu, 16 Dec 2004, Harald Welte wrote:

... and why does removing the primary address remove all secondary addresses.

Because applications may have state which relies on the implied source address selection, I'd hazard a guess. If you dont remove the secondaries, you might break the apps - but i dont know.

(certainly, the primary/secondary thing in kernel is useful - though, it possibly doesnt need to be in kernel.)

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.

That's bad planning. ;)

You should assign your failover addresses seperately to your primary. Ie, the primary should never fail over - its unique to the machine/interface.

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.

Ick ;)

Can anyone comment what the idea of all this was?

Source address selection. ?

Thanks.

regards,
--
Paul Jakma      paul@xxxxxxxx   paul@xxxxxxxxx  Key ID: 64A2FF6A
Fortune:
Prizes are for children.
                -- Charles Ives, upon being given, but refusing, the
                   Pulitzer prize

<Prev in Thread] Current Thread [Next in Thread>