[Dnsmasq-discuss] DHCPv6 - network booting 'address in use'

Petr Menšík pemensik at redhat.com
Thu Sep 16 19:32:47 UTC 2021


Hi!

There is also bug on Red Hat bugzilla [1] for this issue, which contains
a bit more comments about it.

I would make short summary here. The problem is client on the same
machine with the same DUID and mac address requests IPv6. Before it
processes Advertisement, it requests IPv6 again, this time with
different IAID.

So there are two different request, the only difference are IAID and
requested options set. Now if the second request gets processed first,
it assigns lease first. Consider --dhcp-sequential-ip is in use.
Then first request processes advertisement and attempts to request the
same IP.
Now it would fail.

How should it react according to RFC 8415 [2]? In current situation,
dnsmasq responds with No address available error. Could it instead
respond with different address? How should the server and the client
behave, when advertised address is no longer available? Is it broken on
both sides?

Best Regards,
Petr

1. https://bugzilla.redhat.com/show_bug.cgi?id=1998448
2. https://datatracker.ietf.org/doc/html/rfc8415#section-18.3.2

On 9/14/21 16:58, Harald Jensas wrote:
> Hi,
>
> We are seeing an issue whit network booting over DHCPv6 is failing.
> The UEFI firmware is starting two DHCPv6 transactions, with separate
> IAID's. Initially one transactions succeeds, while the other
> transaction fails because the same address (fd42::200) is advertised.
>
> On error, the client tries to recover by restarting the transaction
> with a new SOLICIT, the second address (fd42::201) in the host's range
> [fd42::200/126] is advertised by dnsmasq.
>
> Despite requesting the second address, the dnsmasq is refusing the lease:
> dnsmasq-dhcp: 14744450 nest size: 16 option: 13 status  1 address in use
> dnsmasq-dhcp: 14744450 sent size: 24 option: 13 status  2 no addresses
> available
>
> This seems to be a bug in dnsmasq?
>
> Additional log's showing the events below.
>
>
>
> Best Regards
> Harald Jensås
>
>
>
> 14:17:39 DEBUG| [stderr] + exec /usr/sbin/dnsmasq --no-daemon
> --leasefile-ro --log-dhcp --interface net0
> '--dhcp-host=52:54:00:12:34:56,qemu.network,192.168.42.200,[fd42::200/126]'
> --dhcp-range=192.168.42.10,192.168.42.99
> --dhcp-range=fd42::10,fd42::ff --dhcp-boot=/404
> '--dhcp-option=option6:bootfile-url,tftp://[fd42::1]/EFI/BOOT/grub.efi'
> --enable-tftp
> --tftp-root=/home/kraxel/projects/edk2-tests/buildroot/initrd-x86_64
>
> [ ... ]
> 14:17:48 DEBUG| [stderr] dnsmasq-dhcp: 14547842 available DHCP range:
> fd42::10 -- fd42::ff
> 14:17:48 DEBUG| [stderr] dnsmasq-dhcp: 14547842 vendor class: 343
> 14:17:48 DEBUG| [stderr] dnsmasq-dhcp: 14547842 client MAC address:
> 52:54:00:12:34:56
> 14:17:48 DEBUG| [stderr] dnsmasq-dhcp: 14547842 DHCPSOLICIT(net0)
> 00:01:00:01:28:3d:04:67:52:54:00:12:34:56
> 14:17:48 DEBUG| [stderr] dnsmasq-dhcp: 14547842 DHCPADVERTISE(net0)
> fd42::200 00:01:00:01:28:3d:04:67:52:54:00:12:34:56 qemu
> 14:17:48 DEBUG| [stderr] dnsmasq-dhcp: 14547842 requested options:
> 59:bootfile-url, 60:bootfile-param, 23:dns-server,
> 14:17:48 DEBUG| [stderr] dnsmasq-dhcp: 14547842 requested options:
> 16:vendor-class
> 14:17:48 DEBUG| [stderr] dnsmasq-dhcp: 14547842 tags: known, dhcpv6, net0
> 14:17:48 DEBUG| [stderr] dnsmasq-dhcp: 14547842 sent size: 14 option: 
> 1 client-id  00:01:00:01:28:3d:04:67:52:54:00:12:34:56
> 14:17:48 DEBUG| [stderr] dnsmasq-dhcp: 14547842 sent size: 10 option: 
> 2 server-id  00:03:00:01:b6:fe:38:22:4e:b7
> 14:17:48 DEBUG| [stderr] dnsmasq-dhcp: 14547842 sent size: 40 option: 
> 3 ia-na  IAID=1917410942 T1=43200 T2=75600
> 14:17:48 DEBUG| [stderr] dnsmasq-dhcp: 14547842 nest size: 24 option: 
> 5 iaaddr  fd42::200 PL=86400 VL=86400
> 14:17:48 DEBUG| [stderr] dnsmasq-dhcp: 14547842 sent size:  9 option:
> 13 status  0 success
> 14:17:48 DEBUG| [stderr] dnsmasq-dhcp: 14547842 sent size:  1 option: 
> 7 preference  0
> 14:17:48 DEBUG| [stderr] dnsmasq-dhcp: 14547842 sent size: 34 option:
> 59 bootfile-url  tftp://[fd42::1]/EFI/BOOT/grub.efi
> 14:17:48 DEBUG| [stderr] dnsmasq-dhcp: 14547842 sent size: 16 option:
> 23 dns-server  fd42::1
> 14:17:48 DEBUG| [stderr] dnsmasq-dhcp: 14547842 sent size:  6 option:
> 39 FQDN  qemu
> 14:17:49 DEBUG| [stderr] dnsmasq-dhcp: 14613378 available DHCP range:
> fd42::10 -- fd42::ff
> 14:17:49 DEBUG| [stderr] dnsmasq-dhcp: 14613378 client MAC address:
> 52:54:00:12:34:56
> 14:17:49 DEBUG| [stderr] dnsmasq-dhcp: 14613378 DHCPSOLICIT(net0)
> 00:01:00:01:28:3d:04:67:52:54:00:12:34:56
> 14:17:49 DEBUG| [stderr] dnsmasq-dhcp: 14613378 DHCPADVERTISE(net0)
> fd42::200 00:01:00:01:28:3d:04:67:52:54:00:12:34:56 qemu
> 14:17:49 DEBUG| [stderr] dnsmasq-dhcp: 14613378 requested options:
> 23:dns-server
> 14:17:49 DEBUG| [stderr] dnsmasq-dhcp: 14613378 tags: known, dhcpv6, net0
> 14:17:49 DEBUG| [stderr] dnsmasq-dhcp: 14613378 sent size: 14 option: 
> 1 client-id  00:01:00:01:28:3d:04:67:52:54:00:12:34:56
> 14:17:49 DEBUG| [stderr] dnsmasq-dhcp: 14613378 sent size: 10 option: 
> 2 server-id  00:03:00:01:b6:fe:38:22:4e:b7
> 14:17:49 DEBUG| [stderr] dnsmasq-dhcp: 14613378 sent size: 40 option: 
> 3 ia-na  IAID=2066765558 T1=43200 T2=75600
> 14:17:49 DEBUG| [stderr] dnsmasq-dhcp: 14613378 nest size: 24 option: 
> 5 iaaddr  fd42::200 PL=86400 VL=86400
> 14:17:49 DEBUG| [stderr] dnsmasq-dhcp: 14613378 sent size:  9 option:
> 13 status  0 success
> 14:17:49 DEBUG| [stderr] dnsmasq-dhcp: 14613378 sent size:  1 option: 
> 7 preference  0
> 14:17:49 DEBUG| [stderr] dnsmasq-dhcp: 14613378 sent size: 16 option:
> 23 dns-server  fd42::1
> 14:17:49 DEBUG| [stderr] dnsmasq-dhcp: 14613378 sent size:  6 option:
> 39 FQDN  qemu
> 14:17:49 DEBUG| [stderr] dnsmasq-dhcp: 14678914 available DHCP range:
> fd42::10 -- fd42::ff
> 14:17:49 DEBUG| [stderr] dnsmasq-dhcp: 14678914 client MAC address:
> 52:54:00:12:34:56
> 14:17:49 DEBUG| [stderr] dnsmasq-dhcp: 14678914 DHCPREQUEST(net0)
> 00:01:00:01:28:3d:04:67:52:54:00:12:34:56
> 14:17:49 DEBUG| [stderr] dnsmasq-dhcp: Ignoring domain network for
> DHCP host name qemu
> 14:17:49 DEBUG| [stderr] dnsmasq-dhcp: 14678914 DHCPREPLY(net0)
> fd42::200 00:01:00:01:28:3d:04:67:52:54:00:12:34:56 qemu
> 14:17:49 DEBUG| [stderr] dnsmasq-dhcp:
> 14:17:49 DEBUG| [stderr] 14678914 requested options: 23:dns-server
> 14:17:49 DEBUG| [stderr] dnsmasq-dhcp: 14678914 tags: known, dhcpv6, net0
> 14:17:49 DEBUG| [stderr] dnsmasq-dhcp: 14678914 sent size: 14 option: 
> 1 client-id  00:01:00:01:28:3d:04:67:52:54:00:12:34:56
> 14:17:49 DEBUG| [stderr] dnsmasq-dhcp: 14678914 sent size: 10 option: 
> 2 server-id  00:03:00:01:b6:fe:38:22:4e:b7
> 14:17:49 DEBUG| [stderr] dnsmasq-dhcp: 14678914 sent size: 40 option: 
> 3 ia-na  IAID=2066765558 T1=43200 T2=75600
> 14:17:49 DEBUG| [stderr] dnsmasq-dhcp: 14678914 nest size: 24 option: 
> 5 iaaddr  fd42::200 PL=86400 VL=86400
> 14:17:49 DEBUG| [stderr] dnsmasq-dhcp: 14678914 sent size:  9 option:
> 13 status  0 success
> 14:17:49 DEBUG| [stderr] dnsmasq-dhcp: 14678914 sent size: 16 option:
> 23 dns-server  fd42::1
> 14:17:49 DEBUG| [stderr] dnsmasq-dhcp: 14678914 sent size:  6 option:
> 39 FQDN  qemu
> 14:17:52 DEBUG| [stderr] dnsmasq-dhcp: 14744450 available DHCP range:
> fd42::10 -- fd42::ff
> 14:17:52 DEBUG| [stderr] dnsmasq-dhcp: 14744450 vendor class: 343
> 14:17:52 DEBUG| [stderr] dnsmasq-dhcp: 14744450 client MAC address:
> 52:54:00:12:34:56
> 14:17:52 DEBUG| [stderr] dnsmasq-dhcp: 14744450 DHCPREQUEST(net0)
> 00:01:00:01:28:3d:04:67:52:54:00:12:34:56
> 14:17:52 DEBUG| [stderr] dnsmasq-dhcp: 14744450 DHCPREPLY(net0)
> 00:01:00:01:28:3d:04:67:52:54:00:12:34:56 no addresses available
> 14:17:52 DEBUG| [stderr] dnsmasq-dhcp: 14744450 requested options:
> 59:bootfile-url, 60:bootfile-param, 23:dns-server,
> 14:17:52 DEBUG| [stderr] dnsmasq-dhcp: 14744450 requested options:
> 16:vendor-class
> 14:17:52 DEBUG| [stderr] dnsmasq-dhcp: 14744450 tags: known, dhcpv6, net0
> 14:17:52 DEBUG| [stderr] dnsmasq-dhcp: 14744450 sent size: 14 option: 
> 1 client-id  00:01:00:01:28:3d:04:67:52:54:00:12:34:56
> 14:17:52 DEBUG| [stderr] dnsmasq-dhcp: 14744450 sent size: 10 option: 
> 2 server-id  00:03:00:01:b6:fe:38:22:4e:b7
> 14:17:52 DEBUG| [stderr] dnsmasq-dhcp: 14744450 sent size: 32 option: 
> 3 ia-na  IAID=1917410942 T1=4294967295 T2=4294967295
> 14:17:52 DEBUG| [stderr] dnsmasq-dhcp: 14744450 nest size: 16 option:
> 13 status  1 address in use
> 14:17:52 DEBUG| [stderr] dnsmasq-dhcp: 14744450 sent size: 24 option:
> 13 status  2 no addresses available
>
> failure ...
>
> 14:17:52 DEBUG| [stderr] dnsmasq-dhcp: 14744450 sent size: 34 option:
> 59 bootfile-url  tftp://[fd42::1]/EFI/BOOT/grub.efi
> 14:17:52 DEBUG| [stderr] dnsmasq-dhcp: 14744450 sent size: 16 option:
> 23 dns-server  fd42::1
> 14:17:52 DEBUG| [stderr] dnsmasq-dhcp: 14744450 sent size:  6 option:
> 39 FQDN  qemu
> 14:17:52 DEBUG| [stderr] dnsmasq-dhcp: 14809986 available DHCP range:
> fd42::10 -- fd42::ff
> 14:17:52 DEBUG| [stderr] dnsmasq-dhcp: 14809986 vendor class: 343
> 14:17:52 DEBUG| [stderr] dnsmasq-dhcp: 14809986 client MAC address:
> 52:54:00:12:34:56
> 14:17:52 DEBUG| [stderr] dnsmasq-dhcp: 14809986 DHCPSOLICIT(net0)
> 00:01:00:01:28:3d:04:67:52:54:00:12:34:56
> 14:17:52 DEBUG| [stderr] dnsmasq-dhcp: 14809986 DHCPADVERTISE(net0)
> fd42::201 00:01:00:01:28:3d:04:67:52:54:00:12:34:56 qemu
>
> try ask for an ip again, getting a different one now ...
>
> 14:17:52 DEBUG| [stderr] dnsmasq-dhcp: 14809986 requested options:
> 59:bootfile-url, 60:bootfile-param, 23:dns-server,
> 14:17:52 DEBUG| [stderr] dnsmasq-dhcp: 14809986 requested options:
> 16:vendor-class
> 14:17:52 DEBUG| [stderr] dnsmasq-dhcp: 14809986 tags: known, dhcpv6, net0
> 14:17:52 DEBUG| [stderr] dnsmasq-dhcp: 14809986 sent size: 14 option: 
> 1 client-id  00:01:00:01:28:3d:04:67:52:54:00:12:34:56
> 14:17:52 DEBUG| [stderr] dnsmasq-dhcp: 14809986 sent size: 10 option: 
> 2 server-id  00:03:00:01:b6:fe:38:22:4e:b7
> 14:17:52 DEBUG| [stderr] dnsmasq-dhcp: 14809986 sent size: 40 option: 
> 3 ia-na  IAID=1917410942 T1=43200 T2=75600
> 14:17:52 DEBUG| [stderr] dnsmasq-dhcp: 14809986 nest size: 24 option: 
> 5 iaaddr  fd42::201 PL=86400 VL=86400
> 14:17:52 DEBUG| [stderr] dnsmasq-dhcp: 14809986 sent size:  9 option:
> 13 status  0 success
> 14:17:52 DEBUG| [stderr] dnsmasq-dhcp: 14809986 sent size:  1 option: 
> 7 preference  0
> 14:17:52 DEBUG| [stderr] dnsmasq-dhcp: 14809986 sent size: 34 option:
> 59 bootfile-url  tftp://[fd42::1]/EFI/BOOT/grub.efi
> 14:17:52 DEBUG| [stderr] dnsmasq-dhcp: 14809986 sent size: 16 option:
> 23 dns-server  fd42::1
> 14:17:52 DEBUG| [stderr] dnsmasq-dhcp: 14809986 sent size:  6 option:
> 39 FQDN  qemu
> 14:17:54 DEBUG| [stderr] dnsmasq-dhcp: 14744450 available DHCP range:
> fd42::10 -- fd42::ff
> 14:17:54 DEBUG| [stderr] dnsmasq-dhcp: 14744450 vendor class: 343
> 14:17:54 DEBUG| [stderr] dnsmasq-dhcp: 14744450 client MAC address:
> 52:54:00:12:34:56
> 14:17:54 DEBUG| [stderr] dnsmasq-dhcp: 14744450 DHCPREQUEST(net0)
> 00:01:00:01:28:3d:04:67:52:54:00:12:34:56
> 14:17:54 DEBUG| [stderr] dnsmasq-dhcp: 14744450 DHCPREPLY(net0)
> 00:01:00:01:28:3d:04:67:52:54:00:12:34:56 no addresses available
> 14:17:54 DEBUG| [stderr] dnsmasq-dhcp: 14744450 requested options:
> 59:bootfile-url, 60:bootfile-param, 23:dns-server,
> 14:17:54 DEBUG| [stderr] dnsmasq-dhcp: 14744450 requested options:
> 16:vendor-class
> 14:17:54 DEBUG| [stderr] dnsmasq-dhcp: 14744450 tags: known, dhcpv6, net0
> 14:17:54 DEBUG| [stderr] dnsmasq-dhcp: 14744450 sent size: 14 option: 
> 1 client-id  00:01:00:01:28:3d:04:67:52:54:00:12:34:56
> 14:17:54 DEBUG| [stderr] dnsmasq-dhcp: 14744450 sent size: 10 option: 
> 2 server-id  00:03:00:01:b6:fe:38:22:4e:b7
> 14:17:54 DEBUG| [stderr] dnsmasq-dhcp: 14744450 sent size: 32 option: 
> 3 ia-na  IAID=1917410942 T1=4294967295 T2=4294967295
> 14:17:54 DEBUG| [stderr] dnsmasq-dhcp: 14744450 nest size: 16 option:
> 13 status  1 address in use
> 14:17:54 DEBUG| [stderr] dnsmasq-dhcp: 14744450 sent size: 24 option:
> 13 status  2 no addresses available
>
> Still nacked by the DHCP server
>
>
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss

-- 
Petr Menšík
Software Engineer
Red Hat, http://www.redhat.com/
email: pemensik at redhat.com
PGP: DFCF908DB7C87E8E529925BC4931CA5B6C9FC5CB





More information about the Dnsmasq-discuss mailing list