Kevin Darbyshire-Bryant
2016-11-21 11:22:56 UTC
Hi All,
This problem has been around a while (forever?) but it's only just
annoyed me sufficiently to investigate.
The box in question is running a recent version LEDE and in my case
dnsmasq git head bleeding edge. LEDE normally uses its homegrown odhcpd
to hand out DHCPv6 addresses, whereas I choose to disable this and use
dnsmasq. I use DHCPv6 stateful to hand out addresses, no SLAAC.
The problem is that some devices (Apple) only obtain a ULA based address
allocation when using dnsmasq. Using odhcpd they obtain both a ULA and
global address.
I've previously worked around this simply by removing the ULA prefix
from the LAN interface but the question remains....why does this and
should this happen? Who is wrong? dnsmasq or odhcpd?
dnsmasq:
Mon Nov 21 10:25:49 2016 daemon.info dnsmasq-dhcp[27664]:
DHCPSOLICIT(br-lan) 00:01:00:01:18:c6:20:23:ac:3c:0b:0c:e7:fd
Mon Nov 21 10:25:49 2016 daemon.info dnsmasq-dhcp[27664]:
DHCPADVERTISE(br-lan) fdb5:c64a:3cd0:2b::4ff0:198e
00:01:00:01:18:c6:20:23:ac:3c:0b:0c:e7:fd
Mon Nov 21 10:25:49 2016 daemon.info dnsmasq-dhcp[27664]:
DHCPADVERTISE(br-lan) 2a02:c7f:1220:bf2b::4ff0:198e
00:01:00:01:18:c6:20:23:ac:3c:0b:0c:e7:fd
Mon Nov 21 10:25:49 2016 daemon.info dnsmasq-dhcp[27664]:
DHCPREQUEST(br-lan) 00:01:00:01:18:c6:20:23:ac:3c:0b:0c:e7:fd
Mon Nov 21 10:25:49 2016 daemon.info dnsmasq-dhcp[27664]:
DHCPREPLY(br-lan) fdb5:c64a:3cd0:2b::4ff0:198e
00:01:00:01:18:c6:20:23:ac:3c:0b:0c:e7:fd
Curiously, the solicit gets responded to by two advertises, one ULA, one
global. The follow up dhcprequest only gets the single (ULA) response.
odhcpd:
Mon Nov 21 10:27:48 2016 daemon.warn odhcpd[1426]: DHCPV6 SOLICIT IA_NA
from 0001000118c62023ac3c0b0ce7fd on br-lan: ok
2a02:c7f:1220:bf2b::85e/128 fdb5:c64a:3cd0:2b::85e/128
Clearly the logging is very different and ideally I should grab a packet
dump (being worked on!) to see how this is handled at the packet level
(e.g. does dnsmasq send two reply packets vs odhcpd sends one but with
two answers as hinted by the logs)
Insight and assistance appreciated :-)
Kevin
This problem has been around a while (forever?) but it's only just
annoyed me sufficiently to investigate.
The box in question is running a recent version LEDE and in my case
dnsmasq git head bleeding edge. LEDE normally uses its homegrown odhcpd
to hand out DHCPv6 addresses, whereas I choose to disable this and use
dnsmasq. I use DHCPv6 stateful to hand out addresses, no SLAAC.
The problem is that some devices (Apple) only obtain a ULA based address
allocation when using dnsmasq. Using odhcpd they obtain both a ULA and
global address.
I've previously worked around this simply by removing the ULA prefix
from the LAN interface but the question remains....why does this and
should this happen? Who is wrong? dnsmasq or odhcpd?
dnsmasq:
Mon Nov 21 10:25:49 2016 daemon.info dnsmasq-dhcp[27664]:
DHCPSOLICIT(br-lan) 00:01:00:01:18:c6:20:23:ac:3c:0b:0c:e7:fd
Mon Nov 21 10:25:49 2016 daemon.info dnsmasq-dhcp[27664]:
DHCPADVERTISE(br-lan) fdb5:c64a:3cd0:2b::4ff0:198e
00:01:00:01:18:c6:20:23:ac:3c:0b:0c:e7:fd
Mon Nov 21 10:25:49 2016 daemon.info dnsmasq-dhcp[27664]:
DHCPADVERTISE(br-lan) 2a02:c7f:1220:bf2b::4ff0:198e
00:01:00:01:18:c6:20:23:ac:3c:0b:0c:e7:fd
Mon Nov 21 10:25:49 2016 daemon.info dnsmasq-dhcp[27664]:
DHCPREQUEST(br-lan) 00:01:00:01:18:c6:20:23:ac:3c:0b:0c:e7:fd
Mon Nov 21 10:25:49 2016 daemon.info dnsmasq-dhcp[27664]:
DHCPREPLY(br-lan) fdb5:c64a:3cd0:2b::4ff0:198e
00:01:00:01:18:c6:20:23:ac:3c:0b:0c:e7:fd
Curiously, the solicit gets responded to by two advertises, one ULA, one
global. The follow up dhcprequest only gets the single (ULA) response.
odhcpd:
Mon Nov 21 10:27:48 2016 daemon.warn odhcpd[1426]: DHCPV6 SOLICIT IA_NA
from 0001000118c62023ac3c0b0ce7fd on br-lan: ok
2a02:c7f:1220:bf2b::85e/128 fdb5:c64a:3cd0:2b::85e/128
Clearly the logging is very different and ideally I should grab a packet
dump (being worked on!) to see how this is handled at the packet level
(e.g. does dnsmasq send two reply packets vs odhcpd sends one but with
two answers as hinted by the logs)
Insight and assistance appreciated :-)
Kevin