[ipxe-devel] Need to release DHCPv6 address before booting image
Harald Jensås
hjensas at redhat.com
Thu Nov 14 10:45:50 UTC 2019
Hello iPXE Devel list,
I am trying to work out how to provision servers using Openstack Ironic
with DHCPv6-statefull addressing. Running into issues previously
reported by others here[1] related to how DHCP servers keep track of
client's and their address reservations.
The problem is that the IAID and the ClientID in the dhcp request
changes during the provisioning process:
1. The IAID being used in PXE generated by the OVMF UEFI firmware is a
function including a time based seed[2]
2. UEFI chain loads to an iPXE image that is using a crc of
the mac address to generate the IAID[3],
3. dhclient on the OS (deployment ramdisk) then uses the last 4 octets
of the MAC address for the IAID[4].
The DHCP server (dnsmasq) is configured with static addressing matching
on MAC address. I get to stage 3 because the OVMF UEFI firmware is kind
enough to do a RELEASE before booting the Network Boot Program (NBP);
iPXE in my case. Since the UEFI firmware released the address iPXE
successfully get IP and configuration so that it can download the
deploy kernel and ramdisk. When the deploy ramdisk boot's and attempt
DHCPv6 the DHCP server respond with "no addresses available".
The DHCP server is correct, the address assigned to the client's MAC is
already leased to the iPXE client.
As far as I can tell there is no way to tell iPXE to do something like
this?
#!ipxe
imgfree
kernel --timeout 60000 http://[fd12:3456:789a:1::1]:8088/vmlinuz
BOOTIF=${mac} i initrd=initrd
initrd --timeout 60000 http://[fd12:3456:789a:1::1]/initrd
<%- Command to release DHCPv6 address -%>
boot
[1]
http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2017q1/011267.html
[2]
https://github.com/tianocore/edk2/blob/418373a1cd97abc0c0e3557f7a00105291829e6f/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c#L866
[3] https://github.com/qemu/ipxe/blob/c34d151/src/net/udp/dhcpv6.c#L972
[4]
https://source.isc.org/cgi-bin/gitweb.cgi?p=dhcp.git;a=blob;f=client/dhc6.c;h=be604ac988a983b2829f76fe2bff6a5f036d8019;hb=HEAD#l1716
More information about the ipxe-devel
mailing list