[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1363290495.1643.29.camel@dcbw.foobar.com>
Date: Thu, 14 Mar 2013 14:48:15 -0500
From: Dan Williams <dcbw@...hat.com>
To: Sylvain Munaut <s.munaut@...tever-company.com>
Cc: netdev@...r.kernel.org, lorenzo@...gle.com
Subject: Re: Who/What is supposed to remove IPv6 address from interface when
moving from one network to another ?
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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists