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

Vla*_*eev 5 linux networking bridge

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

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

    $ sudo modprobe netconsole netconsole=6666@192.168.0.1/,6666@192.168.0.2/A0:F3:C1:FF:4C:70 
    modprobe: ERROR: could not insert 'netconsole': No such device
    
    Run Code Online (Sandbox Code Playgroud)

    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
    
    Run Code Online (Sandbox Code Playgroud)

    它尝试查找eth0并失败,很可能是因为 systemd 将其重命名为enp9s0.

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

    $ sudo modprobe netconsole netconsole=6666@192.168.0.1/enp9s0,6666@192.168.0.2/A0:F3:C1:FF:4C:70
    modprobe: ERROR: could not insert 'netconsole': Device or resource busy
    
    Run Code Online (Sandbox Code Playgroud)

    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
    
    Run Code Online (Sandbox Code Playgroud)

    好的,所以它不喜欢那enp9s0是桥梁的一部分。

  3. 让我们用桥来试试:

    $ sudo modprobe netconsole netconsole=6666@192.168.0.1/br0,6666@192.168.0.2/A0:F3:C1:FF:4C:70 
    modprobe: ERROR: could not insert 'netconsole': Unknown error 524
    
    Run Code Online (Sandbox Code Playgroud)

    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
    
    Run Code Online (Sandbox Code Playgroud)

    看起来它试图设置属于桥接器的所有接口,但在无线接口处失败。

是否存在解决方案?