Nmcli wifi duplicates

(RL 8.4, KDE 5.18) (EDIT: and later on a RL 8.5, KDE 5.23 VM)

I’m trying to figure out why the wifi network appears twice here:

[root@localhost sysctl.d]# nmcli dev wifi list --rescan yes
IN-USE  BSSID              SSID              MODE   CHAN  RATE        SIGNAL  BARS  SECURITY         
*       14:49:BC:09:F7:68  BPWLAN2           Infra  6     130 Mbit/s  100     ▂▄▆█  WPA2             
*       14:49:BC:09:F7:68  BPWLAN2           Infra  6     130 Mbit/s  87      ▂▄▆█  WPA2

(that’s the first time I’ve seen anything different on those 2 lines - signal strength)

… I suspect once for ipv4 and once for ipv6 but cannot find any doc to say yay,nay or otherwise and cannot get rid of ipv6 on wifi to test/verify.

Getting to the above…

with ipv6 off at router…

  sysctl -w net.ipv6.conf.all.disable_ipv6=1
  sysctl -w net.ipv6.conf.default.disable_ipv6=1
  systemctl restart NetworkManager
  nmcli r wifi off
  ip a

… no inet6 addresses

[root@localhost sysctl.d]# nmcli r wifi on
[root@localhost sysctl.d]# nmcli con up 'bpwl2' --ask
Passwords or encryption keys are required to access the wireless network 'BPWLAN2'.
Password (802-11-wireless-security.psk): •••••••••
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/6)
[root@localhost sysctl.d]# nmcli dev wifi list --rescan yes bssid 14:49:BC:09:F7:68
IN-USE  BSSID              SSID     MODE   CHAN  RATE        SIGNAL  BARS  SECURITY 
        14:49:BC:09:F7:68  BPWLAN2  Infra  6     130 Mbit/s  87      ▂▄▆█  WPA2     

(note IN-USE never populated and only 1 line returned when bssid specified)

[root@localhost sysctl.d]# nmcli con show
NAME      UUID                                  TYPE      DEVICE    
enp0s25   cd6fbc03-55f5-40e9-a609-5d7714057311  ethernet  enp0s25   
bpwl2     304dde7f-7f1f-4bb7-9aea-eda98b3eb2dc  wifi      wlp0s20u3 
PCIe-eth  81a3aa9e-515d-37b1-ad43-e0b6bc0719af  ethernet  --        
[root@localhost sysctl.d]# nmcli dev wifi list --rescan yes
IN-USE  BSSID              SSID              MODE   CHAN  RATE        SIGNAL  BARS  SECURITY         
*       14:49:BC:09:F7:68  BPWLAN2           Infra  6     130 Mbit/s  100     ▂▄▆█  WPA2             
*       14:49:BC:09:F7:68  BPWLAN2           Infra  6     130 Mbit/s  87      ▂▄▆█  WPA2       
[root@localhost sysctl.d]# nmcli dev wifi list --rescan yes bssid 14:49:BC:09:F7:68
IN-USE  BSSID              SSID     MODE   CHAN  RATE        SIGNAL  BARS  SECURITY 
        14:49:BC:09:F7:68  BPWLAN2  Infra  6     130 Mbit/s  100     ▂▄▆█  WPA2     
[root@localhost sysctl.d]# ip add show dev wlp0s20u3
23: wlp0s20u3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:19:86:11:87:a5 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.14/24 brd 192.168.1.255 scope global dynamic noprefixroute wlp0s20u3
       valid_lft 86301sec preferred_lft 86301sec
    inet6 fe80::1a0b:571c:f40a:bc7a/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
[root@localhost sysctl.d]# nmcli --fields ACTIVE,NAME,SSID,DBUS-PATH dev wifi list
ACTIVE  NAME    SSID              DBUS-PATH                                      
yes     AP[1]   BPWLAN2           /org/freedesktop/NetworkManager/AccessPoint/47 
yes     AP[2]   BPWLAN2           /org/freedesktop/NetworkManager/AccessPoint/60 

