Hvordan bekrefter Windows Wi-Fi-tilgang og om Hot Spot-godkjenning er nødvendig?

Innholdsfortegnelse:

Hvordan bekrefter Windows Wi-Fi-tilgang og om Hot Spot-godkjenning er nødvendig?
Hvordan bekrefter Windows Wi-Fi-tilgang og om Hot Spot-godkjenning er nødvendig?

Video: Hvordan bekrefter Windows Wi-Fi-tilgang og om Hot Spot-godkjenning er nødvendig?

Video: Hvordan bekrefter Windows Wi-Fi-tilgang og om Hot Spot-godkjenning er nødvendig?
Video: Technology Stacks - Computer Science for Business Leaders 2016 - YouTube 2024, Mars
Anonim
Windows er ganske flink til å fortelle deg om du har en riktig fungerende Internett-tilkobling, men hvordan gjør du det? Graving i hvordan Windows håndterer problemet gir innsikt i Windows-tilkoblingsmeldinger.
Windows er ganske flink til å fortelle deg om du har en riktig fungerende Internett-tilkobling, men hvordan gjør du det? Graving i hvordan Windows håndterer problemet gir innsikt i Windows-tilkoblingsmeldinger.

Dagens Spørsmål & Svar-sesjon kommer til oss med høflighet av SuperUser-en underavdeling av Stack Exchange, en community-drive-gruppering av Q & A-nettsteder.

Spørsmålet

SuperUser leser N. Hinkle stiller følgende spørsmål om Windows Internett-sjekken og autentiseringsprosessen:

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?

Slike kontroller er en av de mange tingene vi tar for gitt når du bruker et moderne operativsystem, men selv de mest tatt for gitt elementer av brukeropplevelsen har en underliggende mekanisme. Hvordan forteller Windows oss om det er en Internett-tilkobling, og om vi må logge inn på en Wi-Fi-autentiseringsportal eller ikke?

Svaret

SuperUser-bidragsyter Tobias Plutat gir litt innsikt i prosessen:

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.

En annen bidragsyter, Jeff Atwood, fremhever noen viktige sitater fra dokumentet Tobias referanser:

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. En HTTP-forespørsel for

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

    returnerer 200 OK og teksten

    Microsoft NCSI

  3. Dette kan deaktiveres med en registerinnstilling. Hvis du angir:

    HKEY_LOCAL_MACHINE SYSTEM CurrentControlSet Services NlaSvc Parameters Internet EnableActiveProbing

    til

    0

    Vil Windows ikke lenger sonde for Internett-tilkobling.

    Apple gjør noe veldig likt i iOS for å oppdage internettforbindelse og mulige hotell "innloggings" wifi-sider, etc.

    Mens hele denne prosessen vanligvis er 100% gjennomsiktig for sluttbrukere, av og til etter godkjenning gjennom en Wi-Fi hotspots webportal, vil du finne deg selv i å stirre på det faktiske innholdet i NSCSI.txt. Hvordan du endte med å se på et ikke-skriftlig tekstdokument i stedet for nettsiden du prøvde å laste, er ikke lenger et mysterium når det kombineres med de tidligere svarene på emnet.

    Har du noe å legge til forklaringen? Lyde av i kommentarene. Vil du lese flere svar fra andre tech-savvy Stack Exchange-brukere? Sjekk ut hele diskusjonstråden her.

Anbefalt: