[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: IPv6 socket behaviour different to IPv4?
On 04/06/2014 17:20, 神明達哉 wrote:
Does this mean this address was once usable when the host is connected
(after performing DAD), but disconnecting it makes it unusable
somehow for a reason related to DAD? I'm not familiar with very
latest NetBSD kernel code, but IIRC the original DAD implementation of
the KAME project didn't behave that way. If you reboot a system while
it's disconnected, though, the kernel may try to perform DAD, making
the address tentative, noticing the interface is down, and keeping the
address tentative (thus unusable). Perhaps this is the problem
If so, again IIRC, the tentative flag should be able to be cleared
manually. We might also consider changing the kernel behavior so it
only initiates DAD when the interface becomes up.
So what used to happen is this
Tentative address assigned, DAD performed, tentative flag cleared and
optionally duplicated flag set.
What happens now is this
Tentative address assigned
IF link != DOWN then
DAD performed, tentative flag cleared and optionally duplicated
detached flag is set
Link goes from != DOWN to DOWN then all IPv6 addresses are marked as
detached (this is what Darren is complaining about)
Link goes from DOWN to != DOWN then all IPv6 addresses are marked as
tentative, detached flag is cleared and DAD is performed again
The rationale for this is simple, DAD must be performed on link change
as we may have moved to a different network.
This is also stated in RFC6509 Section 5.4
5.4. Link-Layer Indication
In order to start detection of network attachment procedures, a host
typically requires a link-layer indication that the medium has become
After the indication is received, the host MUST mark all currently
configured (non-tentative) IP addresses as inoperable until the
change detection process completes.
I chose to mark them as non tentative (ie detached) at link down,
because we're fractionally to late at link up.
I did experiment with just marking the addresses as tentative instead of
detached, but this had the side effect of an active link taking over in
a timely manner.
My use case is my laptop with wired and wireless connections, unplug one
then the other takes over.
Main Index |
Thread Index |