You are not logged in.

#1 2017-03-08 20:42:10

boomshalek
Member
Registered: 2007-10-12
Posts: 105

[SOLVED]Switch from NetworkManager to systemd-networkd

Hi
In my new installation i want to switch to a simple systemd-networkd config.
Currently NetworkManager (NM) is installed, but I only need one Ethernet connection which should be up ASAP after powering on.
First I have disabled the NM service.
Then I have created a rule in UDEV renaming my only device to net0

# change the network device name by defining the name manually
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="23:4b:35:49:e0:58", NAME="net0"
# Enable WOL on net0/1/2 ...
ACTION=="add", SUBSYSTEM=="net", KERNEL=="net*", RUN+="/usr/bin/ethtool -s %k wol g"

Created a /etc/systemd/network/HomeLAN.network

[Match]
Name=net*

[Network]
DHCP=ipv4

Followed by:
systemctl enable systemd-networkd.service

On every boot I get a 1min30sec timeout saying
a start job is running sys-subsystem-net-devices-enp2s0.device

Although networking is fine through net0 i would like to remove this.

Any help greatly appreciated.

Last edited by boomshalek (2017-03-15 20:38:37)

Offline

#2 2017-03-09 03:05:59

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,785

Re: [SOLVED]Switch from NetworkManager to systemd-networkd

systemd-networkd works great on this system.   What is the output of find /etc/systemd    on your system?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2017-03-09 03:12:55

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,553

Re: [SOLVED]Switch from NetworkManager to systemd-networkd

Why bother renaming the interface?

Offline

#4 2017-03-09 04:36:36

djgera
Developer
From: Buenos Aires - Argentina
Registered: 2008-12-24
Posts: 723
Website

Re: [SOLVED]Switch from NetworkManager to systemd-networkd

Rename using networkd, also set WoL via networkd wink

/etc/systemd/network/20-net0.link

[Match]
MACAddress=23:4b:35:49:e0:58

[Link]
Name=net0
WakeOnLan=magic

/etc/systemd/network/20-net0.network

[Match]
Name=net0

[Network]
DHCP=ipv4

enjoy

Offline

#5 2017-03-15 20:37:56

boomshalek
Member
Registered: 2007-10-12
Posts: 105

Re: [SOLVED]Switch from NetworkManager to systemd-networkd

Hi guys
Beautiful solutions. Thank you very much.

I still had a file in place which caused the delay
/etc/udev/rules.d/81-dhcpcd.rules

ACTION=="add", SUBSYSTEM=="net", ENV{INTERFACE}=="en*|eth*", ENV{SYSTEMD_WANTS}="dhcpcd@$name.service"

But i am now using yopur methods for WOL etc.

Very nice.

SOLVED

Last edited by boomshalek (2017-03-15 20:38:19)

Offline

Board footer

Powered by FluxBB