21.02.3 new bridge device not being created

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


br-lan works fine, br2 never gets created

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

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 ''
        option netmask ''
        option ip6assign '60'

config interface 'wg2'
        option proto 'wireguard'
        option private_key '*******************************************'
        list addresses ''
        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 ''

config interface 'l2tun'
        option proto 'gretap'
        option peeraddr ''
        option ipaddr ''
        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

That did the trick. Thank you @jow !

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