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