Two APs (network manager)

I have a laptop that needs to access two Access Points at once. I have tried almost everything I can think of while using network.manager with no luck. I tried adding a virtual adapter. I even tried two physical adapters. I could not get it bring up a physical and a virtual at the same time. When I used two physical adapters it kept trying to load the wrong adapter and would get all messed up. I even assigned a MAC to each AP. After two weeks of messing with this I was about to give up then I figured I would try using wicked one more time. With in 15 minutes I had it up and working fine. I setup the onboard adapter to connect to the main AP. I rebooted, checked, and plugged in a USB adapter. Set it up for the second AP and that was it. Now it all works.

With the onboard WIFI it connects to the main AP (public). If you plug in the USB WIFI it will connect to the second AP (private). Then it will have access to both APs at the same time when needed. Is there anyway I can access both networks with the onboard card or do I have to use two adapters? Is there a card that will let you setup two connections at once? Why would that not work in network manager? I like having the icon in the toolbar.

virtual adapter (iw dev wlo1 interface add wlo2 type station)

The onboard card…

iw list
Wiphy phy0
        max # scan SSIDs: 20
        max scan IEs length: 425 bytes
        max # sched scan SSIDs: 20
        max # match sets: 11
        max # scan plans: 2
        max scan plan interval: 65535
        max scan plan iterations: 254
        Retry short limit: 7
        Retry long limit: 4
        Coverage class: 0 (up to 0m)
        Device supports RSN-IBSS.
        Device supports AP-side u-APSD.
        Supported Ciphers:
                * WEP40 (00-0f-ac:1)
                * WEP104 (00-0f-ac:5)
                * TKIP (00-0f-ac:2)
                * CCMP (00-0f-ac:4)
                * CMAC (00-0f-ac:6)
        Available Antennas: TX 0 RX 0
        Supported interface modes:
                 * IBSS
                 * managed
                 * AP
                 * AP/VLAN
                 * monitor
                 * P2P-client
                 * P2P-GO
                 * P2P-device
        Band 1:
                Capabilities: 0x1162
                        HT20/HT40
                        Static SM Power Save
                        RX HT20 SGI
                        RX HT40 SGI
                        RX STBC 1-stream
                        Max AMSDU length: 3839 bytes
                        DSSS/CCK HT40
                Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
                Minimum RX AMPDU time spacing: 4 usec (0x05)
                HT Max RX data rate: 150 Mbps
                HT TX/RX MCS rate indexes supported: 0-7
                Bitrates (non-HT):
                        * 1.0 Mbps
                        * 2.0 Mbps (short preamble supported)
                        * 5.5 Mbps (short preamble supported)
                        * 11.0 Mbps (short preamble supported)
                        * 6.0 Mbps
                        * 9.0 Mbps
                        * 12.0 Mbps
                        * 18.0 Mbps
                        * 24.0 Mbps
                        * 36.0 Mbps
                        * 48.0 Mbps
                        * 54.0 Mbps
                Frequencies:
                        * 2412 MHz [1] (22.0 dBm)
                        * 2417 MHz [2] (22.0 dBm)
                        * 2422 MHz [3] (22.0 dBm)
                        * 2427 MHz [4] (22.0 dBm)
                        * 2432 MHz [5] (22.0 dBm)
                        * 2437 MHz [6] (22.0 dBm)
                        * 2442 MHz [7] (22.0 dBm)
                        * 2447 MHz [8] (22.0 dBm)
                        * 2452 MHz [9] (22.0 dBm)
                        * 2457 MHz [10] (22.0 dBm)
                        * 2462 MHz [11] (22.0 dBm)
                        * 2467 MHz [12] (22.0 dBm) (no IR)
                        * 2472 MHz [13] (22.0 dBm) (no IR)
        Band 2:
                Capabilities: 0x1162
                        HT20/HT40
                        Static SM Power Save
                        RX HT20 SGI
                        RX HT40 SGI
                        RX STBC 1-stream
                        Max AMSDU length: 3839 bytes
                        DSSS/CCK HT40
                Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
                Minimum RX AMPDU time spacing: 4 usec (0x05)
                HT Max RX data rate: 150 Mbps
                HT TX/RX MCS rate indexes supported: 0-7
                VHT Capabilities (0x33807120):
                        Max MPDU length: 3895
                        Supported Channel Width: neither 160 nor 80+80
                        short GI (80 MHz)
                        SU Beamformee
                        RX antenna pattern consistency
                        TX antenna pattern consistency
                VHT RX MCS set:
                        1 streams: MCS 0-9
                        2 streams: not supported
                        3 streams: not supported
                        4 streams: not supported
                        5 streams: not supported
                        6 streams: not supported
                        7 streams: not supported
                        8 streams: not supported
                VHT RX highest supported: 0 Mbps
                VHT TX MCS set:
                        1 streams: MCS 0-9
                        2 streams: not supported
                        3 streams: not supported
                        4 streams: not supported
                        5 streams: not supported
                        6 streams: not supported
                        7 streams: not supported
                        8 streams: not supported
                VHT TX highest supported: 0 Mbps
                Bitrates (non-HT):
                        * 6.0 Mbps
                        * 9.0 Mbps
                        * 12.0 Mbps
                        * 18.0 Mbps
                        * 24.0 Mbps
                        * 36.0 Mbps
                        * 48.0 Mbps
                        * 54.0 Mbps
                Frequencies:
                        * 5180 MHz [36] (22.0 dBm) (no IR)
                        * 5200 MHz [40] (22.0 dBm) (no IR)
                        * 5220 MHz [44] (22.0 dBm) (no IR)
                        * 5240 MHz [48] (22.0 dBm) (no IR)
                        * 5260 MHz [52] (22.0 dBm) (no IR, radar detection)
                          DFS state: usable (for 10135 sec)
                          DFS CAC time: 0 ms
                        * 5280 MHz [56] (22.0 dBm) (no IR, radar detection)
                          DFS state: usable (for 10135 sec)
                          DFS CAC time: 0 ms
                        * 5300 MHz [60] (22.0 dBm) (no IR, radar detection)
                          DFS state: usable (for 10135 sec)
                          DFS CAC time: 0 ms
                        * 5320 MHz [64] (22.0 dBm) (no IR, radar detection)
                          DFS state: usable (for 10135 sec)
                          DFS CAC time: 0 ms
                        * 5500 MHz [100] (22.0 dBm) (no IR, radar detection)
                          DFS state: usable (for 10135 sec)
                          DFS CAC time: 0 ms
                        * 5520 MHz [104] (22.0 dBm) (no IR, radar detection)
                          DFS state: usable (for 10135 sec)
                          DFS CAC time: 0 ms
                        * 5540 MHz [108] (22.0 dBm) (no IR, radar detection)
                          DFS state: usable (for 10135 sec)
                          DFS CAC time: 0 ms
                        * 5560 MHz [112] (22.0 dBm) (no IR, radar detection)
                          DFS state: usable (for 10135 sec)
                          DFS CAC time: 0 ms
                        * 5580 MHz [116] (22.0 dBm) (no IR, radar detection)
                          DFS state: usable (for 10135 sec)
                          DFS CAC time: 0 ms
                        * 5600 MHz [120] (22.0 dBm) (no IR, radar detection)
                          DFS state: usable (for 10135 sec)
                          DFS CAC time: 0 ms
                        * 5620 MHz [124] (22.0 dBm) (no IR, radar detection)
                          DFS state: usable (for 10135 sec)
                          DFS CAC time: 0 ms
                        * 5640 MHz [128] (22.0 dBm) (no IR, radar detection)
                          DFS state: usable (for 10135 sec)
                          DFS CAC time: 0 ms
                        * 5660 MHz [132] (22.0 dBm) (no IR, radar detection)
                          DFS state: usable (for 10135 sec)
                          DFS CAC time: 0 ms
                        * 5680 MHz [136] (22.0 dBm) (no IR, radar detection)
                          DFS state: usable (for 10135 sec)
                          DFS CAC time: 0 ms
                        * 5700 MHz [140] (22.0 dBm) (no IR, radar detection)
                          DFS state: usable (for 10135 sec)
                          DFS CAC time: 0 ms
                        * 5720 MHz [144] (22.0 dBm) (no IR, radar detection)
                          DFS state: usable (for 10135 sec)
                          DFS CAC time: 0 ms
                        * 5745 MHz [149] (22.0 dBm) (no IR)
                        * 5765 MHz [153] (22.0 dBm) (no IR)
                        * 5785 MHz [157] (22.0 dBm) (no IR)
                        * 5805 MHz [161] (22.0 dBm) (no IR)
                        * 5825 MHz [165] (22.0 dBm) (no IR)
        Supported commands:
                 * new_interface
                 * set_interface
                 * new_key
                 * start_ap
                 * new_station
                 * new_mpath
                 * set_mesh_config
                 * set_bss
                 * authenticate
                 * associate
                 * deauthenticate
                 * disassociate
                 * join_ibss
                 * join_mesh
                 * remain_on_channel
                 * set_tx_bitrate_mask
                 * frame
                 * frame_wait_cancel
                 * set_wiphy_netns
                 * set_channel
                 * set_wds_peer
                 * start_sched_scan
                 * probe_client
                 * set_noack_map
                 * register_beacons
                 * start_p2p_device
                 * set_mcast_rate
                 * channel_switch
                 * set_qos_map
                 * add_tx_ts
                 * connect
                 * disconnect
        Supported TX frame types:
                 * IBSS: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * managed: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * AP: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * AP/VLAN: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * mesh point: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * P2P-client: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * P2P-GO: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * P2P-device: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
        Supported RX frame types:
                 * IBSS: 0x40 0xb0 0xc0 0xd0
                 * managed: 0x40 0xd0
                 * AP: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
                 * AP/VLAN: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
                 * mesh point: 0xb0 0xc0 0xd0
                 * P2P-client: 0x40 0xd0
                 * P2P-GO: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
                 * P2P-device: 0x40 0xd0
        WoWLAN support:
                 * wake up on disconnect
                 * wake up on magic packet
                 * wake up on pattern match, up to 20 patterns of 16-128 bytes,
                   maximum packet offset 0 bytes
                 * can do GTK rekeying
                 * wake up on GTK rekey failure
                 * wake up on EAP identity request
                 * wake up on 4-way handshake
                 * wake up on rfkill release
                 * wake up on network detection, up to 11 match sets
                 * wake up on TCP connection
        software interface modes (can always be added):
                 * AP/VLAN
                 * monitor
        valid interface combinations:
                 * #{ managed } <= 1, #{ AP, P2P-client, P2P-GO } <= 1, #{ P2P-device } <= 1,
                   total <= 3, #channels <= 2
        HT Capability overrides:
                 * MCS: ff ff ff ff ff ff ff ff ff ff
                 * maximum A-MSDU length
                 * supported channel width
                 * short GI for 40 MHz
                 * max A-MPDU length exponent
                 * min MPDU start spacing
        Device supports TX status socket option.
        Device supports HT-IBSS.
        Device supports SAE with AUTHENTICATE command
        Device supports low priority scan.
        Device supports scan flush.
        Device supports per-vif TX power setting
        P2P GO supports CT window setting
        P2P GO supports opportunistic powersave setting
        Driver supports full state transitions for AP/GO clients
        Driver supports a userspace MPM
        Driver/device bandwidth changes during BSS lifetime (AP/GO mode)
        Device supports static SMPS
        Device supports dynamic SMPS
        Device supports WMM-AC admission (TSPECs)
        Device supports configuring vdev MAC-addr on create.


