无线网络连接问题疑难解答 - Windows Client

admin 780 2025-08-17 00:10:02

试用虚拟代理 - 它可以帮助你快速识别和修复常见的无线技术问题。

注意

家庭用户:本文适用于支持代理和 IT 专业人员。 如果你正在寻找有关 Windows 10 中 Wi-Fi 问题的更多常规信息,请查看此 Windows 10 Wi-Fi 修复文章。

适用于:Windows 10

概述

本概述介绍从 Windows 客户端建立 Wi-Fi 连接的常规故障排除。

排查 Wi-Fi 连接问题需要了解 Wi-Fi 自动连接状态机的基本流。 通过了解此流,可以更轻松地确定发现不同行为的重现方案中的起点。

此工作流涉及 TextAnalysisTool 的知识和使用,这是一种广泛的文本筛选工具,可用于具有大量 ETW 提供程序的复杂跟踪,例如wireless_dbg跟踪方案。

方案

本文适用于无法建立 Wi-Fi 连接的任何方案。 故障排除程序是使用 Windows 10 客户端开发的,但可能还可用于追溯到 Windows 7 的跟踪。

注意

此疑难解答使用示例来演示一般策略,用于导航和解释适用于 Windows 的无线组件事件跟踪(ETW)。 它并不是代表每个无线问题方案。

无线 ETW 非常详细,并调用了许多无害的错误(相当标记的行为与问题方案无关)。 在“err”、“error”和“fail”上搜索或筛选很少会导致出现问题 Wi-Fi 方案的根本原因。 相反,它会用毫无意义的日志来淹没屏幕,这些日志会模糊化实际问题的上下文。

了解涉及的不同 Wi-Fi 组件、预期行为以及问题场景如何偏离这些预期行为非常重要。

此疑难解答的目的是说明如何在导致连接问题的负责任的组件上查找wireless_dbg ETW 的详细程度和主页的起点。

已知问题和修补程序

OS 版本

已修复

Windows 10 版本 1803

KB4284848

Windows 10 版本 1709

KB4284822

Windows 10 版本 1703

KB4338827

请确保安装最新的 Windows 更新、累积更新和汇总更新。 若要验证更新状态,请参阅系统的相应更新历史记录网页:

Windows 10 版本 1809

Windows 10 版本 1803

Windows 10 版本 1709

Windows 10 版本 1703

Windows 10 版本 1607 和 Windows Server 2016

Windows 10 版本 1511

Windows 8.1 和 Windows Server 2012 R2

Windows Server 2012

Windows 7 SP1 和 Windows Server 2008 R2 SP1

数据收集

使用 ETW 进行网络捕获。 在提升的命令提示符处输入以下命令:

netsh trace start wireless_dbg capture=yes overwrite=yes maxsize=4096 tracefile=c:\tmp\wireless.etl

重现此问题。

如果无法建立连接,请尝试手动连接。

如果它是间歇性的,但很容易重现,请尝试手动连接,直到它失败。 记录每个连接尝试的时间,以及它是成功还是失败。

如果问题间歇性但很少见,则需要自动触发 netsh 跟踪停止命令(或至少向管理员发出警报),以确保跟踪不会覆盖重现数据。

如果间歇性连接删除脚本上的“停止”命令(ping 或测试网络持续到失败,则 netsh 跟踪停止)。

输入以下命令停止跟踪:

netsh trace stop

将输出文件转换为文本格式:

netsh trace convert c:\tmp\wireless.etl

有关命令输出的示例,请参阅本文底部的示例 ETW 捕获。 运行这些命令后,你将有三个文件:wireless.cab、wireless.etl 和 wireless.txt。

故障排除

以下视图是 Windows 中主要 wifi 组件的高级视图之一。

Wi-fi 组件

说明

Windows 连接管理器(Wcmsvc)与 UI 控件(任务栏图标)紧密关联,以连接到各种网络,包括无线网络。 它接受并处理用户输入,并将其馈送至核心无线服务。

WLAN 自动配置服务(WlanSvc)在窗口中处理无线网络的以下核心功能: 扫描范围内的无线网络管理无线网络的连接

