You are not logged in.

#1 2020-11-15 01:13:33

maboleth
Member
Registered: 2020-01-03
Posts: 132

[solved] After restart sometimes no internet (KDE - dhcpcd, ethernet)

When I was on Gnome I used to experience this every now and then with its Network manager. I then uninstalled it and got dhcpcd instead. Never had that problem again.

Until I switched to KDE.

Now I have occasional no-network even with dhcpcd. I also uninstalled/disabled networkamanger in systemctl.

The only error I found in journal was

dhcpcd[555]: enp34s0: DHCP lease expired

Though I'm not sure that's the case of internet not working.

Since I'm a complete rookie when it comes to networks:

1. What can I check, logs?
2. Can I make DHCP lease permanent or automatically getting new one (whatever that means)?
3. How can I restart networks myself, rather than rebooting again? Simply stopping/restarting dhcpcd via systemctl is not doing it.

Thanks.

Last edited by maboleth (2020-11-19 23:15:56)

Offline

#2 2020-11-15 09:00:18

seth
Member
Registered: 2012-09-03
Posts: 17,150

Re: [solved] After restart sometimes no internet (KDE - dhcpcd, ethernet)

What's the output of

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

?

Also post the complete system journal "sudo journalctl -b | curl -F 'f:1=<-' ix.io" after you lost the network.

Last but not least, if you've a parallel windows installation, see the 3rd link in my signature…

Offline

#3 2020-11-15 10:25:10

maboleth
Member
Registered: 2020-01-03
Posts: 132

Re: [solved] After restart sometimes no internet (KDE - dhcpcd, ethernet)

The output:

dbus-org.freedesktop.timesync1.service   | system
dhcpcd.service                           | multi-user.target.wants
dirmngr.socket                           | sockets.target.wants
display-manager.service                  | system
fstrim.timer                             | timers.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
pipewire.socket                          | sockets.target.wants
pulseaudio.socket                        | sockets.target.wants
remote-fs.target                         | multi-user.target.wants
systemd-timesyncd.service                | sysinit.target.wants

Also post the complete system journal "sudo journalctl -b | curl -F 'f:1=<-' ix.io" after you lost the network.
Last but not least, if you've a parallel windows installation, see the 3rd link in my signature…


Also running that journal code produces this address with my journal content (never seen this, how cool!)

http://ix.io/2Eef - Though that log is from 2am, I think that's after I did a second restart to have my working network.

As for another partition - I don't use Windows or any other os except Arch.

Last edited by maboleth (2020-11-15 10:58:18)

Offline

#4 2020-11-15 10:42:38

rsmarples
Member
Registered: 2009-05-12
Posts: 254

Re: [solved] After restart sometimes no internet (KDE - dhcpcd, ethernet)

maboleth wrote:

1. What can I check, logs?
2. Can I make DHCP lease permanent or automatically getting new one (whatever that means)?
3. How can I restart networks myself, rather than rebooting again? Simply stopping/restarting dhcpcd via systemctl is not doing it.

1) dhcpcd logs stuff to syslog. You can get it to log more by adding `debug` to /etc/dhcpcd.conf
This probably won't help you though as it's quite technical and is there just to prove that dhcpcd is working normally.

2) You can't make a DHCP lease permament unless you control the server.
If the server sends a lease time of MAX_UINT32 then it is treated as infinite, hence a permament lease.
You *could* request a lease time of MAX_UINT32, but I don't know of any server which allows this by default.
dhcpcd will automatically try to obtain a new one via RENEW and then REBIND messages.
If you enable dhcpcd debug you would see messages like this in syslog:
eth0: renewing lease of 1.2.3.4

If it's a fixed host, you could set a static IP inside the network range but outside the DHCP allocation and use an INFORM message which dhcpcd supports.
This informs the DHCP server of the static IP address you're using and it will ACK with more network setup like DNS or refuse it.
This might be an option for you.

3) `dhcpcd -n` causes dhcpcd to rebind all interfaces
You could also do `ifconfig eth0 down; ifconfig eth0 up` or `ip link set dev eth0 down; ip link set dev eth0 up` to down and up the interface which dhcpcd will spot and cause a network reboot for the interface.
For some interfaces this may also trigger a firmware reload.

Good luck!

Offline

#5 2020-11-15 11:02:31

seth
Member
Registered: 2012-09-03
Posts: 17,150

Re: [solved] After restart sometimes no internet (KDE - dhcpcd, ethernet)

There're no conflicting NIC controlling services, but the journal also doesn't cover a lease expiration (you get 1h leases from your router) nor other issues.
You suspend ~2:05 and wake up ~11:00 and get a nw lease.

However, you're using the r8169 driver on a rtl8168 chip - you could try to install the "r8168" package and see whether that stabilizes the connection.

Offline

#6 2020-11-15 13:11:26

maboleth
Member
Registered: 2020-01-03
Posts: 132

Re: [solved] After restart sometimes no internet (KDE - dhcpcd, ethernet)

@rsmarples thank you on your thorough explanation! smile

Seth, I installed the new driver. I will test this further, if it goes well I will mark this as [solved]. If not, I will post new journal content with current findings.

Thanks a lot!

Offline

Board footer

Powered by FluxBB