Slow Internet Coonection in Mint 7 Gloria

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Husse

Re: Slow Internet Coonection in Mint 7 Gloria

Post by Husse »

No big difference between dnsmasq and pdns I think but pdns is dead easy to install and configure (no configuring :shock: )
Husse

Re: Slow Internet Coonection in Mint 7 Gloria

Post by Husse »

Welcome to Mint uncannybuzzard
There's a big chance you get
no MII interfaces found
But thanks for pointing it out
All in this topic please test sudo mii-tool and read the man page (here)
If you find a MII interface you might be able to force a higher speed
However as I read this it seems to work on LAN but not WAN
Please test the speed you get on your LAN and see if that is significantly better than on the internet
phil
Level 3
Level 3
Posts: 141
Joined: Sun Dec 30, 2007 12:46 pm
Location: Consejo, Belize, Central America

Re: Slow Internet Coonection in Mint 7 Gloria

Post by phil »

The more I study slow dns lookup the more confused I get. I have dnsmasq and pdnsd running at the same time and they seem to get along together. The only way I have found to get the result that I really want, however, is to list ip numbers of the web sites that seem to be the most problem in the /etc/hosts file. I realize that by doing this I am vulnerable to a change in the ip number. This has not happened so far after several days, and I am sure does not happen very often.

One of the addresses that is a very slow look up frequently is linuxmint.com so I experiment with that.

What I want to see and cannot seem to configure with bind9, dnsmasq or pdnsd is the following:

1. All addresses accessed today should be saved for tomorrow with the time to live from yesterday saved and continued tomorrow. I do not leave my computers on when I am not using them, for a number of reasons. I am using SSD for both Linux and Windows, with data being saved on a conventional internal drive (soon to be replaced with SSD) and then periodically being saved to external conventional spinning drives.
2. Time to live to be adjustable, at my option.
3. If an address saved does not load in my browser or mail server, delete the saved address and get a new lookup.

I have also studied my DSL service. There are many serious slow downs and even some periods of lack of service even though my telephone always works. There are long periods of no access to root DNS servers. I assume from congestion.

I have been experimenting with Arch Linux (no danger of changing from Mint) and set it up to use ftp for getting my downloads from their servers. When a down load is in progress from Arch another computer connected to my modem/router either loses or almost loses connection to the internet. I have not had that problem with http and two computers updating at the same time for with Mint.

It is wonderful to live in the tropics in a third world country except for internet service and a few other minor inconveniences.
Husse

Re: Slow Internet Coonection in Mint 7 Gloria

Post by Husse »

Hi Phil
I'm thinking along the same lines, but the shear number of questions makes that I can't spend as much time with this as I wish
(And my wife's laptop had a hardware breakdown so now I have hours on end to install and configure the new one - with Vista, can't convince her to change)
Husse

Re: Slow Internet Coonection in Mint 7 Gloria

Post by Husse »

I'll use this as a master topic
Other topics with similar problems
http://forums.linuxmint.com/viewtopic.php?f=53&t=33299
http://forums.linuxmint.com/viewtopic.php?f=53&t=33797
and about half a dozen others I have to find and add here
http://forums.linuxmint.com/viewtopic.php?f=53&t=34123
phil
Level 3
Level 3
Posts: 141
Joined: Sun Dec 30, 2007 12:46 pm
Location: Consejo, Belize, Central America

Re: Slow Internet Coonection in Mint 7 Gloria

Post by phil »

Hi Husse,

Sorry to hear about your wife's computer. My wife is a convert to Linux, but she has been using Linux for about 6 years.

