Как Windows потвърждава достъп до Wi-Fi и дали е необходимо удостоверяване чрез Hot Spot?

Съдържание:

Как Windows потвърждава достъп до Wi-Fi и дали е необходимо удостоверяване чрез Hot Spot?
Как Windows потвърждава достъп до Wi-Fi и дали е необходимо удостоверяване чрез Hot Spot?

Видео: Как Windows потвърждава достъп до Wi-Fi и дали е необходимо удостоверяване чрез Hot Spot?

Видео: Как Windows потвърждава достъп до Wi-Fi и дали е необходимо удостоверяване чрез Hot Spot?
Видео: How To Farm Chia w/ Madmax Gigahorse and Chia GPU Plotter in Windows - Chia Farming Guides 2023 - YouTube 2024, Април
Anonim
Windows е напълно амбициозен да ви каже дали имате правилно функционираща интернет връзка, но как точно го прави? Разбирането на начина, по който Windows се справя с проблема, дава представа за съобщенията за свързване на Windows.
Windows е напълно амбициозен да ви каже дали имате правилно функционираща интернет връзка, но как точно го прави? Разбирането на начина, по който Windows се справя с проблема, дава представа за съобщенията за свързване на Windows.

Днешната сесия за въпроси и отговори се отнася до нас с любезното съдействие на SuperUser - подразделение на Stack Exchange, обединяване на уеб сайтове с въпроси и отговори.

Въпроса

Reader на SuperUser Н. Хинкъл поставя следния въпрос относно процеса на проверка на интернет и удостоверяване на 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?

Такива проверки са едно от многото неща, които приемаме като даденост при използване на съвременна операционна система, но дори и най-често използваните елементи от опита на потребителите имат основен механизъм. Как се казва Windows дали има връзка с интернет и дали трябва да влезем в портал за удостоверяване на Wi-Fi?

Отговорът

Сътрудникът на SuperUser Tobias Plutat предлага известно вникване в процеса:

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.

Друг сътрудник, Джеф Атууд, подчертава някои ключови цитати от документа, цитиран от 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. HTTP заявка за

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

    връщайки 200 OK и текста

    Microsoft NCSI

  3. Това може да бъде деактивирано с настройка на системния регистър. Ако зададете:

    HKEY_LOCAL_MACHINE СИСТЕМА CurrentControlSet Услуги NlaSvc Параметри Интернет EnableActiveProbing

    да се

    0

    Windows вече няма да сондира за интернет връзка.

    Apple прави нещо много подобно в iOS за откриване на интернет свързаност и възможни хотелски "вход" WiFi страници и т.н.

    Макар че целият процес обикновено е 100% прозрачен за крайните потребители, понякога след като се удостовери чрез уеб портала на hot-spot на Wi-Fi, ще откриете, че се взирате в действителното съдържание на NSCSI.txt. Как завършихте да разглеждате недвусмислен текстов документ вместо уеб страницата, която се опитвате да заредите, вече не е мистерия, когато е свързана с предишните отговори по темата.

    Имате ли нещо, което да добавите към обяснението? Звучи в коментарите. Искате ли да прочетете повече отговори от други потребители на Stack Exchange? Вижте цялата тема на дискусията тук.

Препоръчано: