How to use the fastest DNS

Dusting off the Let's Use Linux posts, I rediscovered one that I would like to deepen. It is about the existence of namebench, a tool that allows testing different DNS and that is of tremendous help to speed up our Internet connection.

 

What is a DNS

The DNS server is like a phone book that stores people's phone numbers. In this case, what it stores is the IP number that corresponds to the Internet addresses through which we browse.

In this way, when you put www.google.com, the DNS server is the one that transforms that text into the IP number of the machine where the page we want to see is stored. We need DNS servers because, obviously, www.google.com is easier to remember than a long number.

On the other hand, it is important to understand that there is no single DNS server for everyone. There are what are called root servers, which are the ones who know where the "high-level" servers are in each of the zones into which the world was divided and who also store the "complete list" of IPs. There are only 13 of these servers in the world. Then there are the "top-level" servers that only store part of that list (generally associated with geographic factors -.ar, .be, etc.- or generic -.com, .gov, etc.).

There are many of these servers, there are even private initiatives (such as Google and the Internet providers -ISP- of each of the countries) that offer DNS services. These are the DNS servers that we generally use, since if they do not have the number searched, they transfer the query to another server and so on until they come up with an answer.

To summarize, choosing one or the other DNS can greatly impact the performance of your connection (both download and upload) since the longer it takes to transform the URL into an IP number, the longer it will take for our computer to access that page. .

 

How to choose the fastest DNS

namebench is a cross-platform tool that will help you find the fastest and closest DNS servers, depending on where the computer is located. What it does is run a very comprehensive evaluation, taking your web history, tcpdump output and other standardized data sets as a benchmark in order to provide a detailed report on each DNS and make a recommendation on which would be the best server and how much the connection would improve over the DNS currently in use.

[warning] Be careful, the fastest server is not always the safest or the one that best protects your privacy. An alternative that balances speed, security and privacy is openNIC. [/ warning]

namebench it is free software and does not modify the system in any way.

 

Installation

En Debian / Ubuntu and derivatives:

sudo apt-get install namebench

En Arch and derivatives:

yaourt -S namebench

The rest, you can download the source code and compile it.

Download namebench

 

Easier

1. When executing the command namebench, it will open.

2. Login 127.0.0.1 en Nameservers  and press the button Start benchmark, as seen in the image below.

namebench in action

namebench in action

3. Have a little coffee. When you return, you will see that a page has opened in your internet browser in which the report created by namebench is displayed.

Detailed report on the performance of each of the DNS

Detailed report on the performance of each of the DNS

It is truly a gem that is worth reading in detail.

Performance graphs of DNS servers

Performance graphs of DNS servers

More performance graphs of DNS servers

More performance graphs of DNS servers

Changing the DNS as recommended by namebench is usually a very simple task, but since it varies depending on the distribution you use, the easiest thing is to create the /etc/resolv.conf.head file by hand, and add the appropriate DNS.

Modifying the /etc/resolv.conf file is not the best solution in these cases, since that file is modified by Network Manager and other network managers. For this reason, I recommend using /etc/resolv.conf.head.

 

The results

Sometimes the speech matters less than the results. This is the before and after configuring my DNS server, as recommended by namebench.

Internet speed results before configuring my DNS as recommended by namebench

Before

Internet speed results after configuring my DNS as recommended by namebench

After

Impressive isn't it? Anyway, it is worth clarifying that the results depend on many factors (how good is your current DNS, your location, the Internet speed provided by your ISP, etc.).

Más info: namebench


The content of the article adheres to our principles of editorial ethics. To report an error click here!.

