Static vxlan configuration fails - probably because of wrong order in rc

From: Patrick M. Hausen <hausen_at_punkt.de>
Date: Wed, 06 Aug 2025 21:22:54 UTC
Hi all,

I am currently working on a concept for a "garage" storage cluster
and in need of a strictly separated overlay network I thought vxlan
would fit the bill nicely.

Problem is, if I try to configure my vxlan setup via rc.conf and friends,
the interfaces do not come up at boot time.

The fundamental problem seems to be that vxlan does not act upon
the underlying interface going up or down. There's a pr open for that issue:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=259644

But when configuring everything statically, it should IMHO be possible
to get a vxlan up and running at boot time.

Setups I tried which do not work:

-------
cloned_interfaces="vxlan0"
create_args_vxlan0="vxlanid 42 vxlanlocal 192.168.5.102 vxlangroup 224.0.2.6 vxlandev ue0"
ifconfig_vxlan0_ipv6="inet6 fd37:dedf:2418::2/64 auto_linklocal"
-------

and second:

-------
cloned_interfaces="vxlan0"
ifconfig_vxlan0="vxlanid 42 vxlanlocal 192.168.5.102 vxlangroup 224.0.2.6 vxlandev ue0 up"
ifconfig_vxlan0_ipv6="inet6 fd37:dedf:2418::2/64 auto_linklocal"
-------

"do not work" is defined by the interface remaining in the "tentative" state and not even
answering ICMP6 echo for its own local address.


But in my first manual attempts I got to bring up the interfaces perfectly on the
first try. So when I put the same commands I used manually into good old rc.local:

-------
#! /bin/sh

/sbin/ifconfig vxlan0 create
/sbin/ifconfig vxlan0 vxlanid 42 vxlanlocal 192.168.5.102 vxlangroup 224.0.2.6
/sbin/ifconfig vxlan0 inet6 fd37:dedf:2418::2/64 auto_linklocal
-------

everything works as intended! So I guess - refer to the pr linked above - that our
rc system does not bring up these interfaces in the correct order.


While the problem of the OP in that rc (interfaces coming and going and vxlan
not being notified) needs a kernel fix, I guess that my problem with static configuration
can be resolved by fixing the tooling.


How can I get a trace of everything rc does, so I can check if the interfaces are
indeed brought up in the wrong order?


Kind regards,
Patrick
-- 
punkt.de GmbH
Patrick M. Hausen
.infrastructure

Sophienstr. 187
76185 Karlsruhe

Tel. +49 721 9109500

https://infrastructure.punkt.de
info@punkt.de

AG Mannheim 108285
Geschäftsführer: Daniel Lienert, Fabian Stein