Autotesting a network interface

Posted by Machado on Stack Overflow See other posts from Stack Overflow or by Machado
Published on 2010-03-08T13:12:10Z Indexed on 2010/03/08 13:36 UTC
Read the original article Hit count: 359

Hi All,

I'm developing a software component responsible for testing if a network interface has conectivity with the internet. Think of it as the same test the XBOX360 does to inform the user if it's connected with the Live network (just as an example).

So far I figured the autotest would run as this:
1) Test the physical network interface (if the cable is conected, has up/downlink, etc...)
2) Test the logical network (has IP address, has DNS, etc...)
3) Connects to the internet (can access google, for example)
4) ???
5) Profit! (just kidding...)

My question relates to step 3: How can I detect, correctly, if my software has connection with the internet ? Is there any fixed IP address to ping ?

The problem is that I don't want to rely solely on google.com (or any other well-known address), as those can change in time, and my component will be embbeded on a mobile device, not easy to update.

Any suggestions ?

© Stack Overflow or respective owner

Related posts about language-agnostic

Related posts about networking