How Windows knows it has an Internet connection

Found this interesting article about Windows 7 Network awareness on blog.superuser.com

Whenever I connect to a WiFi network which requires in-browser authentication, such as university networks and hotel access points, Windows somehow magically knows. Windows also knows when your internet connection isn’t working, and can differentiate between having local LAN access, no network access at all, or full internet access. But how?

If you have ever been wondering how this feature works, how you can turn it off and how it affects your privacy I highly recommend this.