媒体特定模块 (MSM) 处理正在建立的连接的安全方面。

本机 WiFi 堆栈由驱动程序和无线 API 组成,用于与无线微型端口和支持的用户模式 Wlansvc 进行交互。

第三方无线微型端口驱动程序与上部无线堆栈接口,用于向 Windows 提供通知并从 Windows 接收命令。

wifi 连接状态机具有以下状态:

重置

Ihv_Configuring

配置

关联

身份验证

漫游

Wait_For_Disconnected

已断开连接

标准 wifi 连接倾向于在状态之间切换,例如:

Connecting

重置 --> Ihv_Configuring -- 配置 --> 关联 -->> 身份验证 --> 连接

Disconnecting

已连接 --> 漫游 --> Wait_For_Disconnected -- 断开连接 -->> 重置

使用 TextAnalysisTool (TAT) 筛选 ETW 跟踪是一个简单的第一步,用于确定失败的连接设置在何处中断。 本文底部包含一个有用的 wifi 筛选器文件 。

使用 FSM 转换跟踪筛选器查看连接状态机。 可以在此页面底部的 TAT 中看到此筛选器的示例。

良好的连接设置的一个示例是:

44676 [2]0F24.1020::‎2018‎-‎09‎-‎17 10:22:14.658 [Microsoft-Windows-WLAN-AutoConfig]FSM Transition from State: Disconnected to State: Reset

45473 [1]0F24.1020::‎2018‎-‎09‎-‎17 10:22:14.667 [Microsoft-Windows-WLAN-AutoConfig]FSM Transition from State: Reset to State: Ihv_Configuring

45597 [3]0F24.1020::‎2018‎-‎09‎-‎17 10:22:14.708 [Microsoft-Windows-WLAN-AutoConfig]FSM Transition from State: Ihv_Configuring to State: Configuring

46085 [2]0F24.17E0::‎2018‎-‎09‎-‎17 10:22:14.710 [Microsoft-Windows-WLAN-AutoConfig]FSM Transition from State: Configuring to State: Associating

47393 [1]0F24.1020::‎2018‎-‎09‎-‎17 10:22:14.879 [Microsoft-Windows-WLAN-AutoConfig]FSM Transition from State: Associating to State: Authenticating

49465 [2]0F24.17E0::‎2018‎-‎09‎-‎17 10:22:14.990 [Microsoft-Windows-WLAN-AutoConfig]FSM Transition from State: Authenticating to State: Connected

失败的连接设置示例是:

44676 [2]0F24.1020::‎2018‎-‎09‎-‎17 10:22:14.658 [Microsoft-Windows-WLAN-AutoConfig]FSM Transition from State: Disconnected to State: Reset

45473 [1]0F24.1020::‎2018‎-‎09‎-‎17 10:22:14.667 [Microsoft-Windows-WLAN-AutoConfig]FSM Transition from State: Reset to State: Ihv_Configuring

45597 [3]0F24.1020::‎2018‎-‎09‎-‎17 10:22:14.708 [Microsoft-Windows-WLAN-AutoConfig]FSM Transition from State: Ihv_Configuring to State: Configuring

46085 [2]0F24.17E0::‎2018‎-‎09‎-‎17 10:22:14.710 [Microsoft-Windows-WLAN-AutoConfig]FSM Transition from State: Configuring to State: Associating

47393 [1]0F24.1020::‎2018‎-‎09‎-‎17 10:22:14.879 [Microsoft-Windows-WLAN-AutoConfig]FSM Transition from State: Associating to State: Authenticating

49465 [2]0F24.17E0::‎2018‎-‎09‎-‎17 10:22:14.990 [Microsoft-Windows-WLAN-AutoConfig]FSM Transition from State: Authenticating to State: Roaming

通过标识连接失败的状态,可以在上次已知良好状态之前更具体地关注日志上的跟踪

在错误状态更改之前检查 [Microsoft-Windows-WLAN-AutoConfig] 日志应显示错误的证据。 但是,错误通常通过其他无线组件传播。

