I’m using a Beelink GK35 and have it connected via ethernet cable to a Fios Wireless Extender (connected over MoCa). I am finding no problems whatsoever, other than when I have to reboot my Wireless Extender. After the Extender reconnects, the DietPi doesn’t reconnect to the internet. I have to manually power it on and off and then things are fine.
No, not using a Pi… have installed DietPi on the Beelink and have a ethernet cable going directly from extender to Beelink. I have a static IP set up on my router for the Beelink.
Ok I have no idea why the connection can’t be restored after rebooting the extender,
but instead of rebooting you can disable and enable eth0, to establish a new connection.
When you SSH into the Beelink, you have to do this in one command, otherwise you loose your connection to the beelink after the first command and your are unable to execute the second one.
ifdown eth0 && ifup eth0
(or with sudo before the if commands, if you’re logged in with non-root)
this is a behaviour we have seen in some rare cases where a router was rebooted leaving the Pi without connection afterwards. We never found a reason, now was it possible to replicate. Usually people created such a script checking for network connection. There should be a couple of example on the forum. Btw: it is not needed to ping Google DNS server. It should be enough to ping the default gateway.
Yeah, I’ve read posts online that sound VERY similar to what I’m experiencing. Seems to happen every time the router or wireless extender are rebooted.
Because I’m a lamen, what should this script look like?
Alright, to put some kind of wrap to this… I followed that guide, installed Watchdog and tweaked the file and my Beelink seems to have rebooted as intended after I rebooted my router. Ethernet came back after that.
After rebooting the router via a Bash script, I could no longer connect to my server via SSH. However, the LEDs on the network interface were still lit. The connection, which had been working perfectly before the router reboot, was no longer possible for no apparent reason.
Restarting the server (by disconnecting the power supply) resolved the issue.
My solution: I extended the reboot Bash script:
sleep 200
dhclient -r eth0 && dhclient eth0
The reasoning behind this change is as follows:
The script waits 200 seconds. During this time, the router should have completed the reboot.
The server then initiates the renewal of the DHCP lease. After that the server is accessible again.
I hope this solution can help others who are experiencing this problem.
So the router does not preserve DHCP leases on reboot, but also somehow blocks connections to systems without (server-side) valid leases? Or do you use local hostnames controlled by router, assigned only when sending out DHCP leases?
That is a weird behavior:
All systems keep their IP addresses when the DHCP server restarts, until their lease expires their end, or the DHCP client decides to renew it for another reason.
As long as the IP address is from the same subnet, usually connections remain possible. The DHCP lease is usually optional, while systems can keep using whichever IP they have assigned, or static IPs (from the same subnet, avoiding collissions).
Usually, routers keep the leases cached on disk, to be preserved on reboot.