Mixing multiple 'ap' and 'sta' interfaces on the same hardware radio

Hi guys. It's time for me to take a break from server configuration and return to network studying.

From what I know, a single hardware radio (e.g: wifi-device 'radio0') can operate in a range of frequencies (or channels), but it can only work at a fixed frequency at a time.

Assume that the radio channel option is set to 6, to broadcast multiple SSIDs at that channel, and I also create an interface of type sta to connect to an upstream Wi-Fi network. It is simply not possible to determine ahead of time which channel the upstream network uses, not to mention that they can have a lot of Access Points with multiple channels. I am expecting the driver to change the channel of the hardware radio in an attempt to connect to upstream network, and break connections with all downstream devices due to the change. Is that correct?

Also, I cannot understand what would happen when I create multiple sta interfaces to force it to connect to multiple upstream Wi-Fi at different channels. The flexibility of OpenWrt makes my head confused.

Your understanding is mostly correct.

If you have a single radio that will operate in STA + AP modes, you will need to set the channel to auto. This allows it to connect to the upstream AP, and then it will use that same channel for the AP mode operation. It is not possible to have the single radio operate on different channels at the same time.

In theory, if there were multiple different SSIDs (different names), it would be possible to connect to more than one concurrently, but they would all need to be on the same channel in order for it to physically work with a single radio. In practice, I have no idea what happens if you actually do this, but I can say that the general performance would be poor with multiple SSIDs on a single channel (due to noise/interference on a per-SSID basis, unless they were all coming from the same upstream AP's radio). But the more SSIDs that you use, the worse the combined AP + STA (+ STA + STA...) mode performance would be expected.

Now, all of that said, two other considerations...

  • not all hardware/drivers actually support multiple SSIDs and/or STA + AP mode operation.
  • If you are running AP + STA, the STA must come up first or else the AP mode cannot operate (because of the channel dependency). As a result, when the upstream AP is not available, the downstream AP/SSID will not work at all (not even for simply administering the router). For this situation, there is the travelmate package.

In practice, the "valid interface combinations" listed via "iw list" are the final arbiter - and I haven't seen any wireless card supporting more than one STA on the same radio (ignoring DBDC for a moment, but those can be viewed as two distinct radios) so far.

1 Like

I'm going to take your word for it, @slh. I may be full of it on this topic.

@Livy -- if you give it a shot, let us know what happens (also please report the hardware you are using). Make sure you have a wired interface to use for connecting since your radio could be unhappy and not come up if you force an invalid configuration.

I just checked a few devices, and on all of them iw list claims support for multiple station interfaces (as long as all are on the same channel):

IPQ40xx:
	valid interface combinations:
		 * #{ managed } <= 16, #{ AP, mesh point } <= 16, #{ IBSS } <= 1,
		   total <= 16, #channels <= 1, STA/AP BI must match, radar detect widths: { 20 MHz (no HT), 20 MHz, 40 MHz, 80 MHz, 80+80 MHz, 160 MHz }

MT7615:
	valid interface combinations:
		 * #{ IBSS } <= 1, #{ managed, AP, mesh point, P2P-client, P2P-GO } <= 16,
		   total <= 16, #channels <= 1, STA/AP BI must match, radar detect widths: { 20 MHz (no HT), 20 MHz, 40 MHz, 80 MHz, 80+80 MHz, 160 MHz }

MT7612:
	valid interface combinations:
		 * #{ IBSS } <= 1, #{ managed, AP, mesh point, P2P-client, P2P-GO } <= 8,
		   total <= 8, #channels <= 1, STA/AP BI must match, radar detect widths: { 20 MHz (no HT), 20 MHz, 40 MHz, 80 MHz }

MT7603:
	valid interface combinations:
		 * #{ IBSS } <= 1, #{ managed, AP, mesh point, P2P-client, P2P-GO } <= 4,
		   total <= 4, #channels <= 1, STA/AP BI must match
1 Like