Today you will learn a valuable tip, especially if you have a very slow internet when loading sites, depending on the situation, setting up a good DNS can make all the difference in how fast you access content on the Internet.
Choose the best DNS for your Ubuntu connection and derivatives
I do not know you my friend, but few things make me as angry as slow internet and pages that do not carry, I think even the total absence of internet something less degrading than slow internet, so I will teach you something I usually do When this happens to me, fortunately this problem is happening less and less, but even if you have a "good" internet, so to speak, that doesn't mean it can't get any better.
"Of course" the technique used here won't work miracles, but it will leave your instinct of hope for a good connection still "alive", me having "tim", you wanted a miracle, but "hi"? These things are not so simple. #Bazinga
Understanding the problem. What are DNS?
Domain Name System (DNS) servers are responsible for locating and translating to IP numbers the addresses of the websites we enter into browsers. We sometimes find our ISP's DNS servers congested or having security issues. Using a good DNS server means your browsing can be faster and safer.
If you want to do a test to understand how it works, a simple way to do it for example give the command:
As a result you get the IP: 18.104.22.168, if you take this number and put in your browser the Facebook site has to open, the DNS function will transform the "www.facebook" you type in your browser into this IP address, and some DNS are faster than others, varying according to their location and quality.
How to choose the fastest responding DNS server for me?
It is important to say that there are several famous DNS servers that are almost hegemonic on the internet, we have those of Google, OpenDNS, GigaDNS among many others. So how to find the best one for me?
Entering the very useful NameBench, it is a program that aims to find out which DNS server at your fingertips with the best answer, to make our life even easier, it is in the Ubuntu Program Center.
|Click to download|
Of course, it is also available in any Linux distro repository, if you use Windows look for the "DNS Benchmark" program, it has the same function. For those who prefer the terminal to do the installs the command is quite simple too:
sudo apt-get install namebench
Once installed, let's run NameBench, you can do it through the terminal or not, this is optional, the way I will show does not involve the terminal.
Press the shortcut keys Alt + F2 and type "namebench", all together and without quotes.
Open the program by clicking on it and you will see the screen below:
The program has many options, but for our test we will focus on these 3 which are marked above.
1 – In the option "1" the program has the number 127.0.0.1, ie your Localhost, delete this value so we can continue, this field also serves to test a specific DNS address if you want.
2 – In this optional part, marking the first "checkbox" you tell the software to test only Global DNS servers, such as Google, OpenDNS, UltraDNS, as seen in parentheses; Checking the option below also allows you to search for local DNS servers, potentially closer to you, such as a company that has internet service or hosting in your city, may be good in some cases but checking this option make searching for the best DNS take a long time according to how many are within your reach.
3 – Lastly, this is the "Start" button, click it and NameBench will start to evaluate DNS servers to find out which ones are best for you. Go have some coffee, this part takes a while.
At the bottom of the program it will tell you which DNS is best for you, in my case the result was "DynGuide" with address "22.214.171.124", remembering that this was the best FOR ME, so you could have a different result.
NameBench also opens in your browser a temporary file with a more detailed analysis of all the tests it has done, like the one below:
|Click on the image to enlarge|
In the image above you see, on the upper right side, a suggestion of a better DNS configuration where you are currently in order of speed.
How to put this DNS on your computer
Now that you have found the best DNS for you to start using, this step may vary slightly depending on the method you are connected to the internet, if you have a local connection setting, ie you set up on your Even the IP you use, along with the subnet mask, Default Gateway and our dear friend DNS, all you have to do is edit the DNS of your configuration.
In Ubuntu, click the internet icon in the top bar, click To edit, select your connection, click To edit again and on the tab IPV4 configuration You can add DNS.
However, many people use the good old router to connect to the internet, well, setting it up is no longer work, but different. You will need to log in to your router and configure the DNS it is using, interestingly, the setting you make will affect any device that connects to it using DHCP, a normal connection.
To set up your router you need to be on the same network as it, setup can be done either via Wi-Fi or cable. If you are going to cable, plug a network cable into any connection on the back of your router (other than WAN) and the other point on your computer / notebook, if it is going to be via Wi-Fi, just be connected to router network.
You will need to open a web browser of your choice, and in the field where you would enter a website URL you will need to enter the router's IP, usually its default IP (if no one has changed) is printed on the bottom of the router, Take a look at it, if you are connected to the network via Wi-Fi via Linux, just give the command:
As we can see in the image, the router's IP 192.168.0.1. Put your router's IP address in your browser's URL bar and a good old "enter".
You will need to enter your login and password (the router login and password has nothing to do with your system user), the default of most devices admin: admin, but if you were smart you should have changed the password if you do not have this information get more complicated continue.
There are two options, either you call the person who set up the router for you or you reset the machine to factory defaults, but make sure you know how to set it back later if you need to. With some providers, you need to make a special IP configuration for you to make your internet work, so if you don't know what you're doing, get help from those who give you technical assistance.
In the image above you see a SETUP of a Link One branded router firmware, the way this screen looks varies from brand to brand, but pretty much all have the same settings, so you need to find the DNS configuration of device, and as you see in the image above, enter the DNS you found as the best option through NameBench.
Then I said you need to reboot the router to make sure the configuration has been successfully applied, look for the "exit" or "tools" menu and there is an option to restart the router, your internet connection should drop for about 15 seconds while The device restarts, but once it comes back you will feel the difference.
Some pages load noticeably faster than before, other pages, most likely because they were already cached in my browser (or even DNS server) load at the same speed as ever. For those who have a somewhat unstable or slow internet to load the pages, any second gain is already profit.
Remember that even a good DNS does not do absolute miracles, a good connection structure and a predictor that does not practice (not much) traffic shaping It helps a lot.
At most guys, share the knowledge! Thanks!
_____________________________________________________________________________ See any errors or would you like to add any suggestions to this article? Collaborate, click here.