Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 06 Apr 2005 09:40:28 +0200
From:      "Martin Petraschek" <petraschek@ftw.at>
To:        "Dan Nelson" <dnelson@allantgroup.com>
Cc:        "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org>
Subject:   Re: Viewing DNS cache entries
Message-ID:  <BLACKHOLENtzsG06vdG000027b7@mail.ftw.at>
In-Reply-To: <20050405155651.GD64927@dan.emsphone.com>

next in thread | previous in thread | raw e-mail | index | archive | help
>In the last episode (Apr 05), Martin Petraschek said:
>> On Tue, 5 Apr 2005 10:36:35 -0500, Dan Nelson wrote:
>> >In the last episode (Apr 05), Martin Petraschek said:
>> >> The operating system is caching DNS name resolutions in order to
>> >> avoid repeated DNS requests for the same hostname. Is it possible
>> >> to display the entries of that DNS cache?
>> >> 
>> >> Under Windows, the command "ipconfig /displaydns" exists, and I
>> >> would need that functionality under FreeBSD.
>> >
>> >You can use the "rndc dump" command, which will create a file that
>> >contains all of the currently-cached DNS entries.  If you are
>> 
>> The rndc command does not exist on my 4.10 box.
>
>It was called "ndc" in bind 8 (which is what comes with 4.*).
> 
>> Anyhow, I am not running a nameserver on this machine. Is this a
>> prequisite for your suggestion to work?
>
>Yes; if you are not running a nameserver, then the OS won't cache any
>DNS entries at all.  Every lookup will result in a DNS request to one
>of the servers listed in /etc/resolv.conf.  Maybe you have some static
>entries in /etc/hosts?  That file is checked before DNS; edit
>/etc/host.conf to change the lookup order.

Thank you, Dan. I was not aware of the fact that FreeBSD does not cache 
DNS entries unless you are running a name server.





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BLACKHOLENtzsG06vdG000027b7>