28 comments, leave yours

Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   jav said

    The article is very interesting,

    Thank you

    1.    let's use linux said

      You're welcome! Good that it is of interest.
      Hug! Paul.

  2.   Gabriel said

    The download speed has nothing to do with the DNS, the defenders of freedom users recommend not using the services of google or any other company that is dedicated to spying on the sites we access, instead we recommend opendns or better yet own DNS with BIND.

    1.    let's use linux said

      You are right. It is something important that I forgot to add. Sometimes other things matter more, not just speed. I'm going to incorporate it.
      Cheers! Paul.

  3.   2 said

    What dns do they suggest but are they encrypted or from trusted sites?

    1.    let's use linux said

      OpenDNS

    2.    2 said

      I didn't know about opendns. How sad.
      Does anyone suggest any DNS that respects privacy and freedom?
      impossible there will be none

      1.    2 said

        I answer and share

        OpenNIC
        OpenNIC is a free and alternative domain name registration and root DNS project managed by ICANN (Internet Corporation for Assigned Names and Numbers). This project is supported by a community of users that collaborates in the implementation of a whole network of free and decentralized DNS servers that, in addition to offering us domain name resolution services managed by ICANN, also gives us access to the space operated by OpenNIC and that are outside the rules of this body subject to the laws of the State of California.

        The search for this independence has given rise to a family of servers that, among other things, do not keep a log of the queries made by users (or are deleted after 24 hours) in addition to giving us service in that "part of the Internet" that ICANN does not govern.

        1.    eliotime3000 said

          One question: If I use OpenNIC, are sites like Hulu, Vevo or any other website restricted to US territory going to be available with that DNS change or will they continue with that territorial restriction?

      2.    Tor said

        OpenNIC more than everything is for managing domains not recognized by ICANN, on the other hand with OpenDNS it has encryption security with DNSCript and improves your connection since they perform caching on their servers, services such as facebook, gmail, twitter load very fast.

  4.   rmarquez said

    opendns is more of a google intermediary than a dns itself, in addition to collecting information that we use on the net such as logins, passwords, pages ... for as long as necessary (https://www.opendns.com/privacy/) is not recommended !.

    1.    let's use linux said

      You leave me cold I just finished reading the openDNS terms of use:

      We may use third-party cookies as part of remarketing activities we conduct with Google and / or other third-party vendors, to help provide you with relevant promotional offers as you use the Internet. As part of these remarketing activities, these third-party cookies may record your visits to our Websites and web sites visited prior to using our Websites. Such cookies can then be used to serve advertisements to you on other web sites. You may choose to be exempt from the use of Google remarketing cookies at the Google advertising privacy page. Alternatively, you may opt-out of remarketing on the Google network and similar networks at the Network Advertising Initiative opt out page.

    2.    let's use linux said

      I had always heard it was the best. As Gabriel says, maybe you have to try setting up your own DNS or using Tor and that's it. 🙂

      1.    anonymous said
        1.    sieg84 said

          in my case with OpenNIC
          x = 0; server = 98.200.95.139; host = »google.com»; queries = 128; for i in `seq $ queries`; do let x + = `dig @ $ {server} $ host | grep "Query time" | cut -f 4 -d »« `; done && echo "scale = 3; ($ x / $ {queries})" | bc
          107.546
          with OpenDNS
          server = 208.67.222.222; host = »google.com»; queries = 128; for i in `seq $ queries`; do let x + = `dig @ $ {server} $ host | grep "Query time" | cut -f 4 -d »« `; done && echo "scale = 3; ($ x / $ {queries})" | bc
          56.914

          I took the command from here: http://www.webupd8.org/2010/09/determine-dns-query-duration-quick.html

      2.    jav said

        That, just, would be interesting an article about updated tor,
        that is, which is better or which they prefer:
        - Download and use «Tor Browser Bundle», from the Tor page
        - Install from the repos: tor, privoxy and vidalia, the issue is if we can configure it the same as the Tor Browser Bundle.

        Regards,

  5.   edo said

    It does not work for me, I already installed it from AUR and after installing it when I run in terminal 'namebench' it appears
    bash: namebench: command not found

    1.    Rots87 said

      test with man namebench to see if syntax has changed

  6.   Mr. Linux said

    Interesting article, but as we all know there is no secure or well-configured server, with a few (well-founded) knowledge about hacking and internet security you can enter any system. Namebench is a very good start to analyze our victim. Once again welcome to DesdeLinux and I hope that the quality of your articles is the same or better when you had your own blog.

  7.   alfredo badolati said

    please help!! REALLY impressive the results I obtained and how this program tells me that I can improve the speed with the new numbers that I shot after the report, but the truth is I DO NOT KNOW ALMOST any of this and my main, and for now FIRST question is, using ubuntu and windows 7 ... WHERE should I put those values ​​to obtain that speed ???????????? + they will serve me with my provider, I say because I am replacing the values ​​that he gave me when hiring the service noP = I hope your kind answers, and thanks from NOW !!!!!

    1.    pandev92 said

      The dns does not modify your download speed :), what it does is simply second to the dns, having the information on the webs more updated or accessing it a little faster :).

      1.    alfredo said

        thanks editor! so then what is it for ??????

      2.    let's use linux said

        That's true. Changing the DNS does not alter the download speed of a 200MB file, for example. However, as browsing the internet consists of a lot of communications (each page you browse, and also within each page, each JS code, each CSS, that is, each request that page makes) that little bit that improves speed when converting URLs in IPs ends up being considerable.
        Conclusion, you will not download files faster but you will notice an improvement in navigation. The degree of improvement depends on many factors.
        Cheers! Paul.

  8.   Victor said

    ...

  9.   Mr Black said

    It is not in the Manjaro repositories, download the sources and you do not have to compile anything, it is in python, with a simple ./namebench it works, to use the graphical interface it is necessary to have python-tk installed, but it also works in the console. It was good to find out about OpenDNS, I was also very wrong, greetings.

  10.   Tor said

    For those who are looking for speed in their connections, setting up a DNS server would not be viable since their PC will increase the consumption of resources and bandwidth which would lower its performance instead of improving.

  11.   Ado Ello said

    Did you get the before and after results by removing the Jdownloader?
    The loading of pages can be affected as some say here, but it has nothing to do with the speed in downloading files, as those speed checking services do.
    A -1 for not even modifying the post, knowing that what you say is a mistake ... that or is it that you want to mislead.

    1.    milo said

      I don't see that the post should be questioned. What it clearly expresses is that improving the choice of DNS can improve connection speed. Nothing says about improving download speed. The privacy aspects are not mentioned in the post simply because it is another objective. The comments have contributed other questions that enrich the post. In my view, the contribution of the post (and its comments) is largely positive, due to the information it provides and the benefit that its reading achieves for a diverse audience. I clarify: (I do not know the author or any relationship with him, it is the first time that I enter this site and I came through a general search, it simply seems to me that its purpose is honest and supportive and should not be questioned but promoted and appreciated ).