Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

How does Ubuntu know whether I am connected to the Internet or not? It seems to know because of the notifications it shows when I connect or disconnect (or is that the network manager not the OS?)

How do the background sync services know when I am connected and when to sync data?

Does the OS have an indicator (something of the sort: we're online guys, go sync or do whatever you want) or it is up to individual programs to try every time period to check connectivity?

Is there something similar to the Windows Connectivity Status Indicator where Microsoft detects Internet connectivity (not just any network connectivity)?

I am asking because sometimes I connect to the Internet via sakis3g script using USB modem, and the network manager status is offline when I do so. So I was wondering if background services know if I am connected or not (or I have to tell them myself)...

share|improve this question
add comment

2 Answers

up vote 3 down vote accepted

How does Ubuntu know whether I am connected to the Internet or not?

It's not aware of that. It only knows about local interface configuration and IP routing tables in that sense. Whether they work or not is not something for the OS to keep track of. Applications will find that out by themselves. E.g. A web browser that will time out on requests.

Why isn't this the task of the OS? The connection may be limited intentionally for security reasons for example using a proxy.

It seems to know because of the notifications it shows when I connect to disconnect

No, that's just the local connection of your interface it is reporting the status of. Once IP configuration has completed (either static or DHCP), it will say it's connected. The connection to the internet is the responsibility of your gateway in your network.

How do the background sync services know when I am connected and when to sync data?

They'll have to figure this out by themselves.

Is there something similar to the Windows Connectivity Status Indicator where Microsoft detects Internet connectivity (not just any network connectivity)?

No. Ubuntu does not do any calls to the outside world to check for real internet connectivity.

share|improve this answer
add comment

Well, you can't connect to the Internet. You can only connect to particular computers on the Internet. So a more sensible question is: Is some process keeping track of whether or not particular machines on the Internet are accessible?

The OS and various client-side configuration utilities maintain information about the local and local-area network configuration, possibly including the address of a gateway. And various client-side processes periodically try to access particular machines on the Internet.

If you want an indication of whether or not you can reach an arbitrary machine on the Internet then you can do something like ping 8.8.8.8.

share|improve this answer
    
What processes are keeping track of the configurations? And what processes are trying to access what machines on the Internet?? –  amyassin Jan 15 '13 at 13:11
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.