dhcp не работает на br0, новая конфигурация

Я пытаюсь создать мост для подключения виртуальных устройств xen. br0, похоже, работает, но не работает IP и ссылка ipv6, локальная на br0, также не могут быть достигнуты

root@Inspiron15:/home/# ifconfig
br0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet6 fe80::6087:a7ff:feeb:ae35  prefixlen 64  scopeid 0x20<link>
        ether 62:87:a7:eb:ae:35  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 5  bytes 414 (414.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enx4ce173422757: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 4c:e1:73:42:27:57  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 1318  bytes 142311 (142.3 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1318  bytes 142311 (142.3 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlp0s20f3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.123  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::f285:75ec:cbfc:756  prefixlen 64  scopeid 0x20<link>
        ether 40:1c:83:fb:2f:48  txqueuelen 1000  (Ethernet)
        RX packets 30775  bytes 19053551 (19.0 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 27176  bytes 4228112 (4.2 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

и

root@Inspiron15:/home/# nmcli device status
DEVICE             TYPE      STATE                                  CONNECTION  
wlp0s20f3          wifi      connected                              getAjobFool 
br0                bridge    connecting (getting IP configuration)  netplan-br0 
88:36:5F:01:0A:B5  bt        disconnected                           --          
BC:98:DF:6A:17:C1  bt        disconnected                           --          
p2p-dev-wlp0s20f3  wifi-p2p  disconnected                           --          
enx4ce173422757    ethernet  unavailable                            --          
lo                 loopback  unmanaged                              --

Я попытался дать ему статический IP-адрес в сетевом плане, и это привело к отключению как моего Wi-Fi, так и br0.

root@Inspiron15:/home/# cat /etc/netplan/01-network-manager-all.yaml 
# Let NetworkManager manage all devices on this system
network:
  version: 2
  renderer: NetworkManager
network:
  ethernets:
    wlp0s20f3:
      dhcp4: true
  version: 2

  bridges:
    br0:
      interfaces: [wlp0s20f3]
      dhcp4: yes
      #addresses: [192.168.1.230/24]
      #gateway4: 192.168.1.1

Я запускаю

netplan generate

и

netplan apply

Я также пытался вручную запустить dhcp непосредственно на интерфейсе.

dhclient br0

Он просто зависает

Как мне заставить dhcp работать на моем br0?

ОС: Ubuntu 20.04.2 LTS desktop

ОБНОВЛЕНИЕ: Я попробовал 2 другие беспроводные сетевые карты, которые у меня только что были чтобы узнать, было ли это связано с оборудованием. Та же проблема с двумя другими.

Драйвер моста загружен в ядро.

# find /lib/modules/$(uname -r) -type f -name '*.ko'|grep bridge
/lib/modules/5.8.0-55-generic/kernel/net/bridge/bridge.ko
0
задан 8 June 2021 в 06:13

2 ответа

Я попробовал ether nic, и он сразу заработал. Затем я нашел это.

Плохие новости для беспроводных сетей

It doesn't work with my Wireless card!

This is a known problem, and it is not caused by the bridge code. Many wireless cards don't allow spoofing of the source address. It is a firmware restriction with some chipsets. You might find some information in the bridge mailing list archives to help. Has anyone found a way to get around Wavelan not allowing anything but its own MAC address? (answer by Michael Renzmann (mrenzmann at compulan.de))

Well, for 99% of computer users there will never be a way to get rid of this. For this function a special firmware is needed. This firmware can be loaded into the RAM of any WaveLAN card, so it could do its job with bridging. But there is no documentation on the interface available to the public. The only way to achieve this is to have a full version of the hcf library which controls every function of the card and also allows accessing the card's RAM. To get this full version Lucent wants to know that it will be a financial win for them, also you have to sign an NDA. So be sure that you won't most probably get access to this peace of software until Lucent does not change its mind in this (which I doubt never will happen).
0
ответ дан 28 July 2021 в 11:31

В вашей конфигурации netplan есть несколько ошибок.

  1. Дублированные разделы сети
  2. Дублированные ключи версий
  3. Я не думаю, что вы должны включать DHCP на интерфейсе wlp0s20f3, а только на мосте.

Вот так:

network:
  version: 2
  renderer: NetworkManager
  ethernets:
    wlp0s20f3:
      dhcp4: false

  bridges:
    br0:
      interfaces: [wlp0s20f3]
      dhcp4: yes
1
ответ дан 28 July 2021 в 11:31

Другие вопросы по тегам:

Похожие вопросы: