2

I was wondering if it were possible to have 2 or more WiFi USB dongles setup in Linux with each having a different SSID and different networks with one setup as the gateway to a WiFi router?

I.e. with 3 WiFi dongles; wlan0, wlan1, and wlan2.

  • wlan0 -> WiFi router
  • wlan1 -> SSID="abc"
  • wlan2 -> SSID="def"

where "abc" has a default route through wlan0 and "def" only has access to the w.x.y.z network

I've tried googling but with little success.

2 Answers2

2

They are interfaces as any other when it comes to routing, so you can indeed setup a host Linux machine as router with several of them.

While not an ideal situation, depending on the physical setup, due to them having a strong signal too near each other, it is possible to have several working at the same time.

I would avoid however, putting them all on the same channel, and exactly near to each other in side-by-side USB slots whenever possible.

When possible, I recommend avoiding USB interfaces for the wifi interface responsible for the hostapd service, using an internal wifi not dependent on USB, if any.

Avoid realtek devices, see this post for wifi general recommendations. Wi-Fi problems using ASUS USB-N13 adapter

P.S. I actually have setup a platform for routing tests in FreeBSD, with an internal Atheros + an external Ralink wifi interface.

Rui F Ribeiro
  • 56,709
  • 26
  • 150
  • 232
0

Use "ifenslave"
$apt install ifenslave
then
$modprobe bonding
$ifconfig bond0 192.168.0.1 netmask 255.255.0.0
$ip link set eth0 down
$ip link set eth1 down
$ifenslave bond0 eth0 eth1
$ip link set bond0 up
$ip link set eth0 up
$ip link set eth1 up
then setup hotspot

Bruce
  • 1
  • Welcome to U&L. Unfortunately this does not answer the question. The OP asks how to use multiple Wi-Fi dongles, one connecting to a Wi-Fi router acting as a bridge for two others which act as APs/hotspots broadcast different SSIDs. Your solution explains how to aggregate two otherwise independent interfaces for load balancing etc., an entirely different thing. – Peregrino69 Mar 20 '23 at 06:39