16

How can I connect to more than one Wifi access point simultaneously using a single wireless adapter?

I'm currently using pfSense as my home router and I want it to connect to multiple APs wirelessly. Do you know if it's possible?

Alternatively, how can we do that under Ubuntu? Please shed me some light :)

Interesting notes:

  1. pfSense, as well as many router distros, supports using a single wireless adapter as multiple APs, but it's not clear (to me) whether they can act as multiple clients
  2. The "Virtual Wifi Adapter" in Windows 7 can apparently do just that
  3. For wired network, one can easily create interface alias (e.g. eth0:1) and obtain multiple IPs with ifconfig. Is this of any help?
netvope
  • 2,113
  • 5
  • 25
  • 35

1 Answers1

13

Under FreeBSD (pfSense is based on FreeBSD and has nothing to do with Linux) you can create multiple wlan interfaces based on the physical interface, then connect them to various APs. For instance, if you have an Atheros card in your computer (and it isn't renamed):

ifconfig wlan0 create wlandev ath0
ifconfig wlan bssid NetworkA [wep/wpa/etc info]
dhclient wlan0 (assuming DHCP)

if you wanted another connection just spin up another:

ifconfig wlan1 create wlandev ath0
ifconfig wlan bssid NetworkB [wep/wpa/etc info]
dhclient wlan1 (assuming DHCP)

If the two networks are on different channels you'll see a reduced throughput, noticeably so if you're actively using both.

Chris S
  • 77,337
  • 11
  • 120
  • 212
  • ok, but how do applications choose an interface resp. how can I force an app to use a specific interface? – Trass3r Jun 06 '12 at 12:53
  • Application do not choose an interface, the OS handles that. The best an App can do is select an IP associated with an interface. If you mean to ask how you can get an App to send traffic to different gateways you'd have to screw with routing tables and possibly start the app with altered network views. That's outside the scope of this Question so you'd have to ask a New Question. – Chris S Jun 06 '12 at 18:21
  • Is there a way to do this in Linux? Linux ifconfig do not have "create" keyword. – Phyo Arkar Lwin Apr 02 '13 at 14:42
  • Linux can connect to multiple WiFi networks, but they have to be on the same channel. I'm not familiar with the process however. There may be an existing Q/A on [SF], or [SU] or [unix.SE] too. – Chris S Apr 02 '13 at 15:26
  • Is it possible to do this on Windows? – Chorinator Jun 13 '14 at 03:09
  • @Chorinator No, networking in Windows is at least a decade behind Linux and the BSDs. There's a whole lot it can't do and connecting to two different WiFi networks simultaneously is one of those things. – Chris S Nov 03 '14 at 16:00
  • @ChrisS Is there some method to connect to multiple Wifi networks on different channels? I'm facing the same problem that Wifi networks need to be on the same channel. – George J. Adams Jul 06 '15 at 17:37
  • @GeorgeAdams Only certain hardware supports multiple channel operation. I couldn't say which chips at this point, the documentation for the ath(4) driver is somewhat ancient. – Chris S Jul 07 '15 at 14:57
  • I'm actually using ath-9k driver. Can you tell me how will this work with that? – George J. Adams Jul 09 '15 at 23:24