![频繁的频道切换 - 是否有仅限客户端的诊断?](https://linux22.com/image/151270/%E9%A2%91%E7%B9%81%E7%9A%84%E9%A2%91%E9%81%93%E5%88%87%E6%8D%A2%20-%20%E6%98%AF%E5%90%A6%E6%9C%89%E4%BB%85%E9%99%90%E5%AE%A2%E6%88%B7%E7%AB%AF%E7%9A%84%E8%AF%8A%E6%96%AD%EF%BC%9F.png)
我现在的Wi-Fi体验可以使用,但并不理想。 Wi-Fi 经常掉线或重新连接。尽管信号强度为 3 格中的 2 到 3 格(gnome-shell 中的 Wi-Fi 图标)。
我确信本地网络存在问题,而不是互联网访问问题。我输入ping
本地路由器的 IP 地址,并且不断看到ping
停止并最终显示“主机无法访问”。
问题
iw dev wlp2s0 link
我对在查看和时注意到的一些事情感到好奇iw event -t
。我对频道更换的频率感到惊讶。 (我不知道这是否会造成问题)。
某些通道切换可能是由于 DFS 造成的。我问了一个单独的问题,关于我是否可以专门监控DFS:监控“动态频率选择”(DFS)?
然而,我捕获的日志(如下)显示大约六分钟内在六个不同的 2.4Ghz 通道之间切换。这些通道不应受到 DFS 的约束。
我想我现在已经基本回答了我自己的问题。我想这一定是由于 Wi-Fi 接入点造成的。即它已配置为自动选择频道。它只是变化......比我预期的更频繁。
据我所知,AP 没有理由在此处进行信道切换。我只能认为美联社有点疯狂。这不是很有趣,因为我对美联社或这种特殊的疯狂了解不够。
那么,我在这里错过了什么明显的事情吗?即,我是否可以从其他角度来调查或解决频繁的频道切换问题,而这个问题中尚未显示这一点? (或者是否有一个众所周知的问题,或者一些可能相关的进一步信息?)
语境
我不控制这里的 Wi-Fi 接入点(也不控制所有其他 Wi-Fi 客户端)。我无法查看 Wi-Fi 接入点。接入点和我的电脑位于固定位置。
我可以看到sudo nmap -sn
,一次只有几个 Wi-Fi 客户端连接。当我捕捉到下面的日志时,那是一个安静的时期;仅连接了一两个其他设备。
iw dev wlp2s0 scan
查找同一 Wi-Fi 网络 (SSID) 的两个不同的可能连接,以及当前的另一个 SSID。
从结果来看nmap
,我认为有最多两个 Wi-Fi 接入点。但很可能有一个双频 Wi-Fi 接入点和一个纯有线调制解调器/路由器。 (nmap
显示 IP 地址 .2 和 .1,其 MAC 地址属于优科无线和特艺彩色。找到的下一个最低 IP 地址nmap
是 0.13)。
Wi-Fi 网络需要通过 Sky 的“The Cloud”品牌进行身份验证,该品牌使用强制门户。也许这个系统带来了它自己的问题:-)。
BSS e0:10:7f:1f:d0:58(on wlp2s0) -- associated
freq: 2452
capability: ESS ShortPreamble ShortSlotTime (0x0421)
signal: -46.00 dBm
last seen: 1163 ms ago
Information elements from Probe Response frame:
SSID: _The Cloud
DS Parameter set: channel 9
...
BSS e0:10:7f:5f:d0:58(on wlp2s0)
last seen: 2285.242s [boottime]
TSF: 3507100069 usec (0d, 00:58:27)
freq: 2452
beacon interval: 100 TUs
capability: ESS Privacy ShortPreamble ShortSlotTime (0x0431)
signal: -45.00 dBm
last seen: 1160 ms ago
Information elements from Probe Response frame:
SSID:
Supported rates: 1.0* 2.0* 5.5* 11.0*
DS Parameter set: channel 9
...
BSS e0:10:7f:1f:d0:5c(on wlp2s0)
freq: 5680
beacon interval: 100 TUs
capability: ESS ShortSlotTime (0x0401)
signal: -57.00 dBm
last seen: 155 ms ago
Information elements from Probe Response frame:
SSID: _The Cloud
DS Parameter set: channel 136
...
BSS e0:10:7f:5f:d0:5c(on wlp2s0)
last seen: 2263.535s [boottime]
TSF: 2970025 usec (0d, 00:00:02)
freq: 5680
beacon interval: 100 TUs
capability: ESS Privacy SpectrumMgmt ShortSlotTime (0x0511)
signal: -48.00 dBm
last seen: 22867 ms ago
Information elements from Probe Response frame:
SSID:
Supported rates: 6.0* 9.0 12.0* 18.0 24.0* 36.0 48.0 54.0
DS Parameter set: channel 136
...
BSS b0:c5:54:bd:ea:4f(on wlp2s0)
last seen: 2276.958s [boottime]
TSF: 167990579532 usec (1d, 22:39:50)
freq: 2412
beacon interval: 100 TUs
capability: ESS Privacy ShortSlotTime (0x0411)
signal: -97.00 dBm
last seen: 9444 ms ago
Information elements from Probe Response frame:
SSID: TALKTALK-BDEA4F
Supported rates: 1.0* 2.0* 5.5* 11.0* 9.0 18.0 36.0 54.0
DS Parameter set: channel 1
...
通道切换日志
$ while true; do date; iw dev wlp2s0 link; read; done
[this output has been edited to only include the channel information]
Thu 4 Apr 14:46:16 BST 2019
Connected to e0:10:7f:1f:d0:58 (on wlp2s0)
SSID: _The Cloud
freq: 2452
Thu 4 Apr 14:47:16 BST 2019
Not connected.
Thu 4 Apr 14:48:16 BST 2019
Connected to e0:10:7f:1f:d0:58 (on wlp2s0)
SSID: _The Cloud
freq: 2432
Thu 4 Apr 14:49:16 BST 2019
Connected to e0:10:7f:1f:d0:58 (on wlp2s0)
SSID: _The Cloud
freq: 2447
Thu 4 Apr 14:50:16 BST 2019
Connected to e0:10:7f:1f:d0:58 (on wlp2s0)
SSID: _The Cloud
freq: 2462
Thu 4 Apr 14:51:16 BST 2019
Connected to e0:10:7f:1f:d0:58 (on wlp2s0)
SSID: _The Cloud
freq: 2422
Thu 4 Apr 14:51:34 BST 2019
Connected to e0:10:7f:1f:d0:58 (on wlp2s0)
SSID: _The Cloud
freq: 2417
Thu 4 Apr 14:52:34 BST 2019
Connected to e0:10:7f:1f:d0:58 (on wlp2s0)
SSID: _The Cloud
freq: 2432
iw event -t | grep -v scan
也很忙:
1554385601.404654: wlp2s0 (phy #0): CQM event: beacon loss
1554385601.507239: wlp2s0 (phy #0): CQM event: beacon loss
1554385601.609473: wlp2s0 (phy #0): CQM event: beacon loss
1554385601.711916: wlp2s0 (phy #0): CQM event: beacon loss
1554385601.814282: wlp2s0 (phy #0): CQM event: beacon loss
1554385601.940671: wlp2s0: del station e0:10:7f:1f:d0:58
1554385601.946807: wlp2s0 (phy #0): deauth 10:02:b5:4d:e4:0f -> e0:10:7f:1f:d0:58 reason 4: Disassociated due to inactivity
1554385601.947040: wlp2s0 (phy #0): disconnected (local request) reason: 4: Disassociated due to inactivity
1554385602.069937: wlp2s0: new station e0:10:7f:1f:d0:5c
1554385602.213051: wlp2s0: del station e0:10:7f:1f:d0:5c
1554385602.217220: wlp2s0 (phy #0): auth: timed out
1554385603.733933: wlp2s0: new station e0:10:7f:1f:d0:58
1554385603.953117: wlp2s0: del station e0:10:7f:1f:d0:58
1554385603.957185: wlp2s0 (phy #0): auth: timed out
1554385638.448036: wlp2s0: new station e0:10:7f:1f:d0:58
1554385638.559597: wlp2s0 (phy #0): auth e0:10:7f:1f:d0:58 -> 10:02:b5:4d:e4:0f status: 0: Successful
1554385638.566516: wlp2s0 (phy #0): assoc e0:10:7f:1f:d0:58 -> 10:02:b5:4d:e4:0f status: 0: Successful
1554385638.566669: wlp2s0 (phy #0): connected to e0:10:7f:1f:d0:58
1554385638.568375: wlp2s0 (phy #0): CQM event: RSSI went above threshold
1554385661.697961: wlp2s0: unknown event 110 (ch_switch_started_notify)
1554385664.081713: wlp2s0: del station e0:10:7f:1f:d0:58
1554385664.086119: wlp2s0 (phy #0): deauth 10:02:b5:4d:e4:0f -> e0:10:7f:1f:d0:58 reason 4: Disassociated due to inactivity
1554385664.086235: wlp2s0 (phy #0): disconnected (local request) reason: 4: Disassociated due to inactivity
1554385667.703118: wlp2s0: new station e0:10:7f:1f:d0:58
1554385667.707214: wlp2s0 (phy #0): auth e0:10:7f:1f:d0:58 -> 10:02:b5:4d:e4:0f status: 0: Successful
1554385667.724730: wlp2s0 (phy #0): assoc e0:10:7f:1f:d0:58 -> 10:02:b5:4d:e4:0f status: 0: Successful
1554385667.724853: wlp2s0 (phy #0): connected to e0:10:7f:1f:d0:58
1554385667.728126: wlp2s0 (phy #0): CQM event: RSSI went above threshold
1554385677.672865: wlp2s0: unknown event 110 (ch_switch_started_notify)
1554385679.618562: wlp2s0: unknown event 88 (ch_switch_notify)
1554385693.740384: wlp2s0: unknown event 110 (ch_switch_started_notify)
1554385695.890181: wlp2s0: unknown event 88 (ch_switch_notify)
1554385710.831624: wlp2s0: unknown event 110 (ch_switch_started_notify)
1554385711.855320: wlp2s0: unknown event 88 (ch_switch_notify)
... continuing similarly ...
1554386103.006501: wlp2s0: unknown event 110 (ch_switch_started_notify)
1554386105.155613: wlp2s0: unknown event 88 (ch_switch_notify)
1554386284.050009: wlp2s0: unknown event 110 (ch_switch_started_notify)
1554386286.199094: wlp2s0: unknown event 88 (ch_switch_notify)
1554386300.117247: wlp2s0: unknown event 110 (ch_switch_started_notify)
1554386302.266779: wlp2s0: unknown event 88 (ch_switch_notify)
使用的软件和硬件
- Linux 5.0.4-200.fc29.x86_64
- 网络管理器1.12.6-5.fc29.x86_64
- wpa_请求者2.7-1.fc29.x86_64
- 英特尔公司无线 7265(修订版 59)
- 无线网络
iwlwifi 0000:02:00.0: enabling device (0000 -> 0002)
iwlwifi 0000:02:00.0: loaded firmware version 29.1044073957.0 op_mode iwlmvm
iwlwifi 0000:02:00.0: Detected Intel(R) Dual Band Wireless AC 7265, REV=0x210
ieee80211 phy0: Selected rate control algorithm 'iwl-mvm-rs'
答案1
鉴于 BSSID 仅相差一位(0x5c 与 0x58),几乎可以肯定它是一个双频 AP。
似乎没有任何干扰源。因此,我认为您所看到的只是 AP 中的自动信道选择算法完全疯狂了。我猜该算法不是很聪明,当所有通道看起来或多或少都同样好(噪声方面)时,它总是选择当前的“最佳”通道,即使通道之间的差异很小且随机。
不管怎样,坏消息是从客户的角度来看你无能为力。如果 AP 想要一直切换信道,则所有客户端都必须配合。
如果您喜欢冒险,您可以使用您的计算机创建自己的 WLAN 作为 AP,只是为了占用一些信道,并希望将真正的 AP 引导到单个信道。这取决于您的 WLAN 卡是否可以同时执行 AP 和客户端模式,但也许您可以将手机用作“噪音发生器”。请注意,无论您身在何处,都可能不允许运行自己的 Wi-Fi 网络。