Wireless Bridge "different" than Wired


Not a major issue (not even close :stuck_out_tongue_winking_eye:), but just curious why bridging for wired devices is handled inside the Device, selecting Bridge Ports - but for Wireless, you can't select the wireless devices (to assign to the bridge)? In fact, there is a note,

In order to attach wireless networks, choose the associated interface as network in the wireless settings.

Is this just a WIP / temporary thing, and hence the note, or is there a reason behind it? Just trying to understand. I did some hunting around, and lots of info about how to set this (which is clear), but not really any explanation of why it's different.


Trying to create a bridge with two legs - #2 by vgaetera

The bridges have to be created first, then the (wired) interfaces are attached to them; this is done by the "network" infrastructure.

Wireless interfaces are created later, by the "wireless" infrastructure, and attached to the same bridges.

you can have multiple wifi networks generated by the same wifi device (as that is a physical wifi radio), if you just bridge the device you are locking all wifi networks from that device to the bridge, which in many cases you don't want.
For example for guest wifi setup.

It's similar for VLANs, where you can split a single ethernet port/controller/device into multiple networks. In that case you will then bridge the virtual interface of the VLAN on that device, not the whole device.

Thanks for the info - appreciate it! And this all makes sense, but ... why in LuCI does it need to be "different" in terms of configuration? Again, really not a biggie - just wondering if consistency in (LuCI config) would be helpful.

Thanks again.

  • netifd and hostapd are different services, which use separate configs.
  • netifd manages wired/tunnel/virtual interfaces, delegating wireless to hostapd.
  • fw3 does not interact with hostapd, but requires predictable interface names.
  • fw3 relies on bridges created by netifd to assign wireless interfaces to zones.

On what release are you at the moment? I'm following snapshot (i.e. latest development) and I can select the "wireless devices" (wifi network name) as well in the Interfaces > LAN edit > Pysical settings tab > bridge ports drop down menu.

I think what you ask has either already been implemented in 21.02 or will be in next release. I quite frankly didn't check the menu so often so I don't know when it was implemented.

I'm also on snapshot - but bridging for me seems to have to be done in Interfaces > Devices > Configure, then Bridge ports. But wlan is not accessible there ... perhaps due to the netifd and hostapd difference / separation @vgaetera mentions above?


Ah ok so your device is using the newer DSA switch control architecture. I'm using a device with the "older" and deprecated swconfig switch control architecture so I still see the "older" way of bridging.

Afaik what you see is the new interface to manage bridges and VLANs using the DSA architecture https://github.com/openwrt/luci/pull/4307
and as discussed in the PR, the ability to use wireless networks in that page is not implemented at the moment.
I don't think this was merged in 21.02 yet, it's been merged to master after I pinged jow about it, so people in snapshot can at least use/test it.

As vgaetera mentioned, the wifi is operated by a different software and does not create an actual device so showing a wifi network as an "interface" and allowing you do "bridge it" through the same page requires additional code, which is still WIP.
Also the older interface required custom code to do this.

That makes sense, thanks for the info!

Hmmm ... so it is in master? I admit, not seeing it there - but it may be me!

OK, that makes sense also. And debugging a different issue, I do see the ability in v19.07.8, so it being WIP aligns. No biggie, and no panic :laughing:

Thanks again!

It's in master, in the Luci github repo since it is a Luci web interface thing, the commit is shown in the "jow merged commit xxx " line after my post in the PR thread https://github.com/openwrt/luci/pull/4307#issuecomment-796719895
and this is the commit

It is unlikely that direct wifi port selection for bridges will be implemented any time soon. The uci configuration does not allow bridging specific wireless interface names but you can only indirectly attach wireless networks (config wifi-iface) to bridges via intermediate logical networks (config interface) that reference the target bridge (config device).

In older releases the bridge was indirectly declared by the target config interface which made a simple reverse mapping possible.

With the new wifi-iface -> interface -> device entity chain it became infeasible due to the added complexity (wifi-ifacrs can reference multiple interfaces, devices can be referenced by multiple interfaces, intermediate interfaces could be absent, …).

Suggestions for allowing a direct wifi-iface -> (bridge) device association in uci so far have been declined by netifd maintainers, stating that merely selecting a target network from the wifi-iface is better ux,


I disagree on this point, but as long as it can be done at all with web interface (even just from wifi page as it is now) it's good enough.
We will have to adjust documentation eventually when this lands in a stable release

1 Like

No arguments here, and this explanation makes sense - really appreciate it!