Re: DHCPD server IPv6 address selection
Roy Marples
Mon Mar 16 13:34:46 2020
Hi Dusan
On 16/03/2020 12:47, Mudric, Dusan (Dusan) wrote:
What does DHCPv6 server do when the phone detects the assigned address is
duplicated?
* If the address is statically assigned, is the server going to send the same
address, which cannot be used since it is duplicated?
* If the address is from a pool, is the server going to send a new address?
* Any other option?
There has been this long standing comment at the top of dhcp6.c
https://roy.marples.name/cgit/dhcpcd.git/tree/src/dhcp6.c#n29
/* TODO: We should decline dupliate addresses detected */
Basically, DHCPv6 is made complicated by having many addresses and I've never
gotten around to actually trying to decline some of the addresses.
But to answer your question - it depends on the server. There is no RFC that
states what the behaviour should be to my knowledge.
I do know that ISC dhcpd and probably WIDE dhcp6 servers will just send the same
address over and over so I've never really been hot on fixing it. Especially as
there is a lot less scope for duplication in IPv6.
dnsmasq on the other hand DOES have code to avoid endless loops for dhcpv4 and
very likely for dhcpv6 as well where it will hand out a different address or
prefix from the pool.
But dhcpcd still won't actively do anything yet.
It's on my todo list after dhcpcd-9 is released (I need to do a disk replacement
in my server first, it's dying).
Roy
Archive administrator: postmaster@marples.name