Home page of this blog

Friday, December 4, 2009

Using google public dns along with local dns cache in Ubuntu Karmic

Here is the info about Google public dns

http://code.google.com/intl/es/speed/public-dns/

Here is the configuration instructions for enabling google public dns

http://code.google.com/intl/es/speed/public-dns/docs/using.html

In the above link, when I followed there was a small problem I encountered. For Ubuntu, there is a small correction in step 2, it should be as follows after correction

sudo vi /etc/dhcp3/dhclient.conf


After I made the changes and tested, here is what my observation

Google dns feels fast

coupled with local dns caching in Ubuntu, it is even faster than before

Here is the link for enabling local dns caching in Ubuntu

http://www.debianadmin.com/local-dns-cache-for-faster-browsing-on-ubuntu-system.html

To have both local dns caching and google dns, we should modify the above link's instruction to have /etc/dhcp3/dhclient.conf to have following line

prepend domain-name-servers 127.0.0.1, 8.8.8.8, 8.8.4.4;

The above change should be done inside /etc/dhcp3/dhclient.conf


To test the changes, goto command line (if you have local dnscache using dnsmasq/bind then restart dnsmasq (sudo service dnsmasq restart) )


dig google.com


and


dig google.com


the second one will be considerably faster than the first, which indicates, if you visit page from same domain again and again, it will be served extremely fast!!


Here is a screenshot of dig in my Ubuntu gnome terminal