From: Dan Williams <dcbw@redhat.com>
To: Sylvain Munaut <s.munaut@whatever-company.com>
Cc: netdev@vger.kernel.org, lorenzo@google.com
Subject: Re: Who/What is supposed to remove IPv6 address from interface when moving from one network to another ?
Date: Thu, 14 Mar 2013 14:48:15 -0500 [thread overview]
Message-ID: <1363290495.1643.29.camel@dcbw.foobar.com> (raw)
In-Reply-To: <CAF6-1L5cxguK8tHxjMACZJ8xNmAXLLXwP086eF4_SEctZdiZ3g@mail.gmail.com>
On Thu, 2013-03-14 at 20:33 +0100, Sylvain Munaut wrote:
> Hi,
>
>
> In a nutshell, I'm experiencing the same behavior as described here
> http://kerneltrap.org/mailarchive/linux-netdev/2010/10/26/6288280 ...
> but 2.5 years later ...
>
> When switching network, my interface doesn't necessarily goes down and
> so IPv6 prefixes from my old location are kept, causing issues.
>
> I read the thread above, but it just seem to "stop" without really a
> solution ...
>
> So what's the proper thing to do ? How is it supposed to work ?
> I searched for a while and except for the thread above, I couldn't
> find any reference on whose responsibility it is to cleanup. Given the
> kernel added the address itself, I'd tend to agree with the original
> poster and that the kernel should handle the cleanup.
The old network prefix should have a lifetime, and when that lifetime
has expired, it should be deleted by the kernel. However, that lifetime
is specified by the IPv6 router on your network, and may be very large.
Thus when you switch networks, if the lifetime of the old prefix has not
expired, the address is not deleted.
A daemon like NetworkManager usually handles this sort of thing for you
by watching for link/carrier events and retriggering the IP
configuration process when you connect to the new network. The kernel
does not (and shouldn't) trigger anything on carrier change as that's a
site-specific/user-specific policy.
(if you want to trigger it manually, you should be able to run 'ifconfig
eth0 down' and then 'ifconfig eth0 up' when you have connected to the
new network, which clears out the old addresses and then lets the kernel
listen for new router advertisements from the new network).
Dan
next prev parent reply other threads:[~2013-03-14 19:47 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAF6-1L4=xACZdqvJ6AZL4XkY17N0pC9PnPfNfK9Tk7QB47c1tw@mail.gmail.com>
2013-03-14 19:33 ` Who/What is supposed to remove IPv6 address from interface when moving from one network to another ? Sylvain Munaut
2013-03-14 19:48 ` Dan Williams [this message]
2013-03-18 16:51 ` Lorenzo Colitti
2013-03-18 17:03 ` Dan Williams
2013-03-18 18:11 ` Sylvain Munaut
2013-03-18 18:12 ` Lorenzo Colitti
2013-03-18 18:28 ` Sylvain Munaut
2013-03-18 20:42 ` Dan Williams
2013-03-18 20:49 ` Mikael Abrahamsson
2013-03-18 18:34 ` Hannes Frederic Sowa
2013-03-18 18:39 ` Lorenzo Colitti
2013-03-18 18:58 ` Hannes Frederic Sowa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1363290495.1643.29.camel@dcbw.foobar.com \
--to=dcbw@redhat.com \
--cc=lorenzo@google.com \
--cc=netdev@vger.kernel.org \
--cc=s.munaut@whatever-company.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).