Sign-In to Network protocol

5

1

When I connect to a hotel network that does not require a WPA key, on my PC, the first browser access will be trapped and directed to the login page. This is understandable, and I can guess the network equipment provisions access by MAC address.

On my Android (5.0) phone, a Sign-in to Network screen opens and it shows that same web page as what I see on the PC. What is the protocol that makes this happen?

Old Geezer

Posted 2016-01-02T01:42:08.093

Reputation: 613

Why do you think it would be any different? – Ron Maupin – 2016-01-02T01:46:29.043

If it's the same, what/who triggers a web access? How would Android know that the web access was hijacked by a login page and thus launch the Sign-in to Network app? – Old Geezer – 2016-01-02T03:16:15.363

You probably have some application still running in the background using HTTP. When it tries to connect through Wi-Fi, the hotel network does exactly the same thing as it does for your PC. You need to investigate what on your phone is trying to use HTTP through the hotel Wi-Fi. – Ron Maupin – 2016-01-02T03:20:45.593

Even if it is a background app/process making a web request, how does it know that it has received a response that needs user interaction? Http redirects happen all the time. Who/what launches the Sign-in to Network app? What protocol or network standard specifies such an action or process flow? – Old Geezer – 2016-01-02T03:40:28.457

I have just noticed that on a Windows 10 PC, after connecting to such an AP, my default browser opens a new tab and goes to the login page as well. What protocol does this? – Old Geezer – 2016-01-02T13:45:35.087

2

It's called a Captive Portal

– DavidPostill – 2016-01-02T14:35:42.270

@DavidPostill Thanks. But that describes the network side. It does not describe the client side. How does the client get to know that it's a captive portal, and then to launch something to get the user's input? – Old Geezer – 2016-01-04T03:50:58.857

2

@OldGeezer How do captive portal network connections work?

– DavidPostill – 2016-01-04T09:09:43.447

Answers

7

Direct quote from How Automatic Detection of Captive Portal works (follow link for full text)

Basic strategy behind Captive Portal detection
The Automatic Detection of Captive Portal mechanism is based on a simple verification, done by the Operational System (OS) of the client device (smartphone, tablet, laptop).
It simply tries to reach a specific URL and verify that such URL returns a well-known result.

  • If a Captive Portal is not in place, the result will match the expected one and the OS will know that there is full access to internet.
  • If the URL returns a result other than the expected one, then the OS will detect that there is a Captive Portal in place and that it's needed to proceed with authentication in order to get full access to internet: in this case the OS will open the Splash Page automatically.

Further Readings
Windows 7 Network Awareness: How Windows knows it has an internet connection
Captive portals - MSDN

guest-vm

Posted 2016-01-02T01:42:08.093

Reputation: 2 984

This is exactly how Apple does it (as an example) because if you've got custom DNS settings and you try to connect to a captive portal it tries to connect to an apple.com URL and fails. – Kinnectus – 2016-07-11T09:19:25.317