I dont really know anything about network adapters but, to me, that looks like it should be able to do at least two APs (maybe a 2G and 5G)? Or is there one that will do two APs at once (easier for the boss).

Thanks for any info.

I don’t have experience with this, or a VAP environment to play around with, (although I guess I could configure a Mikrotik wireless router for experimental purposes if needed). Anyway, for the benefit of others who may be wanting to know a little about this here’s an explanation of Virtual Access Points.

While I’m not aware that NM can handle VAP connectivity directly, obviously it can manage connectivity to a physical AP. If your hardware supports it, a virtual interface can then be created manually like this

sudo iw dev wlan0 interface add virtual0 type station 

Now there should be a ‘virtual0’ interface listed

/sbin/ifconfig -a

After that it may be possible to configure a new wireless connection (restricted to the virtual device) with NM but I haven’t tested this and YMMV

This may be of relevance to you
http://askubuntu.com/questions/488588/how-do-i-connect-to-multiple-wifi-networks

In short, wicked/manual configuration may be your best bet in this scenario.

Something interesting I haven’t tried before!

If you’ve done any pen testing with something like aircrack, you’d already have seen that it’s possible to connect to multiple access points at least for authentication/authorization and some logging.

The main concept is to know that Linux identifies a physical network device (the phy0 device you read using iw) and then interfaces are created and bound to the physical device. Each of these interfaces can be configured differently.

