Linux – Slow Internet Browsing


Slow Internet Support Posts
It appears that there have been a few posts on Linux support forums regarding a slow internet connection. There are several reasons that this could occur and possibly hundreds of fixes ranging from:

Poor Hardware (Nic card, Router, Cables)
Incorrect Drivers
Misconfigured Network Settings (DNS, IP Address, Hosts file etc)
The Avahi Daemon Bug
IPv6 as default instead of IPv4
etc etc

Here are some solutions to a few problems:

1. Hardware
Check that your hardware is ok. If you dual boot, does it work ok with Windows or another “non-Debian” distro?

2. The Debian Avahi (nss-mdns) Bug
There is a known bug doing the rounds in Debian based distros, this includes Dreamlinux and Ubuntu.
The problem is in the nsswitch.conf file where wins mdns causes a slowdown of DNS resolution on some machines.

https://bugs.launchpad.net/ubuntu/+source/avahi/+bug/94940

A simple workaround for this problem is to remove mdns4_minimal entry from the nsswitch.conf file, or change mdns4_minimal to just mdns4 (whichever works best for you):

gksudo scite /etc/nsswitch.conf

Scroll down to the entry which says:

hosts: files dns wins mdns4_minimal

and delete the mdns4_minimal entry. (I removed wins as well), s it looks like this:

hosts: files dns

3. Ssh Connections to Servers
I had to ssh into a server from a friends Ubuntu machine and the connection took about 45 seconds. I disabled Avahi and the delay wasn’t even 1 second. If you have no need for Avahi style connections (multicast dns etc) try:

Disabling the Avahi Daemon Temporarily:

sudo /etc/init.d/avahi-daemon stop

Disable Avahi Permanently:

gksudo scite /etc/default/avahi-daemon

And make sure it is set to =1

# 1 = Try to detect unicast dns servers that serve .local and disable avahi in
# that case, 0 = Don’t try to detect .local unicast dns servers, can cause
# troubles on misconfigured networks
AVAHI_DAEMON_DETECT_LOCAL=1

4. Check your DNS in resolv.conf
You should only have two entries (usually) which are your Internet Service Provider’s DNS servers.
Check and/or edit your dns servers:

gksudo scite /etc/resolv.conf

It should look something like this:

search my.isp.com

nameserver 4.4.2.2
nameserver 4.4.2.4

You may have an extra IP address there, possibly your router (192.168.1.1), and if you haven’t got dns servers configured in your router config, this may cause a problem/slowdown as well. EG:

search my.isp.com

nameserver 192.168.1.1
nameserver 4.4.2.2
nameserver 4.4.2.4

Just remove the first one and leave the two ISP DNS server IP’s.

5. Disabling IPv6 to only use IPv4
[Howto] Speed Up Internet: Iceweasel, Google Earth (No IpV6)

There are many reasons how network problems can arise, depending on whether you are using a modem (Dial-Up/USB), Router (Wired/Wireless), Bluetooth, Mobile Phone. The above are just a few of the more common problems.

rich


Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Technorati
  • Yahoo! Buzz
  • Slashdot

, , , , , , ,

  1. #1 by bullet on 03/09/2009 - 20:04

    I was not actually investigating a slow internet problem when I came across this information (in two places, in fact). Curiousity being my weakness, I thought I’d look into what would be revealed by using the gksudo scite /etc/nsswitch.conf command.
    I should mention that I’m using Ubuntu Hardy, by the way.

    It was revealed that I don’t have scite installed on this machine, though that could be remedied easily enough.

    The thing is, I had not heard of scite before and did not know what it was. But once I ran the command as “gedit scite…”, it produced the intended information.

    As to the effect or effectiveness of deleting the mdns4_minimal entry, I cannot yet comment other than to say that I haven’t broken anything by deleting it. I’ll have to get back to you about any other changes I observe.

    Incidentally, the entire entry, in my case, began as “files mdns4_minimal [NOT FOUND=return] dns mdns4″
    it now states simply “files dns” as your example does.

  2. #2 by Rillooo on 09/11/2009 - 10:31

    This is just the reason why people never will install -ix distros over M$.

    98% of the computer users in the world will NOT ” gksudo scite /etc/nsswitch.conf , hosts: files dns wins mdns4_minimal” etc etc.

    Do it again and do it right…..

    When things that work in older dists stops working when performing dist-upgrade… well it just sucks !

(will not be published)