Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
NetworkManager vs. systemd-networkd -- neither works fully
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
mounty1
l33t
l33t


Joined: 06 Jul 2006
Posts: 735
Location: Queensland

PostPosted: Fri Jan 26, 2018 9:44 am    Post subject: NetworkManager vs. systemd-networkd -- neither works fully Reply with quote

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
View user's profile Send private message
mike155
Veteran
Veteran


Joined: 17 Sep 2010
Posts: 1000
Location: Frankfurt, Germany

PostPosted: Fri Jan 26, 2018 11:25 am    Post subject: Reply with quote

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
View user's profile Send private message
littletux
n00b
n00b


Joined: 08 Dec 2003
Posts: 72

PostPosted: Thu Mar 15, 2018 9:56 pm    Post subject: Reply with quote

Adding _netdev to the mount options in /etc/fstab might be sufficient.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
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