OpenDNS vs Google DNS
Services like OpenDNS and GoogleDNS can speed up your browsing experience while keeping you secure on the internet. Generally, when you are connecting to a website, your browser is using the domain name server (DNS) of your internet service provider (ISP). But your ISP probably doesn’t have the fastest DNS servers which might be slowing down your internet browsing.
The DNS servers translate domain names to IP addresses. Whenever you connect to the internet, the browser sends out a request with the domain name to the DNS server and gets back the numerical IP address. So when you put in a domain name like www.cnn.com, your browser asks the DNS server to find out the related IP address 126.96.36.199.
In order for a domain to be valid, it needs to be listed on at least one authoritative name server. There are different types of name servers spread throughout the internet. These name servers are helping the internet to function. For efficiency and performance reasons, the Domain Name System supports DNS cache servers. The job of the cache servers is to store DNS query requests for the time-to-live period. The time-to-live period is defined in the domain name record. It tells the cache to remember the specific domain name for a specific period of time. When the period is over, the cache has the right to forget or delete that record. These DNS server caches also use recursive algorithms to improve the efficiency of the queries.
The caching servers are considered resolvers. When you are using your local computer, you have the option to use your ISP’s resolver or define any other third-party resolver you want.
ISP Name Server Restrictions
Your ISP’s DNS servers are located near your location. So network routes are short which mean your response time from these DNS servers will be faster than third-party servers. However, ISPs often block certain DNS requests or they redirect traffic to warning pages for suspicious sites or torrent sites. This might feel like censorship. Third-party DNS server like Google Public DNS, OpenDNS, UltraDNS, DynGuide, and others can help you find ways around these restrictions.
DNS Server Options
Here are the IP address for the OpenDNS and GoogleDNS
Testing the Speed of Resolution
On a Linux System, you can use the dig domainname.com and look at the ‘Query time’ to figure out the speed of the DNS server response. I tested for GoogleDNS, OpenDNS and 188.8.131.52 for querying google.com and linuxhint.com. Here are the results:
$ dig google.com @184.108.40.206 | grep 'Query time' ;; Query time: 55 msec $ dig google.com @220.127.116.11 | grep 'Query time' ;; Query time: 132 msec $ dig google.com @18.104.22.168 | grep 'Query time' ;; Query time: 307 msec ------- $ dig linuxhint.com @22.214.171.124 | grep 'Query time' ;; Query time: 108 msec $ dig linuxhint.com @126.96.36.199 | grep 'Query time' ;; Query time: 157 msec $ dig linuxhint.com @188.8.131.52 | grep 'Query time' ;; Query time: 254 msec
You can look at the query times and determine the best server for your location.
If you decide to use GoogleDNS as your primary and OpenDNS as your secondary DNS server, you can update the /etc/resolv.conf file to this:
nameserver 184.108.40.206 nameserver 220.127.116.11 nameserver 18.104.22.168
It’s important to remember that DNS servers will not change your internet speed. The speed will depend on your ISP. OpenDNS or GoogleDNS might provide a slight advantage in terms of name resolution and avoid known malware domains. This will help in situations where websites have multiple advertising images, scripts, etc. that need to quickly resolve multiple domain names.
Whenever you change your name server, it’s recommended that you flush the DNS cache. For Linux, you can restart the “nscd” or the “network manager”:
/etc/init.d/nscd restart Or service network-manager restart
GoogleDNS and OpenDNS are free resources. So it’s worth your time to test these out to see if it can improve your web browsing experience.