Solution to fast ubuntu download but slow webpage access

Source: Internet
Author: User

This is almost a post, but I hope to publish this as the homepage to help more Linux users solve network problems as soon as possible.

Recently, due to work needs, I once again picked up the LINUX that I had previously installed based on interest and gave up due to too few applications.

I use redhat linux es5.4. for excellent linux operations and powerful network functions, I have installed Fedora16, RedhatLinux9.0, ubuntu 11.10, ubuntu 10.04, and other versions on VMWARE, in order to enable the 3D desktop effect, I installed ubuntu10.04 using VirtualBox. Although the 3D desktop effect is implemented, the full screen mode is not supported. In addition, the response is often stopped, which is very distressing.

Oracle had regressed VirtualBox, So SUN's 3.1 version was replaced with 4.1, but the problem persists.

I have also considered hard disk installation. First, I am worried about the driver problem. In addition, I am also using X201, I am worried that ThinkPad can be restored with one click (I used to install XP as a dual-system, and it took me a lot of effort to recover );

Later, I accidentally discovered the WUBI tool, which can be installed without partitions. So I tried it and the competition was successful! And the amazing 3D desktop effect is enabled !!

However, when surfing the Internet, the speed of updating/downloading can reach more than 400 KB, but the speed of opening a webpage is extremely slow.

I found a lot of information, but I was not able to succeed.

Find this article, and after step-by-step setup, it still becomes invalid. If you are disappointed, restart the machine. Once the page is opened again, It is completed instantly! 10 MB optical fiber can be used in WINDOWS to achieve the speed!

After following the instructions in this article, you must restart the system to take effect!

The following is basically the original text.

Yesterday, I installed ubuntu10.04, a memorable version. After all, the version number is the same as my birthday ~ Hey.
However, when the system is connected to the network, I can obviously feel very slow. However, once a connection is established, the download speed is acceptable. When using Firefox to browse the Web page, it is found that when the connection is slow, the "Looking up xx.com .... "Or" Connecting to xx.com ", it can be determined that this version of ubuntu is slow because of slow domain name resolution. The dig command is used to parse the domain name and observe the return time, which fully proves this viewpoint.

Now that you know the reason, it is easy to solve the problem. Just set up a local DNS Server and set the resolution DNS address to local. This may be slow when you connect to the website for the first time. However, since you can directly hit the local cache in the future, you should be able to greatly speed up domain name resolution. Okay, let's get started. Here we use a lightweight DNS Server-pdnsd. Of course, if you are interested, you can use software like Bind to set up a DNS Server, since the concurrency here is not large, I will use the lightweight Server software ~~

1. Install

Pdnsd has been added to the source and is easy to install:
Sudo apt-get install pdnsd
During the installation process, it will ask you which configuration you choose. Here you select manual.

2. Configuration

Sudo gedit/etc/pdnsd. conf

Modify
Server {
Label = "resolvconf ";
}
Is
Server {
Label = "resolvconf ";
Ip = 61.233.154.33;
Ip = 211.98.4.1;
Timeout = 30;
Interval = 30;
Uptest = ping;
Ping_timeout = 50;
Purge_cache = off;
}
Where:
Ip = 61.233.154.33;
Ip = 211.98.4.1;
These two lines can also be written as a line of ip = 61.233.154.33, 211.98.4.1; representing the local DNS server address, there can be multiple, fill in according to your own situation. Here is tietong's DNS.
The following parameters can be used by default.

Sudo gedit/etc/default/pdnsd
Modify the value of START_DAEMON to yes.

3. Set the local DNS

Sudo gedit/etc/resolv. conf
Insert a row before all content:
Nameserver 127.0.0.1

In particular, if you are using ADSL dial-up Internet access (configured through pppoeconf), you also need to modify the file:
Sudo gedit/etc/ppp/peers/dsl-provider
Add # In Front Of usepeerdns and comment it out. Prevents ppp from forcing remote DNS and overwriting resolv. conf

If you have enabled the DHCP service
Sudo gedit/etc/dhcp3/dhclient. conf
Remove
# Prepend domain-name-servers 127.0.0.1;
The preceding "#".

4. Start pdnsd
Sudo/etc/init. d/pdnsd start

5. Simple Test

Dig kaisir.com | grep time

The first result shows:; Query time: 11 msec
The second result shows:; Query time: 0 msec
The third result shows:; Query time: 0 msec
The fourth result shows:; Query time: 0 msec

Look, at this time, the second and later resolutions are directly hit the local cache, which greatly improves the speed of domain name resolution.

(For the configuration process in this article, refer to the log of the Look neurology Luke, but there is an error in it. I have corrected it in the log .)
Detailed source reference: http://www.jb51.net/ OS /Ubuntu/34827.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.