Hi all,
So I’m trying to wrap my head around .netdev
and .network
files, which are ini-style configuration files that tell systemd-networkd how to statically configure the network.
I want to create a few macvlan interfaces off my main physical ethernet interface, but I’ve hit a really stupid issue that I can’t wrap my head around: When I tell systemd-networkd to reconfigure my network by running
$ networkctl reload
I get the following error messages reported by $ networkctl status
:
Aug 15 21:28:02 vm-server systemd-networkd[587]:
/etc/systemd/network/10-veth0.netdev:5: Unknown section 'Macvlan'.
Ignoring.
Aug 15 21:28:02 vm-server systemd-networkd[587]:
/etc/systemd/network/10-veth0.netdev:5: Unknown section 'Macvlan'.
Ignoring.
Sounds pretty self-explanatory, right? No such section “Macvlan”.
But there is, damnit! It’s right here, in the official manual:
…
[MACVLAN] SECTION OPTIONS
The [MACVLAN] section only applies for netdevs of kind “macvlan”, and accepts the following key:
…
Below are the two configuration files that I’ve added, where I have triple-checked that I’ve indeed added the Kind=macvlan
parameter as the documentation suggest.
/etc/systemd/network/10-veth0.netdev
:
[NetDev]
Name=veth0
Kind=macvlan
[MACVLAN]
Mode=bridge
/etc/systemd/network/10-veth0.network
:
[Match]
Name=veth0
[Network]
DHCP=ipv4
LinkLocalAddressing=ipv6
[DHCP]
RouteMetric=110
UseMTU=true
Any ideas would be much appreciated!
Versions:
-
Running on Ubuntu 20.04
-
$ networkctl --version
returns:systemd 245 (245.4-4ubuntu3.17) +PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=hybrid