DHCPv6 on Custom Linux Image

I have a custom OpenEmbedded Kirkstone build of Linux on an Apalis iMX6Q. Does anyone know if it is possible to run a DHCP client for IPv6 without having to rebuild the OS with the DHCPD daemon?

I ask because we have several units already deployed and it would be a massive pain to have to update their OS’s.

1 Like

Hi @morgan1361

It looks like ipv6 is a PACKAGECONFIG setting for the dhcpcd recipe. It seems to be enabled by default in our BSP configurations. It appears to be coming from the openembedded-core layer:

MACHINE=apalis-imx6 bitbake-getvar DISTRO_FEATURES_DEFAULT -r tdx-reference-minimal-image
#   set? /work/YoctoBuild/Toradex/oe_dunfell-5.x.y/build/../layers/openembedded-core/meta/conf/distro/include/default-distrovars.inc:13
#     "acl alsa argp bluetooth ext2 ipv4 ipv6 largefile pcmcia usbgadget usbhost wifi xattr nfs zeroconf pci 3g nfc x11 vfat"
DISTRO_FEATURES_DEFAULT="acl alsa argp bluetooth ext2 ipv4 ipv6 largefile pcmcia usbgadget usbhost wifi xattr nfs zeroconf pci 3g nfc x11 vfat"

If you have explicitly disabled it in your custom build then there’s not much that can be done without a rebuild.



So in my custom build, I didn’t change anything with regards to dhcp. However, I do not have DHCPD, I have UDHCPC which is a micro dhcp library that only supports ipv4.

So, I have resigned to the fact that I have to add DHCPD to the build. Is there a way to replace UDHCPC with it, even though UDHCPC is installed with the Busy Box package?

Assuming you are still using connman as our reference images do, then you probably do not need dhcpd. I think you can just use connman as the DHCPv6 client. See here for more details: Ethernet/Network (Linux) | Toradex Developer Center



Actually I am using systemd networkd. But it seems there may be a way to do it with that as well. I am investigating. If you have any links that would be helpful

It certainly seems like systemd-networkd can support that. I don’t have any personal experience with it but there do seem to be a lot of google results about it. This one in particular looked thorough and easy to read: Field Reports from Erik's Laboratory - Using DHCPv6-PD on Ubuntu 22.04 Jaunty with systemd-networkd to route multiple prefixes

Hope that helps,


Wanted to finally follow up and inform you that I did manage to get this working without having to rebuild the OS. systemd-networkd does support this. My issues actually had nothing to do with the Apalis module at all. My makeshift Linux box that I was using as a server was the culprit. Anyway, my apologies for taking so long to provide an update.

@morgan1361 that’s great to hear. Thanks for following up.