重启后,主机无法访问,我在日志中看到这个错误,vmbr0: Could not join netdev: Too many levels of symbolic links
我真的不知道是什么原因造成的,而且我在谷歌上也找不到任何东西
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
这是我的桥梁设置:
# /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
答案1
看起来您正在尝试将以太网接口的 MAC 地址克隆到新创建的网桥。
网桥带有分配的 MAC 地址,但现在您有两个具有该 MAC 地址的接口,即物理接口eno1
和网桥vmbr0
。
因此,在处理时,它会尝试将与给定 MAC 地址匹配的每个接口50-default.network
分配给网桥。不幸的是,这个地址也存在,因此 systemd-networkd 无法将其自身分配为接口!vmbr0
vmbr0
vmbr0
50-default.network
要解决此问题,请通过名称而不是 MAC 地址指定所需的以太网接口。
[Match]
# Remove me
# MACAddress=a4:bf:01:26:XX:XX
Name=eno1
[Network]
Bridge=vmbr0