Skip to content

Conversation

@ntrrgc
Copy link

@ntrrgc ntrrgc commented Aug 29, 2025

If your DHCP server is dnsmasq-based, you're not building Thunder and you're using a rpi3, there is a good chance half the time the rpi boots without an IP address.

This is because:

  • udhcp sends 3 DISCOVER, waiting 3 seconds for a response in each case.
  • The NIC of the rpi3 usually takes slightly above 6 seconds from ifconfig eth0 up to being functional enough to send packets, so the first two DISCOVER packets never reach the network.
  • dnsmasq will do a 3 second long ping of an IP address before assigning it to a lease, unless its has done this recently and has it cached. If this happens on the last DISCOVER, by the time the rpi3 gets the OFFER packet, udhcp has already given up.

Once identified the problem, a simple fix is trivial: patch udhcp to send more DISCOVER packets.

If your DHCP server is dnsmasq-based, you're not building Thunder and
you're using a rpi3, there is a good chance half the time the rpi boots
without an IP address.

This is because:
* udhcp sends 3 DISCOVER, waiting 3 seconds for a response in each case.
* The NIC of the rpi3 usually takes slightly above 6 seconds from
  `ifconfig eth0 up` to being functional enough to send packets, so the
  first two DISCOVER packets never reach the network.
* dnsmasq will do a 3 second long ping of an IP address before assigning
  it to a lease, unless its has done this recently and has it cached.
  If this happens on the last DISCOVER, by the time the rpi3 gets the
  OFFER packet, udhcp has already given up.

Once identified the problem, a simple fix is trivial: patch udhcp to
send more DISCOVER packets.
@magomez magomez merged commit b451bfe into WebPlatformForEmbedded:wpe Sep 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants