View previous topic :: View next topic |
Author |
Message |
mounty1 l33t
Joined: 06 Jul 2006 Posts: 934 Location: Queensland
|
Posted: Fri Jan 26, 2018 9:44 am Post subject: NetworkManager vs. systemd-networkd -- neither works fully |
|
|
Hello, on one machine of my several Gentoo installations, networking works imperfectly.
The machine is an Intel NUC and I am only using the wired interface (eno1). Until recently I was using the systemd-networkd service with the following: cat /etc/systemd/network/wired.network: | [Match]
name=eno*
[Network]
DHCP=ipv4 | The DHCP server is configured to serve 192.168.1.60 to the NUC's MAC address. The NUC obtains the address but there are two problems:- The systemd-networkd-wait-online service waits for about two minutes then times out and fails to start. I don't know for what it is waiting, since the address has been served. ifconfig -a lists an unconfigured sit0 interface but I don't know what this is or whether systemd-networkd-wait-online is waiting for it to be initialised.
- More significantly, after about four days, interface eno1 loses its address. I assume from the delay period that it fails to renegotiate the lease. Anyway, the only solution is the magic-key reboot sequence (alt-sysreq-REISUB) since there are multiple NFS mounts which systemd wants to unmount.
In an attempt to solve the above, I switched from systemd-networkd to NetworkManager, which is of course an overkill for a single-interface machine: Code: | systemctl disable systemd-networkd-wait-online systemd-networkd
systemctl enable NetworkManager NetworkManager-wait-online | but this brings it own problems. Although the machine boots really quickly, the network mounts (NFS mounts in /etc/fstab) are not honoured, and it is necessary to run mount -a to get them.
So neither solution is satisfactory. AIUI, systemd-networkd is all that should be needed for a single interface, but with the two problems listed above, it is unuseable. Can anyone suggest a resolution? _________________ Michael Mounteney |
|
Back to top |
|
|
mike155 Advocate
Joined: 17 Sep 2010 Posts: 4438 Location: Frankfurt, Germany
|
Posted: Fri Jan 26, 2018 11:25 am Post subject: |
|
|
Why do you use DHCP for this machine? I would configure a static IP address in /etc/systemd/network/wired.network. I use DHCPv4 only for notebooks or smartphones that are connected temporarily to my network. Every device that is connected permanently or that even mounts or exports file systems is configured with a static IP address.
If you want to stay with DHCPv4 for this machine, I would lower the DHCP lease time for this machine to a couple of minutes and start testing. Increase verbosity of DHCP log files and/or use tcpdump and look at the DHCP packets that are sent between your machine and your DHCP server. There surely is a reason why DHCP renewal doesn't work. |
|
Back to top |
|
|
littletux n00b
Joined: 08 Dec 2003 Posts: 74
|
Posted: Thu Mar 15, 2018 9:56 pm Post subject: |
|
|
Adding _netdev to the mount options in /etc/fstab might be sufficient. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|