Re: [systemd-devel] Bug or misconfiguration for systemd-networkd and VXLAN?
It's working now, I had my understanding messed up a little. Thanks for the clarification! Kind regards, Lukas Wolf On Mon, 14 Nov 2022 at 20:05, Andrei Borzenkov wrote: > On 14.11.2022 15:49, Lukas Wolf wrote: > > Hi all and thanks a lot for all your work on systemd! > > > > I'm trying to setup a VXLAN configuration with multicast with > > systemd-networkd but struggle to make it work. What I'm trying to > replicate > > is the following (working command): > > > > ip link add vxlan100 type vxlan id 100 dstport 4789 local 10.100.200.4 > > group 224.4.0.144 dev lo ttl 5 > > (this command fails without specifying 'dev lo') > > > > My config file, vxlan100.netdev: > > [NetDev] > > Name=vxlan100 > > Kind=vxlan > > > > [VXLAN] > > VNI=100 > > TTL=5 > > DestinationPort=4789 > > Group=224.0.0.144 > > Local=10.100.200.4 > > Independent=true > > > > If you want Group you need device and so cannot use Independent > ... > > > > As seen in the last line of the log, it throws an invalid argument error > > and no VXLAN device is created. This does not happen if I remove the > > "Group=" part in the configuration. As mentioned above, the "ip add > link" > > command needs a "dev=" argument to work but I have not found a way to > > specify a device in the netdev config file... > > > > I have also tried it without Independent=true and having a network file > > instead with VXLAN=vxlan100, > > Wat do you mean "instead"? You need network file for base interface that > refers to vxlan and netdev file for vxlan. > > > but then it just silently fails without log > > output. > > > > Works for me (at least, to the extent that vxlan100 is created) > > bor@bor-Latitude-E5450:~$ ip l > 1: lo: mtu 65536 qdisc noqueue state UNKNOWN mode > DEFAULT group default qlen 1000 > link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 > 2: eno1: mtu 1500 qdisc fq_codel > state DOWN mode DEFAULT group default qlen 1000 > link/ether 34:e6:d7:85:0b:1c brd ff:ff:ff:ff:ff:ff > altname enp0s25 > 3: wlp2s0: mtu 1500 qdisc noqueue > state UP mode DORMANT group default qlen 1000 > link/ether 5c:e0:c5:27:c7:70 brd ff:ff:ff:ff:ff:ff > 4: br0: mtu 1500 qdisc noqueue state > DOWN mode DEFAULT group default qlen 1000 > link/ether 6a:7b:d1:2a:ce:9d brd ff:ff:ff:ff:ff:ff > 5: tap0: mtu 1500 qdisc fq_codel > master br0 state DOWN mode DEFAULT group default qlen 1000 > link/ether 2a:7d:ac:33:fd:47 brd ff:ff:ff:ff:ff:ff > bor@bor-Latitude-E5450:~$ sudo systemctl start systemd-networkd.service > bor@bor-Latitude-E5450:~$ ip l > ... > 13: vxlan100: mtu 1450 qdisc noop state DOWN mode > DEFAULT group default qlen 1000 > link/ether b6:1d:97:9f:e6:eb brd ff:ff:ff:ff:ff:ff > bor@bor-Latitude-E5450:~$ cat /etc/systemd/network/eno1.network > [Match] > Name=eno1 > > [Link] > ActivationPolicy=always-up > > [Network] > ConfigureWithoutCarrier=true > Address=10.10.10.10/24 > VXLAN=vxlan100 > bor@bor-Latitude-E5450:~$ cat /etc/systemd/network/vxlan100.netdev > [NetDev] > Name=vxlan100 > Kind=vxlan > > [VXLAN] > VNI=100 > TTL=5 > DestinationPort=4789 > Group=224.0.0.144 > Local=10.10.10.10 > bor@bor-Latitude-E5450:~$ > > >
[systemd-devel] Bug or misconfiguration for systemd-networkd and VXLAN?
Hi all and thanks a lot for all your work on systemd! I'm trying to setup a VXLAN configuration with multicast with systemd-networkd but struggle to make it work. What I'm trying to replicate is the following (working command): ip link add vxlan100 type vxlan id 100 dstport 4789 local 10.100.200.4 group 224.4.0.144 dev lo ttl 5 (this command fails without specifying 'dev lo') My config file, vxlan100.netdev: [NetDev] Name=vxlan100 Kind=vxlan [VXLAN] VNI=100 TTL=5 DestinationPort=4789 Group=224.0.0.144 Local=10.100.200.4 Independent=true journalctl -u systemd-networkd (debug log enabled): systemd-networkd[1520509]: vxlan100: loaded vxlan systemd-networkd[1520509]: vxlan100: Using MAC address: [snip XYZ] systemd-networkd[1520509]: vxlan100: Creating systemd-networkd[1520509]: Failed to read $container of PID 1, ignoring: Permission denied systemd-networkd[1520509]: Found cgroup on /sys/fs/cgroup/systemd, legacy hierarchy systemd-networkd[1520509]: Found container virtualization none. systemd-networkd[1520509]: No virtualization found in DMI vendor table. systemd-networkd[1520509]: Unable to read /sys/firmware/dmi/entries/0-0/raw, using the virtualization information found in DMI vendor table, ignoring: Permission d> systemd-networkd[1520509]: UML virtualization not found in /proc/cpuinfo. systemd-networkd[1520509]: Virtualization XEN not found, /proc/xen does not exist systemd-networkd[1520509]: No virtualization found in CPUID systemd-networkd[1520509]: This platform does not support /proc/device-tree systemd-networkd[1520509]: This platform does not support /proc/sysinfo systemd-networkd[1520509]: Found VM virtualization none systemd-networkd[1520509]: /usr/lib/systemd/network/80-container-host0.network: Conditions in the file do not match the system environment, skipping. [snip] systemd-networkd[1520509]: vxlan100: netdev could not be created: Invalid argument As seen in the last line of the log, it throws an invalid argument error and no VXLAN device is created. This does not happen if I remove the "Group=" part in the configuration. As mentioned above, the "ip add link" command needs a "dev=" argument to work but I have not found a way to specify a device in the netdev config file... I have also tried it without Independent=true and having a network file instead with VXLAN=vxlan100, but then it just silently fails without log output. What am I doing wrong or is it a bug? My system: Linux 4.18.0-372.32.1.el8_6.x86_64 #1 SMP Tue Oct 25 05:53:57 EDT 2022 x86_64 x86_64 x86_64 GNU/Linux AlmaLinux release 8.7 (Stone Smilodon) systemd: systemd 239 (239-68.el8) +PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=legacy Thanks a lot for your help and kind regards, Lukas Wolf