Wifi STA to ethernet vlan

Hello everyone,

I have a router with 5 ethernet ports and 2 WiFi radios (mqmaker witi) and I try to configure it as a wireless-capable switch with the following configuration using version 22.03.6 :

  • lan1 in VLAN 10, untagged,
  • lan2 in VLAN 20, untagged,
  • lan3, lan4 and lan5 in VLAN 1, untagged,
  • lan5 in VLAN 10, 20 and 30, tagged,
  • radio0 as an AP in VLAN 1, untagged,
  • radio1 as a STA in VLAN 30, tagged.

My use case is to use this "switch" connected on lan5 to an OpenMPTCPRouter device with only one ethernet port : it will connect to ISPs through VLAN 10, 20 and 30, and distribute the aggregated connections to ports n°3, 4 and the WiFi AP on radio0 through VLAN 1.

So far I've managed to setup everything by bridging all lan ports, setting up the WiFi AP on radio0 (automagically added to the bridge), deactivating the default DHCPv4/v6 servers, setting the VLANs on the bridge ports. All of this seems to work as intended.

I'm now stuck on the radio1 configuration : I can configure it as a STA, connect it to an AP, but I can't find a way to add it to the bridge so that I can setup VLAN 30 on it.
I read many topics on articles, blogs and on this very forum but can't find any similar configuration (or I'm bad at finding the correct words when searching).

My question is then : is my setup doable ? Is there a way to setup a radio as a client and "bind" it to an VLAN on a trunk lan port the most "transparent" as possible ? i.e. in an ideal world I'd like to have the OpenMPTCPRouter requesting an IP with DHCP directly on the wireless ISP's router my "switch" STA is connected to.

Thanks in advance for your advices !

marmot

hi
bridge in classic mean, with OWRT wifi as STA is not possible
there is a relayd package which simulate bridge mode, but it will only work with IPv4

maybe this could help

Hello NPeca75,

Thanksfor the answer, I know this solution, I've used it years ago for a LAN to wifi to LAN "bridge" to extend my wired network, sucessfully.

In my case it indeed "binds" the STA to the bridge, but I don't know then how to add the VLAN 30 tag to the STA frames ?
Without this I won't have the desired behaviour, and I may end having two DHCP servers on the bridge, my OpenMPTCProuter and the ISP's one.

marmot

hi @marmot

one possible solution, which proven in the production is L2 tunnel over wifi
EoIP, GRE ...
this way i could freely mix mikrotik, openwrt and few other vendors
as WDS is not working between vendors as expected, it is best to have one L3 layer, only to connect two wifi
and on top of this layer, you could implement L2 tunnel which could be bridged and could carry VLANs

See if this helps:

Hello,

If I correctly understand, your proposition is to create the link between my STA interface and my OpenMPTCProuter, through the wired link using a GRE tunnel instead of a VLAN ?

Can be feasible as the two are running OpenWrt, I'll give a try.

marmot

If you can connect the routers by wire then you can simply use vlans.

The problem is that if the router are connected wirelessly that wifi does not support vlan tagging.

So you have to use layer two tunnels e.g. Gre via the wifi to transport the VLANs that is what is described in this video

My routers are connected by wire, and my issue is that it seems I can't use VLAN because a WiFi STA cannot be added to a bridge

Edit : to add more context, I'm not trying to link two routers wirelessly with VLAN support.

To give you a view of what I try to achieve, imagine a fictional router with only one LAN and no WiFi on which I want to have two WAN connections. These two WANs are provided by two ISP routers, one is wire-only, the other is Wi-Fi only.

For this I add an external 3-port managed switch and a WiFi<->LAN device (extender, relayd, ...) to the setup.
On the external switch I setup two VLANs on two ports (untagged) and trunk these VLANs to the router on the third port (tagged).
I connect the first switch port to an ISP router with a wire, and on the second switch port I connect the WiFi<->LAN device, connected to another ISP router via WiFi.
On the LAN-only router I setup the two WAN interfaces on the two trunked VLANs IDs.

I try to achieve this setup with, instead of a managed switch and a WiFi<->LAN device, is single OpenWrt device having both LAN and WiFi built-in (mqmaker witi)
And it seems that WiFi client (STA) + VLAN is noy feasible, then maybe GRE could work