In che modo Windows conferma l'accesso Wi-Fi e se è necessaria l'autenticazione Hot Spot?

Sommario:

In che modo Windows conferma l'accesso Wi-Fi e se è necessaria l'autenticazione Hot Spot?
In che modo Windows conferma l'accesso Wi-Fi e se è necessaria l'autenticazione Hot Spot?

Video: In che modo Windows conferma l'accesso Wi-Fi e se è necessaria l'autenticazione Hot Spot?

Video: In che modo Windows conferma l'accesso Wi-Fi e se è necessaria l'autenticazione Hot Spot?
Video: Corso computer approfondimento versione di Windows 10 1903 | Daniele Castelletti | Maggiolina - YouTube 2024, Aprile
Anonim
Windows è abbastanza abile nel dirti se hai una connessione Internet funzionante, ma come fa esattamente? L'analisi del modo in cui Windows gestisce il problema offre informazioni dettagliate sui messaggi di connettività di Windows.
Windows è abbastanza abile nel dirti se hai una connessione Internet funzionante, ma come fa esattamente? L'analisi del modo in cui Windows gestisce il problema offre informazioni dettagliate sui messaggi di connettività di Windows.

La sessione di domande e risposte di oggi ci viene fornita per gentile concessione di SuperUser, una suddivisione di Stack Exchange, un raggruppamento di domande e risposte di community drive.

La domanda

Il lettore SuperUser N. Hinkle pone la seguente domanda sul controllo internet di Windows e sul processo di autenticazione:

In Windows 7, the notification area networking icon will show an error indicator if there is no internet access

, and the error icon goes away once there is a successful connection to the internet
, and the error icon goes away once there is a successful connection to the internet
. Sometimes, if the WiFi connection requires an in-browser authentication step, like on many guest networks in hotels or universities, then the following pop-up bubble appears, saying as much:
. Sometimes, if the WiFi connection requires an in-browser authentication step, like on many guest networks in hotels or universities, then the following pop-up bubble appears, saying as much:
Image
Image

How does Windows know whether or not it has a successful internet connection?

Presumably it is checking some online Microsoft service to see whether it has a successful connection, gets redirected to some other page, or doesn’t get any response at all, but I haven’t seen anywhere that this process or the services used are documented. Can anybody explain how this works?

Tali controlli sono una delle molte cose che diamo per scontato quando si utilizza un sistema operativo moderno, ma anche gli elementi più presi per scontati dell'esperienza utente hanno un meccanismo sottostante. In che modo Windows ci comunica se esiste una connessione Internet e se è necessario accedere o meno a un portale di autenticazione Wi-Fi?

La risposta

Il collaboratore di SuperUser Tobias Plutat offre alcune informazioni sul processo:

After some digging (the sheer number of network and Internet related services in Windows is astonishing), I think I found it. Windows Vista and 7 have a variety of Network Awareness features, one of which is the Network Connectivity Status Indicator that performs connectivity tests that in turn are used by the network systray icon. The test for internet connectivity is simple:

  1. NCSI tries to load a specific page via HTTP (more precisely: a text document) and tests whether it can be retrieved.
  2. If that is not successful, Windows reports “No Internet access”.

The mechanism also checks whether the domain the document is hosted on resolves to the expected IP address. So, it might also assume proper internet access if this test is successful but the document can’t be retrieved.

The reason it reports “No Internet Access” when you haven’t authenticated on a Hotspot yet lies in the way a Hotspot works. It blocks all ports besides 80 and 443 (for HTTP and HTTPS, respectively), which get redirected to the Hotspot’s authentication server and might mess with DNS requests in one way or another. Thus, NCSI can neither resolve the domain its test file is hosted on, and even if it could it wouldn’t reach the actual file because HTTP traffic is redirected to the Authentication server.

Un altro contributore, Jeff Atwood, mette in evidenza alcune citazioni chiave del documento Riferimenti Tobias:

Here are the details of the connection status determination process:

The following list describes how NCSI might communicate with a Web site to determine whether a network has Internet connectivity:

  1. A request for DNS name resolution of

    dns.msftncsi.com

  2. Una richiesta HTTP per

    https://www.msftncsi.com/ncsi.txt

    restituendo 200 OK e il testo

    Microsoft NCSI

  3. Questo può essere disabilitato con un'impostazione di registro. Se imposti:

    HKEY_LOCAL_MACHINE SYSTEM CurrentControlSet Services NlaSvc Parameters Internet EnableActiveProbing

    a

    0

    Windows non sonderà più la connettività Internet.

    Apple fa qualcosa di molto simile in iOS per rilevare la connettività Internet e le possibili pagine wifi di "accesso" degli hotel, ecc.

    Mentre l'intero processo è solitamente trasparente al 100% per gli utenti finali, a volte dopo l'autenticazione tramite il portale Web di un'hotspot Wi-Fi, ti ritroverai a fissare i contenuti effettivi di NSCSI.txt. Il modo in cui hai finito per guardare un documento di testo non descrittivo invece della pagina web che stavi tentando di caricare non è più un mistero se abbinato alle precedenti risposte sull'argomento.

    Hai qualcosa da aggiungere alla spiegazione? Sound off nei commenti. Vuoi leggere più risposte dagli altri utenti di Stack Exchange esperti di tecnologia? Controlla la discussione completa qui.

Consigliato: