DHCP issues

See aceindy’s response - you can’t just make wild assumptions about the cause, you need to find the actual cause :wink:

1 Like

Will try, I looked at IPConfig allready but did not find the server. IPConfig/all next thanks.

Hmmmm, I did not look at the subnet, will do next…

Network gets offline, or all/most/some devices changes IP?
I would check the new IP. One of possibly things is that DHCP doesn’t renew IP leases for some reason. In such cases devices fall back to their default IPs.

BTW router should have known fixed IP. I suggest you to setup HA to fixed IP too. If you ensure fixed IP for your main computer (or other client you used to work with) then you should be able to connect HA even if DHCP fails. BTW setting fixed IP addresses to major nodes in network is good practice.

Hi, very interesting thread :slight_smile: I’ve been struggling with this exact same issue for months, and I’m really stuck now. What is really weird is that everything goes back well (ie. every device is reachable and can be connected again, whatever the protocol) as soon as the power of the Raspberry 4 running the HA instance gets unplugged.
I understand there is no stock DHCP server in HA, but I also understand it looks like a DHCP issue: when it happens, my desktop computer randomly gets either its correct reserved ip (v4) address, or what looks like an ipv6 address (which I have no idea where it comes from), or just a self assigned IP (169…) every time I force the IP the be renewed.
I’m running out of troubleshooting ideas…

For the sake of troubleshooting, i suggest you tick off the use of ipv6, and only use ipv4 protocol only ?

Getting a self assigned IP4 would indicate your DHCP server is not running (or unreachable) :thinking:

1 Like

yoyooooooooooooo, nice name by the way…

Luckly I do not feel “alone in the world” anymore. Sorry to hear you have the same problem. As you describe it it is exaclty similar to my problem. If I unplug the raspberry 4 with HA the network gets back up. That makes me think it is somewhere on that raspberry 4 with only HA running on it. I am using IPv4 only with a self assigned IP asress in the rang of 10.0.0.1 till 10.0.0.240 most of the devices on a fixed IP adress. If “the other DHCP server” takes over it I saw a 169… adress once.

My most suspected HA addons are (although I checked them all already:

  • Ewelink
  • ONVIF
  • Bose
  • ngix (which I only recently installed)

Just for info, as @yoyoooooooo mentioned, he get a ‘self assigned’ IP address in the 196 range.
This is a default address, generated by the network card (and NOT obtained from a DHCP server)

169.254.x.x: This is what’s called an Automatic Private IP address. An IP in this range means that the computer cannot see the network. A computer using DHCP needs to have an external server tell it what IP address to use. Unfortunately, if there’s no network connectivity, the computer is unable to talk to the server. In those cases, the computer will actually give itself an IP starting with 169.254, since it must assign itself some sort of number. When you see a 169.254.x.x address, you definitely have a problem. It could be as simple as an unplugged network cable, or it could be as complex as the network being down. A fair amount of troubleshooting is involved at this point, but the bottom line is that your computer doesn’t even see the network.
(What are some IP addresses that might indicate I have a network problem?)

Which might indicate that the network interface of the RPI4 is causing serious network issues, spamming the whole network, taking it down.
Have you ever tried to hook up a monitor and look if there are any issues? Any info in the LOGS ?

1 Like

Hi aceindy, thanks for your reply. I totally agree with you. The problem is that my dhcp server is not supposed to serve ipv6 addresses, hence the “I have no idea where it comes from” (maybe the v6 version of a self assigned ip? I will check).
I also agree on the DHCP server not running/unreachable symptom. But only until the HA box is shutdown, which makes me think there is an interaction with HA, and makes me post here :slight_smile:

Hmmmm, I did not hook up a monitor yet as it happens only once and a while. I will start it up using a monitor and see if I can find something in the logs???

Thanks

And what happens if you just disconnect the LAN connector (and reconnect it back later) ??

Yes @p.musters , that feeling of not being alone when I read this thread :smiley:
Unfortunately I see no common point with these addons, I use none of them (Ewelink, Onvif, Bose, ngnix).
But you also previously mentioned Shelly integration and Mosquitto addon, which I use :thinking:

I am pretty convinced it is caused by the RPI4’s network card :wink:
(or the network driver controlling it)

No relevant info in the logs, as far as I can tell. Monitoring the PI network interface sounds relevant. The difficulty is to identify what is regular traffic and what is undesired. I’m reaching the edge of my skills here. But I can give wireshark a try indeed, and hope for an obvious issue.

Just a weird suggestion…have you tried another LAN cable?

Or as suggested by someone else in the same thread, maybe another powersupply?

Well, I’ll have to check. What I can tell is that unplugging and replugging the RJ45 socket is not enough. But I actually do not know what happens inbetween. I would expect the LAN to be up and running again, but I need to check for sure.

Some similar issues here, uses a RPI4, but not running HA…

Someone else even reported a flaky port on the switch he used , maybe try another port & cable ?
But reading through this thread, something is messing up the network card on the RPI4…
(could be software drivers, could be hardware…)

1 Like

I’m not sure what the various people here have tried and which OSs are involved, but it may help to check what your DHCP server actually returns (at least to compare your system’s with the values you’re expecting from a known DHCP server): Ubuntu Manpage: dhcping - send a DHCP request to DHCP server to see if it's up and running.

One can also actually manually request a new address and check the logs using dhclient: How do I request a new IP address from my DHCP server using Ubuntu Server? - Server Fault.

I haven’t had to do this myself, but you can also disable your known DHCP server and see if an IP (except for a self-assigned one) still gets assigned. It should at least confirm there is a rogue server running somewhere. More things to try here: networking - How do I find if there is a rogue DHCP server on my Network? - Server Fault.

1 Like

Has this thread died off completely? Did anyone come up with a solution? I’m experiencing something similar and would love any input.

  1. I’m sort of an HA newbie; I have moderate (but certainly not advanced) tech knowledge/understanding.
  2. I’ve had HA running successfully for about 6 months. This past week I configured port routing and was able to successfully access my HA server remotely. At the same time (while I was away from home) I noticed that there were HA Core updates pending, which I clicked to install.
  3. As you would expect, shortly thereafter HA became unavailable (while doing the updates). But a short time after that my entire home network went offline.
  4. When I got home, HA was running just fine, but my network was a mess and similar to this thread, as best as I could tell several of my IoT devices, including some of my wireless access points, appeared to have improperly configured DHCP settings. (I have a router from my ISP with a direct link to my mesh wifi router; the ISP router is not my DHCP server, my mesh router is.)
  5. After rebooting all of my WAPs things seemed to come back just fine.

But given the timing I have to believe that it was some part of HA updating it’s core and/or rebooting that caused the issues. I can’t believe it was a bad port or a bad cable, since it has never happened before - the timing was directly related to the update/restart of HA.

I’d love any thoughts so I can try to avoid it happening again in the future.
Thanks!
jtf