hermosaranch
Posts: 1
Joined: Thu Jun 24, 2021 5:24 pm
Location: Santa Maria, CA

Pi B3+ looses network connection on eth0 or wlan0 after 24 hours

Thu Jun 24, 2021 5:40 pm

Hello Everyone, and thank you for your time looking over our post.

We have a Pi B3+ that we leave on continuously for monitoring. As the subject notes, we lose network connection after about 24 hours give or take, on either eth0 (hardwired to a switch connected to our gateway router) or wlan0. We've gone through all the wiring and swapped SD cards a few times. The problem does not appear to be a power supply, SD card nor Ethernet cable error. It appears that one of our Nighthawk routers tries to steal the IP address per the syslog files on the Pi, and then the Pi just shuts down eth0 or wlan0.

Here is the dhcpcd.conf section for the static IP:

Code: Select all

interface eth0
static ip_address=10.0.0.112/24
static routers=10.0.0.1
static domain_name_servers=8.8.8.8 8.8.4.4
Here is the syslog output showing the eth0 errors:

Code: Select all

Jun 24 09:19:56 udas dhcpcd[427]: eth0: hardware address 10:da:43:ab:03:d5 claims 10.0.0.112
Jun 24 09:19:56 udas dhcpcd[427]: eth0: hardware address 10:da:43:ab:03:d5 claims 10.0.0.112
Jun 24 09:19:56 udas dhcpcd[427]: eth0: 10 second defence failed for 10.0.0.112
Jun 24 09:19:56 udas avahi-daemon[315]: Withdrawing address record for 10.0.0.112 on eth0.
Jun 24 09:19:56 udas avahi-daemon[315]: Leaving mDNS multicast group on interface eth0.IPv4 with address 10.0.0.112.
Jun 24 09:19:56 udas dhcpcd[427]: eth0: deleting route to 10.0.0.0/8
Jun 24 09:19:56 udas avahi-daemon[315]: Interface eth0.IPv4 no longer relevant for mDNS.
Jun 24 09:19:56 udas dhcpcd[427]: eth0: deleting default route via 10.0.0.1
Jun 24 09:19:56 udas dhcpcd[427]: eth0: probing address 10.0.0.112/8
Jun 24 09:19:56 udas dhcpcd[427]: eth0: hardware address 10:da:43:ab:03:d5 claims 10.0.0.112
Jun 24 09:19:56 udas dhcpcd[427]: eth0: DAD detected 10.0.0.112
The mac address 0:da:43:ab:03:d5 is a Nighthawk R7000 router configured as an Access Point with a static IP on 10.0.0.106. We also have a Nighthawk as the primary router & gateway at 10.0.0.1. I'm searching the web as to why an AP with static IP suddenly want to hop to another IP.

A few notes, I didn't have the "/24" in the static ip_address setting in dhcpcd.conf prior to this issue. I just added it and will see if that does anything.

We have to do a reboot to clear the error. Then the Pi works as normal, only to have this error again about 24 hours later. I could create a cron reboot script that executes once the gateway is lost on eth0. But that will happen every day and seems like a patch, not a solution.

Any ideas?

Thank you,

Chris

terribleted
Posts: 496
Joined: Tue Oct 06, 2020 8:07 pm

Re: Pi B3+ looses network connection on eth0 or wlan0 after 24 hours

Fri Jun 25, 2021 2:09 am

i would guess that the "static" IP you have assigned is in the range of DHCP addresses the router is handing out.
i say this because the usual length of time for a DHCP lease is 24 hours.
if your router is handing out DHCP addresses in a range that includes your static IP, it will fail after 24 hours, (i think)

assign a static IP that is NOT in the range of the DHCP addresses your router is handing out.

I have a PI4(8G) set up static, and the ethernet never fails.
i had a Trash-80 model 1 (circa 1980). upgrading from 4k to 16k of RAM, i thought "i'll never use this much RAM".
Now i have a computer with a million times that much memory. And i keep running out of it.
Not the computer....ME.

CaFran1
Posts: 2
Joined: Wed Jul 07, 2021 7:07 pm

Re: Pi B3+ looses network connection on eth0 or wlan0 after 24 hours

Wed Jul 07, 2021 7:25 pm

To check if your wifi connection is still alive with your router, you need to check if your router maintains a connection through its IP address. Some routers have policies to shut down a connection after a timestamp, for example a captive portal.

Return to “Troubleshooting”