在许多情况下,感兴趣的下一个组件将是 MSM,它位于 Wlansvc 下方。

MSM 的重要组件包括:

安全管理器 (SecMgr) - 处理所有连接前和连接后的安全操作。

身份验证引擎 (AuthMgr) - 管理 802.1x 身份验证请求

其中每个组件都有自己的单独的状态机,这些状态机遵循特定的转换。

FSM transition在 TextAnalysisTool 中启用和SecMgr TransitionAuthMgr Transition筛选器以获取更多详细信息。

与前面的示例更进一步,组合的筛选器如以下命令示例所示:

[2] 0C34.2FF0::08/28/17-13:24:28.693 [Microsoft-Windows-WLAN-AutoConfig]FSM Transition from State:

Reset to State: Ihv_Configuring

[2] 0C34.2FF0::08/28/17-13:24:28.693 [Microsoft-Windows-WLAN-AutoConfig]FSM Transition from State:

Ihv_Configuring to State: Configuring

[1] 0C34.2FE8::08/28/17-13:24:28.711 [Microsoft-Windows-WLAN-AutoConfig]FSM Transition from State:

Configuring to State: Associating

[0] 0C34.275C::08/28/17-13:24:28.902 [Microsoft-Windows-WLAN-AutoConfig]Port[13] Peer 8A:15:14:B6:25:10 SecMgr Transition INACTIVE (1) --> ACTIVE (2)

[0] 0C34.275C::08/28/17-13:24:28.902 [Microsoft-Windows-WLAN-AutoConfig]Port[13] Peer 8A:15:14:B6:25:10 SecMgr Transition ACTIVE (2) --> START AUTH (3)

[4] 0EF8.0708::08/28/17-13:24:28.928 [Microsoft-Windows-WLAN-AutoConfig]Port (14) Peer 0x186472F64FD2 AuthMgr Transition ENABLED --> START_AUTH

[3] 0C34.2FE8::08/28/17-13:24:28.902 [Microsoft-Windows-WLAN-AutoConfig]FSM Transition from State:

Associating to State: Authenticating

[1] 0C34.275C::08/28/17-13:24:28.960 [Microsoft-Windows-WLAN-AutoConfig]Port[13] Peer 8A:15:14:B6:25:10 SecMgr Transition START AUTH (3) --> WAIT FOR AUTH SUCCESS (4)

[4] 0EF8.0708::08/28/17-13:24:28.962 [Microsoft-Windows-WLAN-AutoConfig]Port (14) Peer 0x186472F64FD2 AuthMgr Transition START_AUTH --> AUTHENTICATING

[2] 0C34.2FF0::08/28/17-13:24:29.751 [Microsoft-Windows-WLAN-AutoConfig]Port[13] Peer 8A:15:14:B6:25:10 SecMgr Transition WAIT FOR AUTH SUCCESS (7) --> DEACTIVATE (11)

[2] 0C34.2FF0::08/28/17-13:24:29.7512788 [Microsoft-Windows-WLAN-AutoConfig]Port[13] Peer 8A:15:14:B6:25:10 SecMgr Transition DEACTIVATE (11) --> INACTIVE (1)

[2] 0C34.2FF0::08/28/17-13:24:29.7513404 [Microsoft-Windows-WLAN-AutoConfig]FSM Transition from State:

Authenticating to State: Roaming

注意

在最后一行的下一行中,SecMgr 转换突然停用:

[2] 0C34.2FF0::08/28/17-13:24:29.7512788 [Microsoft-Windows-WLAN-AutoConfig]Port[13] Peer 8A:15:14:B6:25:10 SecMgr 转换停用 (11) --> 非活动 (1)

此转换最终传播到主连接状态机,并导致身份验证阶段向漫游状态转移。 与以前一样,专注于此 SecMgr 行为之前的跟踪以确定停用的原因是有意义的。

启用 Microsoft-Windows-WLAN-AutoConfig 筛选器将显示导致停用转换的更多详细信息:

[3] 0C34.2FE8::08/28/17-13:24:28.902 [Microsoft-Windows-WLAN-AutoConfig]FSM Transition from State:

