[systemd-devel] Bug or misconfiguration for systemd-networkd and VXLAN?

Andrei Borzenkov arvidjaar at gmail.com
Mon Nov 14 19:04:31 UTC 2022


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 at bor-Latitude-E5450:~$ ip l
1: lo: <LOOPBACK,UP,LOWER_UP> 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: <NO-CARRIER,BROADCAST,MULTICAST,UP> 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: <BROADCAST,MULTICAST,UP,LOWER_UP> 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: <NO-CARRIER,BROADCAST,MULTICAST,UP> 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: <NO-CARRIER,BROADCAST,MULTICAST,UP> 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 at bor-Latitude-E5450:~$ sudo systemctl start systemd-networkd.service
bor at bor-Latitude-E5450:~$ ip l
...
13: vxlan100: <BROADCAST,MULTICAST> 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 at 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 at 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 at bor-Latitude-E5450:~$




More information about the systemd-devel mailing list