Device: (lsusb output)
Bus 003 Device 028: ID 0bda:818b Realtek Semiconductor Corp. RTL8192EU 802.11b/g/n WLAN Adapter

So 2 questions:

  1. Why are there 2 APs for BPWLAN2 ?
  2. Why is inet6 still populating for wlp0s20u3 ?

For question #1. Possibly one on the 2Ghz and the other on the 5Ghz. I also see two listed for each of my ssids.

I thought that too at first: The ac/5Ghz band on the router was disabled for all of the OP and in any case the dongle is b/g/n only so doubt its that…

Both with channel 6, which is a channel in 2.4 GHz band.
Channels in the 5 GHz band starts with 36, I think.

I am sceptical. Network stacks are normally strictly layered, see the OSI model [1]. The output shows layer 1 and layer 2 info (see the BSSID which is a layer 2 MAC address). nmcli dev is acting on layer 1/2 and this does not normally care about higher level protocols like IP. Put it this way: you don’t need separate cables for IPv4 and IPv6 with wired LANs either.

[1] OSI model - Wikipedia

Well, I am guessing here … and grasping at/trying to rule out anything that looks like a x2 multiplier…

I was thinking that nmcli might be outputting the line once for each of ipv4/6 - hence my (failed) attempts to disable apparent ipv6 for the wifi device.

it’d be good to be able to say for sure / rule it out (without reading the code :frowning: )

There must be something other than what I have found/can see that differentiates the two lines.

I’ve added an issue on the NetworkManager gitlab pages. Fingers crossed.

Tried it on a (kvm/qemu) VM with RL 8.5/KDE 5.23 (running on the RL 8.4 host)
with the wifi dongle passed through as a physical USB device (not USB Redirector),
Router set back to normal: ipv4,ipv6 on, both bands (2.4 - ch 6/5Ghz - ch36) up, SSIDs hidden.
The same as before except that at first the SSID was not shown on one AP.

[root@localhost bob]# nmcli dev wifi list --rescan yes
IN-USE  BSSID              SSID              MODE   CHAN  RATE        SIGNAL  BARS  SECURITY         
*       14:49:BC:09:F7:68  --                Infra  6     270 Mbit/s  100     ▂▄▆█  WPA2             
*       14:49:BC:09:F7:68  BPWLAN2           Infra  6     270 Mbit/s  90      ▂▄▆█  WPA2             
              
[root@localhost bob]# nmcli dev wifi list --rescan yes
IN-USE  BSSID              SSID              MODE   CHAN  RATE        SIGNAL  BARS  SECURITY  
*       14:49:BC:09:F7:68  BPWLAN2           Infra  6     270 Mbit/s  100     ▂▄▆█  WPA2      
*       14:49:BC:09:F7:68  BPWLAN2           Infra  6     270 Mbit/s  100     ▂▄▆█  WPA2      
     
[root@localhost bob]# nmcli dev wifi list --rescan yes
IN-USE  BSSID              SSID              MODE   CHAN  RATE        SIGNAL  BARS  SECURITY         
*       14:49:BC:09:F7:68  BPWLAN2           Infra  6     270 Mbit/s  100     ▂▄▆█  WPA2             
*       14:49:BC:09:F7:68  BPWLAN2           Infra  6     270 Mbit/s  90      ▂▄▆█  WPA2    

Turns out the duplicates are a consequence of the SSID being hidden.

Hiding/showing the SSID consistently causes the duplicate AP to appear/disappear - I missed it previously as it takes some time for the duplicate to disappear ie. you need to wait/retry nmcli dev wifi list --rescan yes to see the effect.

The reason behind this is in how wpa_supplicant handles/reports on hidden SSIDs and how NM reports on what wpa_supplicant provides. (at time of writing there is an nm issue open)