具有桥接接口的 Linux 网络控制台

具有桥接接口的 Linux 网络控制台

netconsole我尝试在我的家用电脑上启用,但是我的桥接 LAN 和 Wi-Fi 遇到一些问题。

  1. 如果我不指定接口名称,则会失败,如下所示:

    $ 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.

  2. 如果我明确指定新的接口名称:

    $ 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是桥梁的一部分。

  3. 让我们用桥来尝试一下:

    $ 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
    

    看起来它尝试设置属于网桥一部分的所有接口,但在无线接口处失败。

是否存在解决方案?

相关内容