21.02.3 new bridge device not being created

Hello,
When I create a second bridge device, either via /etc/config/network or via the UI the device is never actually created. Doing it manually via brctl works fine.

Tried on both of these images with the same result
https://rpi4.wulfy23.info/builds/rpi-4_snapshot_7.1.13-3_r19686_extra/rpi4.64-snapshot-29260-7.1.13-3-r19686-ext4-fac.img.gz

https://downloads.openwrt.org/releases/21.02.3/targets/bcm27xx/bcm2711/openwrt-21.02.3-bcm27xx-bcm2711-rpi-4-ext4-factory.img.gz

br-lan works fine, br2 never gets created

config interface 'loopback'
        option device 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fd80:176c:844c::/48'
        option packet_steering '1'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'eth0'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

config interface 'wg2'
        option proto 'wireguard'
        option private_key '*******************************************'
        list addresses '192.168.41.18/32'
        option delegate '0'

config wireguard_wg2
        option description 'scomp'
        option public_key '*****************************************'
        option route_allowed_ips '1'
        option endpoint_host '***************************'
        option endpoint_port '51910'
        option persistent_keepalive '25'
        list allowed_ips '192.168.41.0/24'

config interface 'l2tun'
        option proto 'gretap'
        option peeraddr '192.168.41.1'
        option ipaddr '192.168.41.18'
        option tunlink 'wg2'
        option delegate '0'
        option mtu '1382'

config interface 'wwan'
        option proto 'dhcp'

config device
        option type 'bridge'
        option name 'br2'
        list ports 'eth1'
        option bridge_empty '1'
        option ipv6 '0'

root@OpenWrt:~# brctl show
bridge name     bridge id               STP enabled     interfaces
br-lan          7fff.e45f0134b55f       no              eth0

What am I doing wrong?

Thank you

What are you trying to do with the bridge? And why do you have bridge_empty set, when clearly the bridge has eth1 in the bridge? Also, does your device have eth1? What device are you using?

option bridge_empty '1'

was there just as a troubleshooting step. as I understand it that setting would bring up the bridge device even if no interfaces are present.
There's no difference in behavior with that or if I list multiple interfaces.

The desired bridge will include both eth1 and the gretap device l2tun, both of these devices are present and work fine.

if I manually create the bridge like so, everything works as expected

brctl addbr br2
brctl addif br2 eth1
brctl addif br2 gre4t-l2tun

ip link set up br2
ip link set up eth1
ip link set up gre4t-l2tun

At least one config interface section needs to reference this bridge, otherwise it will not be created by netifd.

Try adding a

config interface br2
  option proto none
  option device br2
3 Likes

That did the trick. Thank you @jow !

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.