The only thing I’d wonder about is whether there would be a routing issue if each wireless network has the same NetworkID. Also, I imagine that the the two access points should not be on the same machine, and maybe should even have physically separate connections to different Internet Gateways.

Besides the Ubuntu forum link deano provided,
I think that it would also be prudent to define a different MAC address for each interface as described in the following discussion
http://serverfault.com/questions/192144/connect-to-multiple-ap-with-one-wifi-adapter-under-linux-freebsd

And, although not discussed anywhere I wonder what might happen if the device was simply set in promiscuous mode (which is what happens when when pen testing).

The above describes using a single network adapter to connect to multiple wireless networks simultaneously, but of course you can always also simply install another wireless device, eg a USB WiFi dongle.

I’d also guess that without managed load balancing(From what I read, it seems that default use of each network connection would be opportunistic), there could be problems with multiple authenticated sessions like HTTP/HTTPS, less so with long session protocols like FTP.

TSU

Using two adapters I was able to finally get it working even with Network Manager. I had to enable IPV6 on everything. The USB WIFI was having a very tough time authenticating with one AP for some reason. That adapter only works in 2.4G also. The only thing that I dont like is that it uses different device names for each USB port. It changes to wlp0s20u1, wlp0s20u2, wlp0s20u3, etc. I was trying to assign the mac address of the adapter to work with a single AP but I am guessing it also uses the device name. If you changed it to a different USB port I couldnt get it work. Hopefully with device order and priority level it will always assign the onboard to the public AP.

   43.107054] rtl8187: Customer ID is 0x00
   43.107573] rtl8187: wireless switch is on
   43.107610] usbcore: registered new interface driver rtl8187
   43.110084] rtl8187 1-1:1.0 wlp0s20u1: renamed from wlan0
   43.135325] IPv6: ADDRCONF(NETDEV_UP): wlp0s20u1: link is not ready

