Mailinglist Archive: opensuse-support (220 mails)

< Previous Next >
Re: [opensuse-support] Network watchdog
On 08/01/2019 12.00, Peter Suetterlin wrote:
Carlos E. R. wrote:
On 08/01/2019 11.36, Peter Suetterlin wrote:

Hi List,

Last november, my remote home server went offline. When I finally could
access it physically, the machine was all fine, just the connection to the
outside world had been dead. A simple 'systemctl restart network' did bring
it back (it's a wicked-managed dhcp connection).

Now I wonder if there is some daemon existing that regularly checks if the
outside connection is properly working and, if not, restarts the network.
I'd have expected systemctl to do something like that. Or is it so simple
that I should just write a cron script that does this?

Wow.

I wrote my own daemon that pings the router and google periodically. My
problem is not the network dying on the computer, but the home router
locking up, though, so my daemon would not work for you.

Hehe, had that with the Movistar ADSL modem. I finally connected it to a
wallplug timer that shut power down for one minute every day, to restart the
modem :D

I considered that :-D

It is the Movistar /fibre/ router. Actual fibre is not connected to it,
but to a device called ONT that goes before it converting to ethernet.

But it would disrupt the server workflow, so instead I finally found a
power strip controllable via ethernet (LAN), so I wrote code using that
to power cycle the router and other things attached to it. Fortunately
the switch side of the router stays alive long enough for my program to
work.

It may act a few times a day, or not at all in a month.

Someone actually sells watchdogs that do that on their own, quite
expensive; the problem is not rare.


My home server has not acted up in the way you describe, using Leap
15.0. However, my small laptop sometimes does not connect to the network
on restore from hibernate and I have to manually restart the network.

I'm not sure what actually happened, there was absolutely nothing in the
logs. Just no more firewall logs of dropped packages, and I couldn't get in
from outside. It had been running without issues for 200 days or so.

:-(


I think you should change your setup to fixed address, not dhcp.

That's not possible. This is in Sweden, the internet is included with the
appartement, and only handed out via dhcp. Nothing I have influence on.

Ah. I thought you were talking of the internal IP your side of your
router - I assume you have one?

Then yes, you need a daemon/cron/whatever.

If you don't find anything, you could adapt my program, but it is in
Pascal: instead of calling the external program to cycle power, call
network restart. The modification is almost trivial.

--
Cheers / Saludos,

Carlos E. R.
(from 15.0 x86_64 at Telcontar)

< Previous Next >
Follow Ups