请注意,我使用的是 Void Linux。
这是我的/etc/network/interfaces.d/br0
文件:
auto br0
iface br0 inet dhcp
bridge_ports eth0
bridge_stp off
bridge_waitport 0
bridge_fd 0
但是在启动时我收到此错误:
=> Bringing up the network
Internet Systems Consortium DHCP Client 4.4.2
Copyright 2004-2020 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Cannot find device "br0"
Failed to get interface index: No such device
If you think you have received this message due to a bug rather
than a configuration issue please read the section on submitting
bugs on either our web page at www.isc.org or in the README file
before submitting a bug. These pages explain the proper
process and the information we find helpful for debugging.
exiting.
ifup: failed to bring up br0
我已经确认我已经bridge-utils
安装了。我不知道这里的问题是什么。我将不胜感激的帮助。
答案1
(这实际上是一个“评论”,而不是答案,但它不适合评论部分)
似乎ifup
没有“在幕后”创建桥接界面。
我希望它能做到这一点:
ip link add name brLAN type bridge
ip link set brLAN up
ip link set eno1 master brLAN
ip link set eno1 up
如果网桥使用 dhcp 那么:
dhclient brLAN