Back to wicked to see if I can get it to work using just the onboard WIFI now.

I think its a “no go” on using the onboard adapter. I cant figure out how to bring up the virtual adapter. Ill check that link out tomorrow, thanks.

wicked ifup wlo1.2
wlo1.2          device-not-running
iwconfig
wlo1      IEEE 802.11  ESSID:"ES_7010"  
          Mode:Managed  Frequency:2.437 GHz  Access Point: **:**:**:2B:3C:FE   
          Bit Rate=72.2 Mb/s   Tx-Power=22 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=70/70  Signal level=-34 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:32   Missed beacon:0

lo        no wireless extensions.

wlo1.2    IEEE 802.11  ESSID:"ASUS_2"  
          Mode:Managed  Access Point: Not-Associated   Tx-Power=0 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          
eno1      no wireless extensions.
iw dev
phy#0
        Interface wlo1.2
                ifindex 6
                wdev 0x3
                addr **:**:**:2f:e2:94
                type managed
                txpower 0.00 dBm
        Interface wlo1
                ifindex 3
                wdev 0x1
                addr **:**:**:2f:e2:93
                ssid ES_7010
                type managed
                channel 6 (2437 MHz), width: 20 MHz, center1: 2437 MHz
                txpower 22.00 dBm


ifconfig wlo1.2
wlo1.2    Link encap:Ethernet  HWaddr **:**:**:2F:E2:94  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

