views:

25

answers:

2

Hello Everyone,

You know that "Internet Connectivity" icon on the Windows Taskbar? The one that often tells us we have no connection to the internet after pull out our ethernet cables?

I was wondering if there is a command line command that would tell me the status of that icon. (No internet / Connectivity but with the yellow caution sign / Internet Access)

Unfortunately, pinging external servers or checking the networking page will not fix the problem I am facing. My computer has obtained 4 different IPs, 3 of which do not work. So when contacting the outside world, my computer has no problem. However, when trying to get another computer (cpu2) to contact my computer, there are some failures until cpu2 tries the working IP. Somehow, the Internet connectivity flag is able to detect the anomaly and it shows up on my task bar.

The reason I am looking for this is because I am writing a script (in Java) that grabs various machine information (RAM, logical processors, Browser settings, Network Duplex status, etc etc). I know there are much more awesome alternatives, but just bear with me for now :)

Thanks! Jonathan

A: 

ipconfig might be what you need.

A disconnected connection will have "Media state: Media disconnected" or similar.

ipconfig /all gives more details.

developmentalinsanity
Hey dev-sanity,Thanks for the input, but it looks like that internet connectivity flag works a little differently than ipconfig. My cpu actually gets an IP and is able to contact the outside world, the connections will report connectivity.
Jdcc
A: 

The easiest test for internet connectivity is to use ping for a known host. If you get a response to ping www.microsoft.com then TCP/IP and DNS are working, otherwise check the cable.

Michael Shopsin
Hey Michael, Thanks for your reply. pinging another server is a clever way to check connectivity. However my machine has 4 IPs (3 of which are broken) and outgoing traffic is fine, while incoming traffic experiences difficulties.The connectivity flag can somehow tell there will be trouble, but pinging servers will not show the problem :(
Jdcc