Thursday, 15 April 2010

dns cache

I installed dnsmasq a long time ago, but it turns out I never told my dhcp to use it.
All done now thanks to the following post:

My steps (for in case I need to do it again :) :
sudo apt-get install dnsmasq

Now edit /etc/dhcp3/dhclient.conf
and uncomment the following line:
prepend domain-name-servers;

I didn't have a /etc/dnsmasq.conf , and it does not seem to be needed because my dns caching works fine now without it; I assume its got good defaults.

To test it quickly add nameserver to the top of /etc/resolv.conf
(it normally gets overwritten by the network manager)

You will see something like
;; Query time: 38 msec
Now do it again, and you should see something like:
;; Query time: 2 msec


No comments:

Post a Comment