ifconfig wlo1
wlo1      Link encap:Ethernet  HWaddr **:**:**:2F:E2:93  
          inet addr:192.168.43.111  Bcast:0.0.0.0  Mask:255.255.255.255
          inet6 addr: ****::****:64ff:fe2f:e293/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:23058 errors:0 dropped:131 overruns:0 frame:0
          TX packets:18108 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:5623168 (5.3 Mb)  TX bytes:3029399 (2.8 Mb)

ip link set wlo1.2 up
RTNETLINK answers: Device or resource busy


If I remember correctly how to read iw stdout,

Your post suggests because of the name “wlo1.2” that configuration is a non-default interface bound to your physical adapter “wl01” which means that although you have two separate physical adapters installed both network interfaces are bound to only one adapter (my guess it’s your USB adapter) and not configuring one interface for each adapter.

Given that, it should easy to understand why your onboard adapter (likely named wlo0 would be my guess) is non-functional.

Besides using iw and iwconfig, don’t forget to use ifconfig and iw addr to display all network configurations, not just wireless iw can “see.”

TSU

Yep. wlo1.2 is a virtual adapter (wlo1_2 created naming problems in the config). Its under wlo1 which is the onboard physical adapter (phy0). I made a config for wlo1.2 that was also named wlo1.2. I was missing some thing. I couldn’t get it to load the config.

Anyway, I finally gave up on it. After setting up two physical adapters with Network Manager and connecting them each to a different AP, I ran into routing problems. It was having a heck of a time trying to find devices between the two different networks. That was with two different physical adaptors.

He’s just going to have to switch between networks to connect to that one printer. Maybe I’ll try again later, but my head hurts now. Lol.

I got a new USB (nano sized) WIFI adaptor for it today. Seems the kernel doesn’t have a driver for it though. It can read the device but it doesnt make it past the usb stuff, lsusb shows an empty device. Guess that’s another thread.

I think I almost have it working now. I got another USB (nano sized) adaptor and the kernel works with this one. I switched to wicked and configured both, the onboard WIFI and the USB WIFI through YAST. I set a DNS server with Network Settings in YAST and now its connected to both APs. I have a connection to the local printer on the “private” AP and to the web through the “public” AP.

It doesnt work if you change USB ports though, it changes the device name. It goes from wlp0s20u1 to wlp0s20u2 or wlp0s20u3 or wlp0s20u4 depending on which port its plugged into. Then it loads a config setup for that device name.

I wonder if i could make some changes in ifplugd.conf to change the naming without messing things up too bad? I dont know about device naming that well. There has to be a way to assign a name to a device no matter what port its connected to. I wonder if it might be better to set the DNS in the router too?

Am Thu, 08 Dec 2016 16:26:01 GMT
schrieb k1ll1nt1m3 <k1ll1nt1m3@no-mx.forums.microfocus.com>:

> It doesnt work if you change USB ports though, it changes the device
> name. It goes from wlp0s20u1 to wlp0s20u2 or wlp0s20u3 or wlp0s20u4
> depending on which port its plugged into. Then it loads a config setup
> for that device name.
>
> I wonder if i could make some changes in ifplugd.conf to change the
> naming without messing things up too bad? I dont know about device
> naming that well. There has to be a way to assign a name to a device no
> matter what port its connected to. I wonder if it might be better to
> set the DNS in the router too?
>
>

https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/

I favor the boot parameter

net.ifnames=0

method, but there are other ways explained there, too.

AK


Never attribute to malice that which can be adequately explained by stupidity.
(R.J. Hanlon)

Thanks. I will check that thread out. I was able to change device names through Network Manager. Now I have wlan0 with one MAC address and wlan1 with the other MAC address. Im getting real close though. If you change USB ports it still messing things up but you just have to do a “systemctl restart network” and they both come up with correct settings again.