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

Advertisements

4 thoughts on “Linux – Slow Internet Browsing

  1. 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. 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 !

  3. came across this old post, saw the last comment, and had to agree. i keep giving linux a chance, and i keep getting SMACKED down by buggy issues and resolutions that *might* work after a good hour of working in a terminal. seriously, i guess it's fun for some folks to f^ck around with, but…just working is pretty cool, too.

  4. The thing is, everybody has to use what is best for them. As i'm a Geek, I even hacked/modded my my WinXp desktop, whereas most computer users just leave everything as standard. Linux is getting better but there is one very big barrier between Windows and Linux. Windows comes pre-installed with all drivers and ready to go, Linux (in the majority of cases) has to be installed by the user.

    I have installed thousands of OS's, and believe me, if everybody had to install a virgin Windows, there would be a lot more Linux users. I have had to use a Linux live cd to find out what the hardware was on a Windows machine so that I could go and download the drivers and then install Windows. Linux has most drivers working out of the box nowadays. It's not 100% perfect but that's the manufacturer's who are to blame, not Linux devs.

    Once installed and setup, Linux rocks. But it needs a little effort. Whatsmore, if the person who is installing Linux thought to get compatible hardware first, then that's a bonus. Linux depends a hell of a lot on the enthusiasm, common sense of the user. Luckily there is still Windows for those who just want to plug and play.

    But that's the choice. Free or $$$, along with stability and security.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s