I have ordered another modem, a newer Zoom ADSL5 from Amazon so I can experiment with its setup and still be sure I can get back on the net in case of a goof-up. It should be here in a few more days. Although I do not think the modem is involved in the slow lookups since Windows seems to work fine all of the time there may some kind of interaction with Linux that causes the problem. The thing that really bugs me is that my version of Windows XP pro (fully updated) was originally produced in 2001. It was part of the software we had for the wireless ISP service that I managed in 2004. We had a radio link from Chetumal, Mexico to Corozal, Belize with about 200 customers in Chetumal and the Corozal area. We never identified a DNS look up problem at that time but I was personally using Mandrake with SSL along with our chief technical man to manage the network and to do my other work and personal correspondence. I have talked to him about our present problems and he thinks it might be related to the the present ADSL service provider who does blocking of VOIP or anything that resembles telephone communication. Recently the company was taken over by the government as a result of a feud between the principal stockholder and the government.

phil
Husse

Re: Slow Internet Coonection in Mint 7 Gloria

Post by Husse »

This topic clearly demonstrates that it has something to do with DHCP
This is in the back of my head all the time, but sadly I still can't figure out a solution
User avatar
ibm450
Level 5
Level 5
Posts: 650
Joined: Sun Jan 11, 2009 6:56 am
Location: Hamilton Hill, Western Australia

Re: Slow Internet Coonection in Mint 7 Gloria

Post by ibm450 »

phil wrote:I am not sure what to think about the router situation. I thought it could be used with a router like ipcop to advantage on a private network.

Here is an article about installing dnsmasq, a little dated but it got me started.

