Score:0

dhcp fails on br0, new configuration

in flag

I am trying to create a bridge for xen virtual devices to connect to. The br0 appears to be up but it will not pull an IP and the ipv6 link local on the br0 cannot be reached either

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

and

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

I tried to give it a static IP in the netplan and that just brought both my wifi and the br0 down.

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

I run

netplan generate

and

netplan apply

I also tried to manually start dhcp on the interface directly.

dhclient br0

It just hangs

How do I get dhcp to work on my br0?

OS: Ubuntu 20.04.2 LTS desktop

UPDATE: I tried 2 other wireless NICs I had just to see if it was hardware related. Same issue with the other two.

Bridging driver appears loaded into the kernel.

# find /lib/modules/$(uname -r) -type f -name '*.ko'|grep bridge
/lib/modules/5.8.0-55-generic/kernel/net/bridge/bridge.ko
guiverc avatar
cn flag
Please provide OS & release details; inc. desktop/server as I see both NM & Netplan details so which you're using is very unclear (ie. details of your software stack please)
brad avatar
in flag
@guiverc My bad. I'm using 20.04 desktop edition. I have tried both nmcli and netplan. Same issue in either.
Score:1
cn flag

There are a few errors in your netplan-configuration.

  1. Duplicate network sections
  2. Duplicate version keys
  3. I do not think you are supposed to enable DHCP on the interface wlp0s20f3 but rather on the bridge only.

Like this:

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

  bridges:
    br0:
      interfaces: [wlp0s20f3]
      dhcp4: yes
Christian Ehrhardt avatar
sl flag
Ack to this, and I wanted to add that in general bridging on wireless interfaces is soemwhat flawed. Please read https://wiki.debian.org/BridgeNetworkConnections#Bridging_with_a_wireless_NIC
brad avatar
in flag
@Level9 Unfortunately that did not resolve my issue. After regenerating,reapplying and then reboot, brings my network down. wlp0s20f3 never gets an IP. I have to restore the .yaml file, regenerate, reapply and the reboot, to restore networking.
Level9 avatar
cn flag
Its not the interface wlp0s20f3 that should get the ip but the bridge, right?
brad avatar
in flag
@Level9 it is the wlp0s20f3 getting the bridge. interfaces: [wlp0s20f3] is correct.
Score:0
in flag

I tried an ether nic and it came right up. Then I found this.

Bad news for wireless

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).
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.