Noticed that DHCPv6 stateful client exhibitis a 3-digit suffix (IID), e.g.
<prefix>::350
for both, ULA and GUA. Whilst that might be considered convenient for the user and not much of a concern with ULA its seems somewhat questionable for GUA.
Thus the questions:
what is the purpose of a 3-digit IID?
which part of the code is generating this short IID, supposedly something related to DHCPV6_OPT_IA_NA?
how random/stable and unique/reliable/robust (duplication potential) are those short IID?
which DHCPv6 IID standard is this methodology following, or being a case of [1]
A common operational practice for well-known servers is to manually assign a small number as the IID, in which case "u" and "g" are both zero.
if not derived from the Client Identifier (MAC/DUID) then what is the base for this short IID construct?
Same methodology as dnsmasq; initialize a PRNG with a seed derived from a client identifier (for DHCPv4 usually the MAC, for DHCPv6 in odhcpd's case a naive checksum of the DUID) then follow the pseudorandom number sequence until a non-used IP is found and use that.
The original author of odhcpd has been inactive in OpenWrt for years so I can only speculate, but my guess is that he mimicked the logic of other DHCPv6 servers.
True, but seeing the methodology for constructing the IID of 3 digits I was wondering
I mean with max. three digits the odds for duplicates are basically 1:999 and perhaps increased with what is procured as seed data and number of clients in the network.
But then there is DAD which supposedly should prevent a collision in the first place.