DAD
What
Detect if a certain address is already in use
Only need to check within subnet, since it either concerns a link-local address, or a global scope address, but only your subnet uses the prefix provided to/by your router
Why
To prevent duplicate addresses caused by:
- Duplicate MAC
- Duplicate random output
- Manual config errors
Even with a DHCPv6 server, IPv6 still mandates the use of DAD as a backup
Concepts
- Tentative address
- The address currently being checked for use
- Cannot yet be used for normal traffic
- Neighbour Solicitation (NS): ICMPv6 message asking if the address is in use
- Neighbour Advertisement (NA): ICMPv6 message indicating that the address is in use
- Unspecified source: for the NS, the source
::is used, since the source does not yet have a usable address
How
- Generate address, as specified in SLAAC
- Based on the last 24 bits (last 1.5 segments), join the appropriate solicited-node multicast group
- E.g.
2001:db8:1::a4b3:8f21:c9d2:1e5f->d2:1e5f, join multicast groupff02::1:ffd2:1e5f(all nodes group + last bits)
- E.g.
- In said group send a Neighbour Solicitation with
- Source address:
::, since there is no usable address yet - Destination: multicast group address, e.g.
ff02::1:ffd2:1e5f - Target address: the address being tested, e.g.
2001:db8:1::a4b3:8f21:c9d2:1e5f
- Source address:
- Wait for response
- Duration set by
RetransTimer
- Duration set by
- No response received: address is free and can be used
- Transition from tentative to preferred
- Response received: address is in use
- If using SLAAC, the device can try again
- If manually configured, manual steps are needed