Associating to State: Authenticating

[1] 0C34.275C::08/28/17-13:24:28.960 [Microsoft-Windows-WLAN-AutoConfig]Port[13] Peer 8A:15:14:B6:25:10 SecMgr Transition START AUTH (3) --> WAIT FOR AUTH SUCCESS (4)

[4] 0EF8.0708::08/28/17-13:24:28.962 [Microsoft-Windows-WLAN-AutoConfig]Port (14) Peer 0x186472F64FD2 AuthMgr Transition START_AUTH --> AUTHENTICATING

[0]0EF8.2EF4::‎08/28/17-13:24:29.549 [Microsoft-Windows-WLAN-AutoConfig]Received Security Packet: PHY_STATE_CHANGE

[0]0EF8.2EF4::08/28/17-13:24:29.549 [Microsoft-Windows-WLAN-AutoConfig]Change radio state for interface = Intel(R) Centrino(R) Ultimate-N 6300 AGN : PHY = 3, software state = on , hardware state = off )

[0] 0EF8.1174::‎08/28/17-13:24:29.705 [Microsoft-Windows-WLAN-AutoConfig]Received Security Packet: PORT_DOWN

[0] 0EF8.1174::‎08/28/17-13:24:29.705 [Microsoft-Windows-WLAN-AutoConfig]FSM Current state Authenticating , event Upcall_Port_Down

[0] 0EF8.1174:: 08/28/17-13:24:29.705 [Microsoft-Windows-WLAN-AutoConfig]Received IHV PORT DOWN, peer 0x186472F64FD2

[2] 0C34.2FF0::08/28/17-13:24:29.751 [Microsoft-Windows-WLAN-AutoConfig]Port[13] Peer 8A:15:14:B6:25:10 SecMgr Transition WAIT FOR AUTH SUCCESS (7) --> DEACTIVATE (11)

[2] 0C34.2FF0::08/28/17-13:24:29.7512788 [Microsoft-Windows-WLAN-AutoConfig]Port[13] Peer 8A:15:14:B6:25:10 SecMgr Transition DEACTIVATE (11) --> INACTIVE (1)

[2] 0C34.2FF0::08/28/17-13:24:29.7513404 [Microsoft-Windows-WLAN-AutoConfig]FSM Transition from State:

Authenticating to State: Roaming

向后显示端口关闭通知:

[0] 0EF8.1174:: 08/28/17-13:24:29.705 [Microsoft-Windows-WLAN-AutoConfig]收到 IHV 端口关闭,对等0x186472F64FD2

端口事件表示更接近无线硬件的更改。 随后可以继续查看此指示的起源。

下面,MSM 是本机 wifi 堆栈。 这些驱动程序是与 wifi 微型端口驱动程序通信的 Windows 本机 wifi 驱动程序。 它负责将 Wi-Fi(802.11)数据包转换为 802.3(以太网),以便 TCPIP 和其他协议可以使用它。

为 [Microsoft-Windows-NWifi]:

[3] 0C34.2FE8::08/28/17-13:24:28.902 [Microsoft-Windows-WLAN-AutoConfig]FSM Transition from State:

Associating to State: Authenticating

[1] 0C34.275C::08/28/17-13:24:28.960 [Microsoft-Windows-WLAN-AutoConfig]Port[13] Peer 8A:15:14:B6:25:10 SecMgr Transition START AUTH (3) --> WAIT FOR AUTH SUCCESS (4)

[4] 0EF8.0708::08/28/17-13:24:28.962 [Microsoft-Windows-WLAN-AutoConfig]Port (14) Peer 0x8A1514B62510 AuthMgr Transition START_AUTH --> AUTHENTICATING

[0]0000.0000::‎08/28/17-13:24:29.127 [Microsoft-Windows-NWiFi]DisAssoc: 0x8A1514B62510 Reason: 0x4

[0]0EF8.2EF4::‎08/28/17-13:24:29.549 [Microsoft-Windows-WLAN-AutoConfig]Received Security Packet: PHY_STATE_CHANGE

