![具有桥接接口的 Linux 网络控制台](https://linux22.com/image/92859/%E5%85%B7%E6%9C%89%E6%A1%A5%E6%8E%A5%E6%8E%A5%E5%8F%A3%E7%9A%84%20Linux%20%E7%BD%91%E7%BB%9C%E6%8E%A7%E5%88%B6%E5%8F%B0.png)
netconsole
我尝试在我的家用电脑上启用,但是我的桥接 LAN 和 Wi-Fi 遇到一些问题。
如果我不指定接口名称,则会失败,如下所示:
$ sudo modprobe netconsole [email protected]/,[email protected]/A0:F3:C1:FF:4C:70 modprobe: ERROR: could not insert 'netconsole': No such device
dmesg 输出:
netpoll: netconsole: local port 6666 netpoll: netconsole: local IPv4 address 192.168.0.1 netpoll: netconsole: interface 'eth0' netpoll: netconsole: remote port 6666 netpoll: netconsole: remote IPv4 address 192.168.0.2 netpoll: netconsole: remote ethernet address a0:f3:c1:ff:4c:70 netpoll: netconsole: eth0 doesn't exist, aborting netconsole: cleaning up
它尝试查找
eth0
但失败了,很可能是因为 systemd 将其重命名为enp9s0
.如果我明确指定新的接口名称:
$ sudo modprobe netconsole [email protected]/enp9s0,[email protected]/A0:F3:C1:FF:4C:70 modprobe: ERROR: could not insert 'netconsole': Device or resource busy
dmesg 输出:
netpoll: netconsole: local port 6666 netpoll: netconsole: local IPv4 address 192.168.0.1 netpoll: netconsole: interface 'enp9s0' netpoll: netconsole: remote port 6666 netpoll: netconsole: remote IPv4 address 192.168.0.2 netpoll: netconsole: remote ethernet address a0:f3:c1:ff:4c:70 netpoll: netconsole: enp9s0 is a slave device, aborting netconsole: cleaning up
好吧,所以它不喜欢那
enp9s0
是桥梁的一部分。让我们用桥来尝试一下:
$ sudo modprobe netconsole [email protected]/br0,[email protected]/A0:F3:C1:FF:4C:70 modprobe: ERROR: could not insert 'netconsole': Unknown error 524
dmesg 输出:
netpoll: netconsole: local port 6666 netpoll: netconsole: local IPv4 address 192.168.0.1 netpoll: netconsole: interface 'br0' netpoll: netconsole: remote port 6666 netpoll: netconsole: remote IPv4 address 192.168.0.2 netpoll: netconsole: remote ethernet address a0:f3:c1:ff:4c:70 netpoll: (null): wlp6s0 doesn't support polling, aborting netconsole: cleaning up
看起来它尝试设置属于网桥一部分的所有接口,但在无线接口处失败。
是否存在解决方案?