Too many symlinks error setting up a network bridge with systemd on debian9

Matthieu asked:

After a reboot the host is unreachable and I see this error in the logs vmbr0: Could not join netdev: Too many levels of symbolic links I really don’t know what’s causing it and I don’t find anything on Google

Dec 27 20:31:30 host8 systemd-networkd[448]: vmbr0: netdev ready
Dec 27 20:31:30 host8 systemd-networkd[448]: Enumeration completed
Dec 27 20:31:30 host8 systemd-networkd[448]: eth0: Renamed to eno1
Dec 27 20:31:30 host8 systemd-networkd[448]: vmbr0: Could not join netdev: Too many levels of symbolic links
Dec 27 20:31:30 host8 systemd-networkd[448]: vmbr0: Failed
Dec 27 20:31:30 host8 systemd-networkd[448]: eno1: IPv6 disabled for interface: Success
Dec 27 20:31:30 host8 systemd-networkd[448]: eno1: Gained carrier

This is my bridge setup :

# /etc/systemd/network/50-default.network
[Match]
MACAddress=a4:bf:01:26:XX:XX

[Network]
Bridge=vmbr0

# /etc/systemd/network/50-public-interface.link
[Match]
MACAddress=a4:bf:01:26:XX:XX

[Link]
MACAddressPolicy=persistent
NamePolicy=kernel database onboard slot path mac

# /etc/systemd/network/50-vmbr0.netdev
[NetDev]
Name=vmbr0
Kind=bridge
MACAddress=a4:bf:01:26:XX:XX

# /etc/systemd/network/50-vmbr0.network
[Match]
Name=vmbr0

[Network]
Address=54.36.XX.XX/24
Gateway=54.36.XX.254
#IPv6AcceptRA=false
NTP=ntp.ovh.net
DNS=127.0.0.1
DNS=213.186.33.99
DNS=2001:41d0:3:163::1
Gateway=2001:41d0:0303:46ff:ff:ff:ff:ff

[Address]
Address=2001:41d0:XXX:XXX::/64

[Route]
Destination=2001:41d0:XXX:XXX:ff:ff:ff:ff
Scope=link

My answer:


It looks like you’re trying to clone the MAC address of an Ethernet interface to the newly created bridge.

The bridge comes up with the assigned MAC address, but now you have two interfaces with that MAC address, the physical interface eno1 and the bridge vmbr0.

Thus, when 50-default.network is processed, it tries to assign to the bridge vmbr0 every interface matching the given MAC address. Unfortunately vmbr0 also has this address, so systemd-networkd cannot assign vmbr0 as an interface of itself!

To fix the problem, specify the desired Ethernet interface by name in 50-default.network instead of by MAC address.

[Match]
# Remove me
# MACAddress=a4:bf:01:26:XX:XX
Name=eno1

[Network]
Bridge=vmbr0

View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.