As we know, We can create virtual wireless interface using iw dev (1). Also, We can change it's MAC address using ifconfig <ifname> hw ether <Address>. Then We can Set two different access points (SSIDs) to each of these inetrfaces using Network Manager. For example:

(Real)    wlan0: 00:16:b6:ab:cd:e7  ->  AP(1)
(Virtual) wlan1: 00:16:b6:ab:cd:e8  ->  AP(2)

But whenever wlan0 is connected to AP(1), And I try to connect to AP(2), First the wlan0 disconnects and then wlan1 connects to it's own AP.

I need to connect both of them simultaneously. Is it possible? How?

Edit: My specific card is a Lisco/Linksys RTL8191SEvB. I run Linux 4.4.38.


Some(Most in 2016?) Wifi-chips can function in several modes at the same time, but all on the same frequency, because they use the same radio. Now, If you have 2 radios attached to your chip, you could have several functions on several frequencies/channels.

E.g. the Intel 3160 can be 1 station, 1 Access-Point, AND 1 P2P device at the same time. This is used for WiDi or Miracast, while still being connected to the "other" Network.

The valid combinations for your chip can be seen as root with:
iw list | grep -A 2 'interface combination'

The Intel 3160 returns:

valid interface combinations:
   * #{ managed } <= 1, #{ AP, P2P-client, P2P-GO } <= 1, #{ P2P-device } <= 1,
   total <= 3, #channels <= 1

Checking the USB-dongles within reach on my desk, I can tell you:

  • rt2800usb reports:

        valid interface combinations:
             * #{ AP, mesh point } <= 8,
               total <= 8, #channels <= 1
  • rtl8192cu dongles, that use the same chip as your device, report:

interface combinations not supported

This message means, that your card can only perform 1 function at the same time.

For some wifi-chips several signed firmwares with differing capabilities are available. AFAICT, not for your rtl819x though.

For an Intel IWLWifi a solution could have been to switch (one of the) connections to you being the AP, or making it "Ad-Hoc"

Otherwise you'd have to replace your card with one that has #{managed}<5 or similarly relaxed restrictions.

Or, add a(nother) 10€ WUSB-WiFi-dongle for connection to the second AP.

  • 1
    I think this is the answer. On my own card it's said: "interface combinations are not supported" – Mohammad Etemaddar Dec 16 '16 at 12:26
  • @Alex Stragies Regarding your statement that all Wifi interfaces on a single physical radio must be operating on the same frequency. Why is that the case? It's possible to scan for wifi signals using something like iw dev wlan0 scan and it will return results on all frequencies that the antenna supports, even if you're connected to a network (e.g., 2412Mhz). This seems to suggest that the physical device can operate on more than one frequency at once? So why can't we have multiple virtual interfaces with a different frequency? – Filip Kilibarda Dec 23 '18 at 20:52

As close as you may seem to getting this to work, I am going to go out on a limb and suggest that this is not possible.

You do have the virtual interfaces set up correctly, giving you both a valid MAC address on the interfaces (layer 2) and good IP addresses (layer 3). However the actual connection to the AP is done over Radio Frequency, which is Layer 1.

Think of it this way, unless your wired ethernet card has two physical ethernet ports (RJ45, fiber, etc.) you can only ever plug into one network physically. The same goes for your wifi card.

Unless your Wifi card has more than one antenna (that you can control independently) then the Wifi card will only support one connection mode, either AP mode (receiving incoming connections) or a client (one to one). There may be Wifi cards that will let you do this, but it seems like this would need to be supported in firmware, not just in your computer's network stack (which you have properly configured).

  • I think, I understand your explanation. But, Think of Wireshark. With wireshark, You can listen to every packet from all APs/Stations around. Because, Linux drivers can let you to see every packet, No matter what it's destination MAC address is. In this way. I think as we can see every packet, We would also connect to more than one access point using single card. – Mohammad Etemaddar Dec 7 '16 at 10:18
  • If you need to connect to multiple APs the simplest way would be to add another Wifi card to your computer. This would give you a full Layer1 Network connection to another AP without having to dive into modifying drivers. – datUser Dec 8 '16 at 14:27
  • Wireshark definitely show you all of the broadcast traffic on a network, but I am not sure how you can configure Wireshark to snoop on all Wifi traffic on a network, regardless of its destination. I really can't say if Wifi cards can operate in a promiscuous mode, and snoop traffic that is only between an AP and another Client. – datUser Dec 8 '16 at 14:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.