DHCP Server Static IP Requirement

So I just set up the DHCP server Add-On in Home Assistant and I was wracking my brain trying to figure out why there were only a few devices actually obtaining an IP. I noticed that the logs said something about not being able to reach the network.

I figured the issue was with the router itself but after rebooting, still no dice. I checked that Home Assistant’s host had an IP and surely it did.

Then it clicked, I noticed I needed it to have a static IP.

Should this not be in the documentation? Is this actually a requirement or am I just a dingus and I messed something else up?

What did you expect?

A DHCP service does not need a static IP address. It just need any valid IP address on the network.
A client will make a broadcast on 255.255.255.255 to ask for a DHCP service, so no need for a specific IP address.

Interesting, perhaps the “valid” part is key here. The HA host seemed to still have its old DHCP address that was within the range of dynamic addresses covered by the server. Maybe it had given out that address to another device, not knowing that that was its own because it wasn’t in the lease list?

Perhaps the server would get the broadcast DHCPDISCOVER, the DHCP server would respond through the 192.168.x.x interface, but because it had given it to another device as well, the router would simply redirect the message to other device.

Either way, a reboot of the DHCP add-on, home assistant didn’t help. Maybe rebooting the host itself might have helped in some way, but clearly changing the address helped in some way.

As with almost any core network device, a DHCP server with a static IP will give you fewer headaches. Also, make sure that no other DHCP server on the LAN (like the router) is handing out IP’s for the same range.

2 Likes