[systemd-devel] systemd-networkd on by default?

Lennart Poettering lennart at poettering.net
Fri Feb 21 08:26:46 PST 2014

On Fri, 21.02.14 15:44, Colin Guthrie (gmane at colin.guthr.ie) wrote:

> 'Twas brillig, and Reindl Harald at 21/02/14 08:45 did gyre and gimble:
> > 
> > 
> > Am 21.02.2014 04:41, schrieb Zbigniew Jędrzejewski-Szmek:
> >> On Fri, Feb 21, 2014 at 04:00:10AM +0100, Jason A. Donenfeld wrote:
> >>> systemd-networkd seems to get started by default in 209. Why is this?
> >>> What if I don't want to use it to manage my networks? Why does it have
> >>> to be on by default?
> >>
> >> I think the reasoning was that it doesn't do anything by default (when
> >> there are no configuration files)
> > 
> > that is a bad reasoning
> > 
> > not a single process should be running if it has no job to do
> > for the sake of ressource usage, security and clean systems
> Well I kinda get that using it for containers and such like could be
> useful, but I also suspect it should be bus or socket activated rather
> than statically enabled... like localed, datetimed etc. Any reason to
> enable it statically? (I guess it maybe has to do stuff by itself, but I
> would figure udev should kick it in via the setup link built in in most
> cases - but I guess that wouldn't work inside containers, so perhaps
> this is where things break down and you need it statically enabled).

networkd has a set of config files that have [Match] sections in them
that described to which interface types they apply. networkd watches
network interfaces come and go and picks the config file with the
highest prio and apply that. If there is none it will not do anything
and leave the interface for other components. In addition to that it can
actually create devices based on .netdev files. 

What networkd does hence is dependent on devices showing up as well as
configuration files, and they do not map trivially against each
other. This means that we need to start networkd both when there is
config around and when net devices pop up. Now with the veth stuff there
will always be config around and on pretty much any system there will be
network interfaces around of some kind, hence it would tsart anyway by
default. And given that that is how it is we simply start it at boot,
because it is simpler, and less magic...

networkd does not currently have a client API, thus socket and bus
activation do not apply.


Lennart Poettering, Red Hat

More information about the systemd-devel mailing list