Windows 7/Vista/8/10/11 皆內建 NCSI (Network Connectivity Status Indicator)。當連上網路時,系統自動向微軟伺服器發送探測請求,根據回應判斷網路狀態:
dns.msftncsi.com → 應回傳 131.107.255.255。https://www.msftncsi.com/ncsi.txt (純文字內容:Microsoft NCSI)。
ncsi.txt (內容 Microsoft NCSI) 並確保可匿名存取。dns.msftncsi.com A 記錄指向內部伺服器 IP (或任意可達 IP)。Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NlaSvc\Parameters\Internet]
"EnableActiveProbing"=dword:00000001
"ActiveDnsProbeContent"="10.10.10.10" ; 內部 DNS 探測預期 IP
"ActiveDnsProbeHost"="dns.corp.internal" ; 內部 DNS 探測主機名
"ActiveWebProbeHost"="ncsi.corp.internal" ; 內部 HTTP 探測主機
"ActiveWebProbePath"="ncsi.txt" ; 探測路徑
"ActiveWebProbeContent"="Microsoft NCSI" ; 預期回應內容
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NlaSvc\Parameters\Internet]
"EnableActiveProbing"=dword:00000000
副作用:網路圖示永遠顯示「無網際網路存取」 (黃色驚嘆號/紅叉),但實際連通性不受影響。部分依賴 NCSI 的應用 (Windows Update、OneDrive、Microsoft 365 授權驗證) 可能誤判離線而拒絕工作。
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NlaSvc\Parameters\Internet]
"EnableActiveProbing"=dword:00000001
"ActiveWebProbeHost"="" ; 空值禁用 HTTP 探測
gpedit.msc / 域 GPO → 電腦設定 → 管理範本 → 系統 → 網際網路通訊管理 → 網際網路通訊設定 →「關閉 Windows 網路連線狀態指示器主動探測」→ 啟用/停用/配置自訂端點。
ipconfig /renew 或重新啟用網卡觸發 NCSI。NCSI 是 Windows 判斷網路健康度的內建機制,理解其運作原理、隱私影響與自訂方法,能讓 IT 管理員在合規、離線、高安全環境中靈活控制網路狀態判斷邏輯,避免誤判干擾業務應用。