1

I've follow the official guide to setup a bridge between eth0 und wlan0 in order to use my Pi Zero WH as an AP with raspbian buster 4.19.75+.

When I add the interface brctl addif br0 eth0, the bridge works fine. However after reboot, eth0 consistently isn't a member of br0. The system then looks the following:

root@raspberrypi:~# brctl show
bridge name  bridge id          STP enabled  interfaces
br0          8000.b827eb885a93  no           wlan0

root@raspberrypi:~# cat /etc/systemd/network/bridge-br0.netdev
[NetDev]
Name=br0
Kind=bridge

root@raspberrypi:~# cat /etc/systemd/network/bridge-br0-slave.network
[Match]
Name=eth0

[Network]
Bridge=br0

root@raspberrypi:~# cat /etc/systemd/network/bridge-br0.network
[Match]
Name=br0

[Network]
Address=10.5.5.13/24
Gateway=10.5.5.1
DNS=10.5.5.1
DNS=8.8.8.8
DNS=8.8.4.4

What am I doing wrong?

morrow
  • 13
  • 2
  • The Pi Zero has no ethernet device - perhaps the problem is with whatever USB ethernet device you're trying to use - for example, for some reason it's not detected by systemd – Jaromanda X Oct 23 '19 at 05:11
  • How do you get an interface **eth0**? Do you use an additional USB/ethernet dongle? – Ingo Oct 23 '19 at 07:44
  • yes, I'm using a USB/ethernet adapter which is working without issues. – morrow Oct 23 '19 at 20:49

1 Answers1

1

Please don't use the official guide. They are horribly mixing up things, setups and helper programs without understanding what they are doing. Beside other things they use configuration of interfaces with files in /etc/systemd/network. To use these files you have to enable systemd-networkd which is managing these files. For further information you may have a look at Compare three available networking systems on Raspbian.

Now if you check your setup you have made with the buggy guide with:

rpi ~$ systemctl status systemd-networkd.service

you will see that it is disabled! So this cannot work. And no, it does not help to just enable it. This will interfere with dhcpcd and maybe with the bridge-utils.

You can use Setting up a Raspberry Pi as an access point - the easy way to get a tested and running access point.

Ingo
  • 40,606
  • 15
  • 76
  • 189
  • Thanks a lot for the links, I will work through them. It's mind-boggling that the official guide get's this so wrong, I considered it to be the most reliable... – morrow Oct 23 '19 at 20:53
  • Grosses Danke Ingo, your walkthrough worked flawlessly and I've got my bridge running! – morrow Oct 24 '19 at 00:19
  • @Morrow The official guide is **NOT WRONG**. If you use the officially supported `dhcpcd` the guides work. There is nothing wrong with using a different networking service, but you will have to get used to reading the `man` pages. – Milliways Oct 24 '19 at 03:44
  • @Milliways The brigde part is **DEFINITIVELY WRONG**. Please note that they changed the setup and try to use configuration with files in `/etc/systemd/network` but they don't start **systemd-networkd** that is needed for that. Please try that setup and you will find that **eth0** isn't added to the bridge. – Ingo Oct 24 '19 at 08:06
  • @Milliways I can attest to the guides' falsity in the current state. I started this very thread because the bridge didn't work after following the official guide meticulously. Try it yourself if you are not convinced. – morrow Oct 24 '19 at 17:29
  • @Ingo I've found [this updated guide](https://github.com/raspberrypi/documentation/blob/e134af42dda5ea15d530f2743240e7c18abc4894/configuration/wireless/access-point-bridged.md) in a pending pull request. Is this one correct now? – morrow Oct 24 '19 at 17:36
  • @Morrow Yes, looks better. They have realized to enable `systemd-networkd` and they must not use bridge-utils because of conflicts. But they still mixing up `systemd-networkd` and `dhcpcd` and they use not needed `hostapd`. – Ingo Oct 24 '19 at 20:52