# DNS Cache in Linux

## Roman_Gruber

OKAY, I dig around in my system and then a question arose.

My brother is a windows boy so:

To view the current DNS resolver cache content and the entries preloaded from the Hosts file, go to the command prompt and type. C:\> ipconfig /displaydns ...

Ok, but I am a linux geek. Is there any equivalent on linux for ipconfig /displaydnscache ? How is dns handled. Or does the linux client always sends a dns requerst for each needed purpose and doesnt use a cache?

I am a little bit disappoined. OK. I used pptp and there was /etc/ppp/resolv.conf. Now I use general network connection via ethernet and now /etc/resolv.conf is used. Well why are there such many configuration files for one fxxxxx dns entry? If I am wrong, but the host uses the ip address in the configuration file to send a dns response to a dns server, right?

thx

----------

## truc

you can use nscd (init script included with glibc) to cache DNS results, I don't know if you can display the cache though.

----------

## m.b.j.

or you can use djbdns, it is very simple to setup and works very well for me.

-- edit: spelling

----------

## gentoo-dev

dnsmasq : http://packages.gentoo.org/package/net-dns/dnsmasq

----------

## ToeiRei

I prefer pdnsd as I'm often 'on the road' with my laptop...

----------

