I am using Ubuntu 12.04 and want to find out if my system or the router or the provider is causing the problem, why I loose internet connection once or twice an hour.

The computer is connected via Ethernet and the behaviour is that I loose connection and after 30 to 90 seconds the connection is re-established automatically again.

  • Where shall I start to search?
  • What tools are there to check such an issue?
  • Could please remove the "update" part (in a way that it's still clear that you were connected both via ethernet and via wi-fi) and post it as an answer? Thanks.
    – kos
    Feb 3, 2016 at 15:48
  • it was not the answer to the question, I thought. The answer was how to check the stability ... and i like davids answer very much... or did I get something wrong @kos?
    – helle
    Feb 4, 2016 at 7:42
  • Well, if the problem was the fact that you were connected to the same network though two different adapters at once, than the fact that you shouldn't connect to the same network though two different adapters at once is the (most direct) answer, isn't it? In general the answer (which in this case is explaining what was wrong) shouldn't stay in the question, the question should contain just the problem; nevertheless that information makes up for a perfect answer IMO, as it explains what not to do.
    – kos
    Feb 4, 2016 at 7:49
  • ok, i ll check that later, still at office. fell free to edit and answer yourselfe
    – helle
    Feb 4, 2016 at 7:52
  • I rolled back the question to the last revision, I wouldn't take credit for an answer which is not of my own: there's no hurry, you could just post it this evening if willing. If not let me know and I'll post a CW answer, that information really should be visible.
    – kos
    Feb 4, 2016 at 8:04

1 Answer 1

  1. Test the status of your machine's network connection.

    ifconfig [INTERFACE]

    Replace [INTERFACE] with the name of the offending network interface. For the first (or only) Ethernet interface that would typically be eth0. The output of that command should have at least an entry for inet addr (or inet6 addr with global scope, if you're on an IPv6-only network) to be able to talk to the local internet gateway/router. You can restrict the output to these entries with

    LANG=POSIX ifconfig [INTERFACE] | grep -e 'inet addr:' -e 'inet6 addr:.*Scope:Global'
  2. Find the address of the local gateway/router. It appears in the first line of the output of

    ip route

    and typically has the form 192.168.x.y or 10.x.x.y (where x is a number between 0 and 255 and y is between 1 and 254), e. g.

    Check whether the local gateway/router is reachable under its previously determined address:

    ping -W 0.5 -c 4 [ADDRESS]

    If this command reports an error message instead of timing information, the gateway is unreachable (disconnected, switched off, unresponsive).

  3. Check the internet connection by trying to contact a well-known server on the internet:

    ping -c 4 google.com

    If the hostname could not be resolved, the local router or the upstream provider may have an (intermittent) DNS issue. You may still be able to contact remote hosts by their IP address:

    ping -c 4

    or in the case of IPv6 networks:

    ping6 -c 4 2001:4860:4860::8888

    If neither of these return positive responses, the connection from the local router to your internet provider is likely non-functional. There are rarer cases of a partial outage, where the provider can still be reached, but some or all other networks (like Google's servers in the commands above) are unreachable.

    Unfortunately it is not trivial to determine, whether the issue lies with your local gateway/router/modem setup or on the end of your internet provider.

  • Thanks. Well, as I cannot predict when the connection will be lost, and the lack is kind of short (30-90 sek) I was searching for a tool, which provides me that information ... maybe I ll write a script The Problem is, that I also need to check if it is my hardware system ... maybe there is a problem with the memory, or so, or would you say, that cannot be the problem at all?
    – helle
    Jan 30, 2016 at 9:58
  • Intermittent networking issues are not the (most prominent) symptoms of CPU or main memory issues. Not even broken network adapters should exhibit such a behaviour pattern. They would either not work at all or be much more flaky than just infrequent, short temporary outages. Jan 30, 2016 at 10:02

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