Cannot get wireless virtual interfaces to work, simultaneously in AP and station modes

Hi everyone,

we have an hAP[1] routerboard device. The use-case is the following:

Sometimes multiple people of our organization are on the go together. E.g. staying at a hotel. The device is supposed to utilize eth5 and wifi to provide a connection to e.g. a hotel internet connection.

Configuration

  • Ports 1-3 bridged together with an openvpn client in ethernet mode.
  • Port 4 is masqueraded to send stuff over WAN without openvpn. Hotels generally
    require you to authenticate with your room number & name first before usage.
    This is what this port is for.
  • Port 5 and both wifi chips (mode: station) are bridged together to provide WAN access.

What’s missing

What is missing is for people to be able to access the VPN via WiFi too. That’d be simple by using another WiFi device and connecting it to port 1, 2 or 3. We’ve tried that, it works. But we’d prefer if we’d only have to carry one of those small devices.

I asked support if any of their devices support concurrent operation in host AP AND client mode at the same time. I was told all with QCA chips do. This one has a QCA chip.[2]

The problem

I cannot figure out how to do that. I tried to run the main interface in ‘station’ mode, in AP mode, whatever. Both 2 and 5 GHz interfaces. I tried a slew of different virtual interfaces on top of that, but I either get only AP mode to work or only station mode. Does anyone have any pointers on how I need to set up the non-virtual interface to get it to work? I know that I have to pick the right frequency to support client mode, and I did that.

Any pointers would really be appreciated!

Thanks in advance.


[1] https://routerboard.com/RB951Ui-2nD
[2] “All our Routherboards with QCA wireless chipsets supports that - you just need the latest RouterOS version. Here is info on that: http://wiki.mikrotik.com/wiki/Manual:Interface/Wireless#Virtual_interfaces

Hi,

maybe I can help.
I did this kind of setup myself and I came across the following behavior:

Assume, “wlan1” is the physical wifi interface and it is configured as “station”. Now, you create a second wifi interface, the virtual AP interface “wlan2”, which is the slave interface of “wlan1”.
At this time, there are two important limitations:

  • Both interfaces use the same channel
  • the slave interface “wlan2” will only act as AP when the master interface “wlan1” is connected to an AP.

Or, in other words, the slave interface will only be active when the master interface is active aswell. It’s not important if the master interface is in AP mode and the slave interface is in station mode or the other way round.

Regards,
Ape

Ohhh, great point. That may have screwed everything up! I may not have been connected, cause I was switching between two different wifis, one on 5 GHz one on 2 GHz. That also means if a hotel e.g. only provided 5 GHz, the 2 GHz interface would be disabled until I’d changes modes. I’ll try that!