Local DNS Cache for Faster Browsing August 2, 2006
Posted by Carthik in administration, guides, packages, ubuntu. trackback
A DNS server resolves domain names into IP addresses. So when you request “google.com” for example, the DNS server finds out the address for the domain, and sends your request the right way.
You can run a DNS cache on your computer. This will speed up the process of looking up domain names when browsing. The difference is about 30-60 ms for me. Multiply that difference by the number of websites you visit a day for an approximate estimate of the speed improvement. Of course, all this would be worth it if it weren’t for the fact that setting this up is way too easy.
The following instructions are for someone with a cable (broadband) internet connection, where the computer gets it’s local IP address using DHCP from the router in your house/office:
The package we will be using for caching nameserver lookups is called dnsmasq. So first, install it using:
$sudo apt-get install dnsmasq
(If you can’t find then, then you probably haven’t added the Universe repository to your list of repositories.)
No uncomment the following line (that is edit the line to NOT have a “#” in the beginning) in the file /etc/dnsmasq.conf:
listen-address=127.0.0.1
Now edit /etc/dhcp3/dhclient.conf and make sure the section below exactly like this, especially the line that says “prepend domain-name-servers 127.0.0.1;”

#supersede domain-name "fugue.com home.vix.com";
prepend domain-name-servers 127.0.0.1;
request subnet-mask, broadcast-address, time-offset, routers,
domain-name, domain-name-servers, host-name,
netbios-name-servers, netbios-scope;
Explanation for the above change: In the normal case, when you get a new dhcp lease, the dhcp3 client (tool) on your computer gets a new lease, and updates the /etc/resolv.conf file on your computer with the right values for the DNS servers to use (usually some machine in the network of your hosting provider). Adding the “prepend” option as we did above ensures that “127.0.0.1″ will appear on the top of the list of DNS servers. That magic number refers to your own computer. So in the future, whenever your computer needs to resolve a domain name, it will forward that request to dnsmasq (which is running at 127.0.0.1 – your computer). If the details for the domain name are already in you cache, well and good, dnsmasq will serve it up and make the process real fast. If it is not in the cache, then dnsmasq will look at the /etc/resolv.conf file and use the nameservers listed below the “127.0.0.1″. I hope that explains things.
Now open the file /etc/resolv.conf in your text editor. It probably looks like:

search yourisp.com
nameserver 217.54.170.023
nameserver 217.54.170.024
nameserver 217.54.170.026
The 127.0.0.1 is missing right now since you haven’t renewed your lease after you edited the /etc/dhcp3/dhclient.conf file. So, let us add that in manually this one time. After you do, your /etc/resolv.conf file will look like the following:

search yourisp.com
nameserver 127.0.0.1
nameserver 217.54.170.023
nameserver 217.54.170.024
nameserver 217.54.170.026

Don’t worry if the numbers are different – if they are not, then hey – we must be neighbours
Okay. We are almost done here. All we have to do now is to restart dnsmasq so that the changes we made to the configuration file take effect. You can do that using the command:
$sudo /etc/init.d/dnsmasq restart.
Now you are running a local DNS cache. If you want to measure your speed improvement, type the command:
$dig google.com
You will see something like “;; Query time: 38 msec” there.
Now type the command again, and you should see something like:”;; Query time: 2 msec”
See, the first time, since google.com’s details were not in your cache (you are using it for the first time), the query took 38 ms. The second time, the cache speeds up the lookup. I have been using this for over a month now, and haven’t had a problem.
The following is ONLY for dsl customers
Note: If you have a dsl connection, the following may work:
Basically, the differences are in how the “conf” files are edited and used.
Copy the /etc/resolv.conf file to /etc/resolv.dnsmasq.conf
Then, edit the /etc/dnsmasq.conf file as follows:

# Change this line if you want dns to get its upstream servers from
# somewhere other that /etc/resolv.conf
resolv-file=/etc/resolv.dnsmasq.conf
You also have to uncomment the line that says listen-address=127.0.0.1
Now, edit /etc/resolv.conf to have ONLY the following line in it:
nameserver 127.0.0.1
Next, edit /etc/ppp/peers/dsl-provider and change the line:
usepeerdns to
#usepeerdns
(that is, comment out that line)
The ppp client does not allow you to prepend the 127.0.0.1 entry to your /etc/resolv.conf file. So what we did in the above was to create a copy of your previous resolv.conf for dnsmasq to use for lookups, update the file to use a local cache, and then prevent the ppp client from overwriting the resolv.conf file the next time. Now you can restart the dnsmasq service as I explained above, and start enjoying faster name resolution.
I don’t have a dsl connection, and so all the above is to the best of my knowledge.
To those of you still on dial-up – THANK YOU for visiting my blog! (I’m too ignorant to know how to change things to get dnsmasq to work on dial-up )

thank-you, this helped me alot and yes i can notice a speed difference with this method. is it possible to add this patch in LM8>?
HP EILITE FOLIO 9470M i7-3667u x 4
GitHub: tolgaerok
Image Image
Husse

Re: Slow Internet Coonection in Mint 7 Gloria

Post by Husse »

I've proposed pdnsd (hope I got the letters right :)) to be included in Helena - does the same thing and is much easier to install and configure (none :))
Husse

Re: Slow Internet Coonection in Mint 7 Gloria

Post by Husse »

As can be seen here there may also be something in your home folder that might play a role....
phil
Level 3
Level 3
Posts: 141
Joined: Sun Dec 30, 2007 12:46 pm
Location: Consejo, Belize, Central America

Re: Slow Internet Coonection in Mint 7 Gloria

Post by phil »

I got my new modem a Zoom ADSL X5, just a newer version of what I had before, installed today. It works fine, even works properly for DNS from ISP using DHCP while the old one did not. So far I cannot see any major change in DNS lookup. A few days of testing may uncover something.

I am pleased to see that Husse is recommending that pdnsd be a part of the next release. I hope it is installed by default, perhaps with some note that it can be disabled if it causes any problem. We know by now that Windows has an equivalent installed by default and that it seems to help a lot.

It still seems to be a problem if the TTL is too short if the internet speed slows or gets boged down with too many DNS requests so pdnsd should help.

Phil
Husse

Re: Slow Internet Coonection in Mint 7 Gloria

Post by Husse »

I'm pleased to see that it's OK for you now phil
This shows it's a mix of hard- and software problems
Locked

Return to “Beginner Questions”