You are not logged in.

#1 2020-12-16 18:53:44

GSMiller
Member
Registered: 2020-11-23
Posts: 75

Network sometimes drops completely

Maybe every 10 boot I have no network connection.
It is just wired ethernet enp1s0.
It is not a name resolution problem.
I tried

systemctl restart dhcpcd.service
systemctl restart systemd-networkd.service

it succeeds but does not bring the network back.
I can modprobe -r the driver, or unplug the network cable, that helps.

What could be the matter?

Right now it works, should I provide some output the next time?


A dog is a man's best friend.

Offline

#2 2020-12-16 19:33:58

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,680
Website

Re: Network sometimes drops completely

Trilbyfan wrote:

It is not a name resolution problem

How do you know that? See also https://bbs.archlinux.org/viewtopic.php?id=57855

Have you checked the systemd journal? Post it here if you can't make sense of it (or upload it to a pastebin and share the link).

You should tell us what the hardware and driver is and also list the enabled services — seth has a clever one-liner that can do that but I can't remember it so try

ls -lR /etc/systemd/system

^ That should list all enabled (non-user) unit files, along with any dangling symlinks.

Offline

#3 2020-12-16 20:59:25

seth
Member
Registered: 2012-09-03
Posts: 49,993

Re: Network sometimes drops completely

find /etc/systemd -type l -exec test -f {} \; -print | awk -F'/' '{ printf ("%-40s | %s\n", $(NF-0), $(NF-1)) }' | sort -f

I actually have that in a shell function that I can "whence -f" everytime I need to post it ;-)

However

systemctl restart dhcpcd.service
systemctl restart systemd-networkd.service

That's one too much already.

Offline

#4 2020-12-18 06:28:11

GSMiller
Member
Registered: 2020-11-23
Posts: 75

Re: Network sometimes drops completely

It is true, systemd-networkd is not enabled. My mistake.
Thank you for your precious hints, I will do this the next time it occurs.
I know it is more then name resolution because I cannot ping IP addresses.


A dog is a man's best friend.

Offline

#5 2020-12-18 07:07:22

seth
Member
Registered: 2012-09-03
Posts: 49,993

Re: Network sometimes drops completely

You're missing the point entirely.

You attempted to *re*start two network services - the implication would be that they're already running and multiple network managing services will trip over each other.
Please post the output of the command in #3 so we can be sure about your system config because HoaS had the reasonable hunch that this is the cause for the race condition leading to the inconsistent network availability.

Offline

#6 2020-12-21 19:10:26

GSMiller
Member
Registered: 2020-11-23
Posts: 75

Re: Network sometimes drops completely

Thank you for your continued interest.
Restarting systemd-networkd was my mistake, it is not enabled, it is not the cause of the problem, and I have rebooted a few times.

$> find /etc/systemd -type l -exec test -f {} \; -print | awk -F'/' '{ printf ("%-40s | %s\n", $(NF-0), $(NF-1)) }' | sort -f
dbus-org.freedesktop.timesync1.service   | system
dhcpcd.service                           | multi-user.target.wants
dirmngr.socket                           | sockets.target.wants
getty@tty1.service                       | getty.target.wants
gpg-agent-browser.socket                 | sockets.target.wants
gpg-agent-extra.socket                   | sockets.target.wants
gpg-agent.socket                         | sockets.target.wants
gpg-agent-ssh.socket                     | sockets.target.wants
p11-kit-server.socket                    | sockets.target.wants
remote-fs.target                         | multi-user.target.wants
systemd-timesyncd.service                | sysinit.target.wants

I am waiting for the network to go down again to post some more.
Do you have any suggestions what I should post next time that happens?


A dog is a man's best friend.

Offline

#7 2020-12-22 08:56:50

seth
Member
Registered: 2012-09-03
Posts: 49,993

Re: Network sometimes drops completely

Since you indeed only run dhcpcd by default, dump a system journal for the next boot where this happens ("sudo journalctl -b") and post that.
Going by rule #1 that it's always the cable, you mighe have a flaky carrier because of a loosely seated cable (on either end), but we'll see from the journal smile

Offline

#8 2020-12-22 10:51:50

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,680
Website

Re: Network sometimes drops completely

Trilbyfan wrote:

Do you have any suggestions what I should post next time that happens?

It would be great if you could answer my other questions while you are waiting. The hardware information may be particularly relevant — if you enter the card type and driver into a search engine along with "drops" or "drop outs" you might even be able to find a solution by yourself.

Offline

#9 2020-12-23 18:43:20

GSMiller
Member
Registered: 2020-11-23
Posts: 75

Re: Network sometimes drops completely

lspci -k | grep net
01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)

A dog is a man's best friend.

Offline

#10 2020-12-23 20:54:45

seth
Member
Registered: 2012-09-03
Posts: 49,993

Re: Network sometimes drops completely

You grepped away the used kernel module, but the usual answer is https://archlinux.org/packages/community/x86_64/r8168/

Offline

#11 2020-12-31 11:05:02

halfloaf
Member
Registered: 2010-04-03
Posts: 4

Re: Network sometimes drops completely

Just dropping by to say the same happened for me on a r8168 adapter (older Asus H97 mobo). I've wiped and tried debian testing (5.9 kernel) and Fedora 33 (5.9 kernel) and the same happens. Earlier kernels do not exhibit this problem so not sure if something has broken with the 5.9 kernel and the r8168/r8169 driver module.  Going to try the community and dkms source driver next.

Offline

#12 2020-12-31 13:47:39

seth
Member
Registered: 2012-09-03
Posts: 49,993

Re: Network sometimes drops completely

broken with the 5.9 kernel and the r8168/r8169 driver module

r8168 and r8169 are NOT the same module, but r8168 is an out-of-tree module and won't install w/ the kernel.

lspci -k

to check which module you're actually using.

Offline

Board footer

Powered by FluxBB