Comment Windows confirme-t-il l'accès Wi-Fi et indique-t-il qu'une authentification par point chaud est nécessaire?

Table des matières:

Comment Windows confirme-t-il l'accès Wi-Fi et indique-t-il qu'une authentification par point chaud est nécessaire?
Comment Windows confirme-t-il l'accès Wi-Fi et indique-t-il qu'une authentification par point chaud est nécessaire?

Vidéo: Comment Windows confirme-t-il l'accès Wi-Fi et indique-t-il qu'une authentification par point chaud est nécessaire?

Vidéo: Comment Windows confirme-t-il l'accès Wi-Fi et indique-t-il qu'une authentification par point chaud est nécessaire?
Vidéo: Débutants : 10 paramètres à vérifier dans Windows 10 - Carnet Du Geek Nerdy - YouTube 2024, Avril
Anonim
Windows est assez habile pour vous dire si votre connexion Internet fonctionne correctement, mais comment fait-elle exactement cela? Explorer la façon dont Windows traite le problème offre un aperçu des messages de connectivité Windows.
Windows est assez habile pour vous dire si votre connexion Internet fonctionne correctement, mais comment fait-elle exactement cela? Explorer la façon dont Windows traite le problème offre un aperçu des messages de connectivité Windows.

La séance de questions et réponses d’aujourd’hui nous est offerte par SuperUser, une sous-division de Stack Exchange, un groupe de sites Web de questions-réponses animé par la communauté.

La question

Le lecteur de superutilisateur N. Hinkle pose la question suivante sur le processus de vérification Internet et d’authentification Windows:

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?

Ces vérifications sont l'une des nombreuses choses que nous prenons pour acquis lorsque nous utilisons un système d'exploitation moderne, mais même les éléments les plus pris pour acquis de l'expérience utilisateur ont un mécanisme sous-jacent. Comment Windows nous indique-t-il s'il existe une connexion Internet et si nous devons ou non nous connecter à un portail d'authentification Wi-Fi?

La réponse

Tobias Plutat, contributeur à SuperUser, donne un aperçu du processus:

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 autre contributeur, Jeff Atwood, souligne quelques citations clés du document cité par 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. Une requête HTTP pour

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

    retourne 200 OK et le texte

    Microsoft NCSI

  3. Cela peut être désactivé avec un paramètre de registre. Si vous définissez:

    HKEY_LOCAL_MACHINE SYSTEM CurrentControlSet Services NlaSvc Paramètres Internet EnableActiveProbing

    à

    0

    Windows ne recherchera plus la connectivité Internet.

    Dans iOS, Apple fait quelque chose de très similaire pour détecter la connectivité Internet et les pages Wi-Fi de connexion aux hôtels, etc.

    Bien que l'ensemble de ce processus soit généralement transparent à 100% pour les utilisateurs finaux, il arrive parfois qu'après s'être authentifié via le portail Web d'un point d'accès Wi-Fi, vous regardiez le contenu réel de NSCSI.txt. Comment vous avez fini par regarder un document texte non descriptif au lieu de la page Web que vous tentiez de charger n'est plus un mystère lorsqu'il est associé aux réponses précédentes sur le sujet.

    Avez-vous quelque chose à ajouter à l'explication? Sound off dans les commentaires. Voulez-vous lire plus de réponses d'autres utilisateurs de Stack Exchange doués en technologie? Découvrez le fil de discussion complet ici.

Conseillé: