[systemd-devel] systemd-networkd on by default?
Lennart Poettering
lennart at poettering.net
Fri Feb 21 08:38:15 PST 2014
On Fri, 21.02.14 16:51, Reindl Harald (h.reindl at thelounge.net) wrote:
> > 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)
>
> statically enabled is bad in general, containers are not a good
> reason to enable something for everybody, many if not most people
> never will use containers for several reasons and if it because
> they use full-virtualization and move machines between different
> also non-linux hosts
Tom changed git to not statically enable it anymore, but still enable it
by default.
> where i would support something new enabled by default is if
> could *replace* something else like LSB network.service while
> use it's ifcfg-configurations for backward compatibility and
> test out if it really can replace all cases
Well, the old network script is not part of LSB...
But yeah, networkd should already cover much of what ifcfg could do, but
not everything. There are some thing that'll be added shortly (like
dhcp6 support), but others we will never support, such as isdn...
> if i can replace that below i start to be one of the first
> production users in a complexer setup (one is the MAC of
> the physical card, the other is what it becames before
> fetch the IP from the ISP because you need to register
> your MAC there, that's the same like MAC cloning
> in small soho-routers)
>
> DEVICE=eth1
> HWADDR=68:05:ca:0d:62:c1
> ONBOOT=yes
> BOOTPROTO=dhcp
> IPV6INIT=no
> NM_CONTROLLED=no
> USERCTL=no
> PEERDNS=no
> MACADDR=00:50:8d:b5:cc:de
Yes, you can do that. drop in a .link file that looks something like this:
[Match]
MACAddress=68:05:ca:0d:62:c1
[Link]
MACAddress=00:50:8d:b5:cc:de
Name=foobar
With that the device will be matche against 68:05:ca:0d:62:c1 and when
that exists we will rename it to "foobar" and apply the address
00:50:8d:b5:cc:de to it.
Then, also drop in a .network file:
[Match]
Name=foobar
[Network]
DHCP=yes
And there you go.
(Note that the ethXYZ namespace is used by the kernel, we will not allow
renaming interfaces to that so that we never race against the
kernel. Hence the example above uses "foobar" as interface name instead.
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list