0

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.

Markus Hedlund
  • 1,127
  • 2
  • 19
  • 33

2 Answers2

1

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

http://www.bitwizard.nl/mtr/

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 google.com. 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 8.8.8.8 or 4.2.2.1 on /etc/resolv.conf should work).

polynomial
  • 4,016
  • 14
  • 24
0

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?

user48838
  • 7,431
  • 2
  • 18
  • 14