Wifi – Connect to multiple AP with one Wifi adapter under Linux/FreeBSD

networkingpfsensevlanwifi

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?

Best Answer

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.

Related Topic