Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an Ubuntu homeserver that I use as server/NAS/NAT/router. My problem is that lately I've experienced that the (Internet) connection can sometime stall for a couple of seconds. If I try to SSH into the router during that time, it will not connect until the connection comes back online.

When the connection is stalling I can't load websites or stream music.

Now I understand that nobody probably can tell me what's wrong, so I'm asking: How can I debug this?

Thanks for your time.

share|improve this question

closed as off topic by Shane Madden, Jason Berg, Tom O'Connor, Iain Dec 17 '12 at 13:27

Questions on Server Fault are expected to relate to server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

Wired or wireless? – David Schwartz Aug 28 '11 at 15:08
I'm connected to the server through wired Gigabit connection, no long cables. – Znarkus Aug 28 '11 at 15:16
First, make sure the link light is on at both ends then. Next, see if you can ping the router while the connection isn't working. – David Schwartz Aug 28 '11 at 15:20
"stall for a couple of seconds" How often? – user48838 Aug 28 '11 at 18:09
@user48838: maybe once or twice a day – Znarkus Aug 29 '11 at 7:27

There are a few places you can start. I would install mtr and screen (available via apt-get):

Then login to your router and setup two screen sessions. One mtr to a local box on your local network, the other an mtr to some reliable internet site like Let these run. Then the next time you see an issue reattach to the screens and you should see mtr showing '?' where there is packet loss. It will probably be on one side (either to google, or to your LAN). If the issue is on your local LAN you need to investigate possible failures with hardware or cabling. If it is wireless like @David Schwartz asked you may need to investigate SSID or frequency problems.

If for some weird reason both mtr's show loss there may be an issue with your box and you should look at the logs in /var/log and 'dmesg' for possible answers.

If neither of the mtr's show issues when you experience the problem it is probably DNS related and you should either try setting up your own caching DNS server or using OpenDNS or google as a resolver to see if that improves the problem (nameserver or on /etc/resolv.conf should work).

share|improve this answer

In addition to the monitoring that polynomial has identified, you might also check/trend system load as well. Have you reviewed you logs for any telltale entries or up-tick in activity?

share|improve this answer
The what now..? :) – Znarkus Aug 29 '11 at 17:53
Have you reviewed your logs and if so, did you find anything out of the ordinary entry-wise or logging frequency-wise? Can you characterize the system load during your "blink" events? – user48838 Aug 29 '11 at 19:43

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