[0]0EF8.2EF4::08/28/17-13:24:29.549 [Microsoft-Windows-WLAN-AutoConfig]Change radio state for interface = Intel(R) Centrino(R) Ultimate-N 6300 AGN : PHY = 3, software state = on , hardware state = off )

[0] 0EF8.1174::‎08/28/17-13:24:29.705 [Microsoft-Windows-WLAN-AutoConfig]Received Security Packet: PORT_DOWN

[0] 0EF8.1174::‎08/28/17-13:24:29.705 [Microsoft-Windows-WLAN-AutoConfig]FSM Current state Authenticating , event Upcall_Port_Down

[0] 0EF8.1174:: 08/28/17-13:24:29.705 [Microsoft-Windows-WLAN-AutoConfig]Received IHV PORT DOWN, peer 0x186472F64FD2

[2] 0C34.2FF0::08/28/17-13:24:29.751 [Microsoft-Windows-WLAN-AutoConfig]Port[13] Peer 8A:15:14:B6:25:10 SecMgr Transition WAIT FOR AUTH SUCCESS (7) --> DEACTIVATE (11)

[2] 0C34.2FF0::08/28/17-13:24:29.7512788 [Microsoft-Windows-WLAN-AutoConfig]Port[13] Peer 8A:15:14:B6:25:10 SecMgr Transition DEACTIVATE (11) --> INACTIVE (1)

[2] 0C34.2FF0::08/28/17-13:24:29.7513404 [Microsoft-Windows-WLAN-AutoConfig]FSM Transition from State:

Authenticating to State: Roaming

在上面的跟踪中,我们看到以下行:

[0]0000.0000::‎08/28/17-13:24:29.127 [Microsoft-Windows-NWiFi]DisAssoc: 0x8A1514B62510 Reason: 0x4

此行后跟PHY_STATE_CHANGE和PORT_DOWN事件,因为从接入点(AP)取消关联,以指示拒绝连接。 这可能是由于凭据、连接参数无效、信号/漫游丢失以及中止连接的各种其他原因导致的。 此处的操作是检查从所指示的 AP MAC(8A:15:14:B6:25:10)取消关联的原因。 此操作将通过检查来自 AP 的内部日志记录/跟踪来完成。

详细信息

802.11 无线工具和设置

了解无线网络的 802.1X 身份验证

ETW 捕获示例

C:\tmp>netsh trace start wireless_dbg capture=yes overwrite=yes maxsize=4096 tracefile=c:\tmp\wireless.etl

Trace configuration:

-------------------------------------------------------------------

Status: Running

Trace File: C:\tmp\wireless.etl

Append: Off

Circular: On

Max Size: 4096 MB

Report: Off

C:\tmp>netsh trace stop

Correlating traces ... done

Merging traces ... done

Generating data collection ... done

The trace file and additional troubleshooting information have been compiled as "c:\tmp\wireless.cab".

File location = c:\tmp\wireless.etl

Tracing session was successfully stopped.

C:\tmp>netsh trace convert c:\tmp\wireless.etl

Input file: c:\tmp\wireless.etl

Dump file: c:\tmp\wireless.txt

Dump format: TXT

Report file: -

Generating dump ... done

C:\tmp>dir

Volume in drive C has no label.

Volume Serial Number is 58A8-7DE5

Directory of C:\tmp

01/09/2019 02:59 PM [DIR] .

01/09/2019 02:59 PM [DIR] ..

01/09/2019 02:59 PM 4,855,952 wireless.cab

01/09/2019 02:56 PM 2,752,512 wireless.etl

01/09/2019 02:59 PM 2,786,540 wireless.txt

3 File(s) 10,395,004 bytes

2 Dir(s) 46,648,332,288 bytes free

Wifi 筛选器文件

复制并粘贴下面的所有行,并将其保存到名为 wifi.tat 的文本文件中。 通过选择“文件>加载筛选器”将筛选器文件加载到 TextAnalysisTool 中。

TextAnalysisTool 示例

在以下示例中 ,视图 设置配置为 “仅显示筛选的行”。

上一篇
下一篇
相关文章