netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: ip address delete bug?
       [not found] ` <4342D3F9.80705@gmx.net>
@ 2005-10-04 21:23   ` Alexey Toptygin
  2005-10-04 22:58     ` Carl-Daniel Hailfinger
  0 siblings, 1 reply; 4+ messages in thread
From: Alexey Toptygin @ 2005-10-04 21:23 UTC (permalink / raw)
  To: Carl-Daniel Hailfinger; +Cc: lartc, netdev

On Tue, 4 Oct 2005, Carl-Daniel Hailfinger wrote:

> OK, I found out that this is documented behaviour, although the hint is not 
> in the man page.

If it's not in the man page, then where is the below quote from?

> "secondary --- this address is not used when selecting the default source 
> address for outgoing packets. An IP address becomes secondary if another 
> address within the same prefix (network) already exists. The first address 
> within the prefix is primary and is the tag address for the group of all the 
> secondary addresses. When the primary address is deleted all of the 
> secondaries are purged too."
>
> That means there is no way to change the IP of an interface if the prefix and 
> network size stay the same. Are there any plans to fix that?

What's wrong with delete followed by add?

This thread started on netdev, so I'm cc-ing that, in case someone doesn't 
read both lists.

 			Alexey

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ip address delete bug?
  2005-10-04 21:23   ` ip address delete bug? Alexey Toptygin
@ 2005-10-04 22:58     ` Carl-Daniel Hailfinger
  2005-10-04 23:08       ` Alexey Toptygin
  0 siblings, 1 reply; 4+ messages in thread
From: Carl-Daniel Hailfinger @ 2005-10-04 22:58 UTC (permalink / raw)
  To: Alexey Toptygin; +Cc: lartc, netdev

Alexey Toptygin schrieb:
> On Tue, 4 Oct 2005, Carl-Daniel Hailfinger wrote:
> 
>> OK, I found out that this is documented behaviour, although the hint 
>> is not in the man page.
> 
> If it's not in the man page, then where is the below quote from?

ip-cref.tex.

>> "secondary --- this address is not used when selecting the default 
>> source address for outgoing packets. An IP address becomes secondary 
>> if another address within the same prefix (network) already exists. 
>> The first address within the prefix is primary and is the tag address 
>> for the group of all the secondary addresses. When the primary address 
>> is deleted all of the secondaries are purged too."
>>
>> That means there is no way to change the IP of an interface if the 
>> prefix and network size stay the same. Are there any plans to fix that?
> 
> What's wrong with delete followed by add?

You are logged into the machine via ssh on eth0. You delete the ip 
address of eth0. How are you going to add the new address to eth0 now 
that your connection is gone? Go to the server room and use the console?

Normally, I would add the new IP to eth0, start another ssh to the new 
IP, log out from the session to the old IP, remove the old IP from eth0 
and be done. If I want the server to be reachable under both IPs during 
a transition period, I can delay deletion of the old IP until later.

> This thread started on netdev, so I'm cc-ing that, in case someone 
> doesn't read both lists.

Didn't start there, but if netdev is interested, we can keep them in cc.


>             Alexey

Regards,
Carl-Daniel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ip address delete bug?
  2005-10-04 22:58     ` Carl-Daniel Hailfinger
@ 2005-10-04 23:08       ` Alexey Toptygin
       [not found]         ` <1128474946.6224.8.camel@localhost.localdomain>
  0 siblings, 1 reply; 4+ messages in thread
From: Alexey Toptygin @ 2005-10-04 23:08 UTC (permalink / raw)
  To: Carl-Daniel Hailfinger; +Cc: lartc, netdev

On Wed, 5 Oct 2005, Carl-Daniel Hailfinger wrote:

>>> "secondary --- this address is not used when selecting the default source 
>>> address for outgoing packets. An IP address becomes secondary if another 
>>> address within the same prefix (network) already exists. The first address 
>>> within the prefix is primary and is the tag address for the group of all 
>>> the secondary addresses. When the primary address is deleted all of the 
>>> secondaries are purged too."
>>> 
>>> That means there is no way to change the IP of an interface if the prefix 
>>> and network size stay the same. Are there any plans to fix that?
>> 
>> What's wrong with delete followed by add?
>
> You are logged into the machine via ssh on eth0. You delete the ip address of 
> eth0. How are you going to add the new address to eth0 now that your 
> connection is gone? Go to the server room and use the console?
>
> Normally, I would add the new IP to eth0, start another ssh to the new IP, 
> log out from the session to the old IP, remove the old IP from eth0 and be 
> done. If I want the server to be reachable under both IPs during a transition 
> period, I can delay deletion of the old IP until later.

Then I guess the question is: does anything in common use depend on the 
old behavior?

 			Alexey

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ip address delete bug?
       [not found]         ` <1128474946.6224.8.camel@localhost.localdomain>
@ 2005-10-05 15:32           ` Carl-Daniel Hailfinger
  0 siblings, 0 replies; 4+ messages in thread
From: Carl-Daniel Hailfinger @ 2005-10-05 15:32 UTC (permalink / raw)
  To: hadi; +Cc: lartc, netdev

jamal wrote:
> On Tue, 2005-04-10 at 23:08 +0000, Alexey Toptygin wrote:
> 
>>On Wed, 5 Oct 2005, Carl-Daniel Hailfinger wrote:
> 
> [..]
> 
>>>Normally, I would add the new IP to eth0, start another ssh to the new IP, 
>>>log out from the session to the old IP, remove the old IP from eth0 and be 
>>>done. If I want the server to be reachable under both IPs during a transition 
>>>period, I can delay deletion of the old IP until later.
>>
>>Then I guess the question is: does anything in common use depend on the 
>>old behavior?
> 
> There's a new feature in newer kernels which allows for an alias to be
> upgraded to become primary when you delete the primary. You need to
> configure the sysctl otherwise it defaults to purging all the
> secondaries when you delete the primary.

Thanks for that feature! Just looked at
/proc/sys/net/ipv4/conf/*/promote_secondaries
and it is the feature I was looking for. Merged in 2.6.12, if anyone 
reads this in a mail archive and wonders whether he has to upgrade.


This leads to another question: Can I manually promote a secondary 
address to become primary without deleting the primary? This would help 
me to use the new address by default during the transition period.


> What it sounds like is you need to have ssh run over SCTP instead of TCP
> to allow multi-homing. 

Maybe, but I did not find any current openssh version with sctp support. 
And with promote_secondaries, my original problem is solved perfectly.


Regards,
Carl-Daniel
-- 
http://www.hailfinger.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-10-05 15:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <200593200127124@mail.routehat.org>
     [not found] ` <4342D3F9.80705@gmx.net>
2005-10-04 21:23   ` ip address delete bug? Alexey Toptygin
2005-10-04 22:58     ` Carl-Daniel Hailfinger
2005-10-04 23:08       ` Alexey Toptygin
     [not found]         ` <1128474946.6224.8.camel@localhost.localdomain>
2005-10-05 15:32           ` Carl-Daniel Hailfinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).