From owner-freebsd-questions@FreeBSD.ORG Wed Apr 6 07:38:38 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3399316A4CE for ; Wed, 6 Apr 2005 07:38:38 +0000 (GMT) Received: from publications.ftw.tuwien.ac.at (nt-ftw.ftw.tuwien.ac.at [128.130.90.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id E91DB43D1D for ; Wed, 6 Apr 2005 07:38:36 +0000 (GMT) (envelope-from petrasch@FTW.at) Received: from nt_ftw.ftw.tuwien.ac.at by publications.ftw.tuwien.ac.at ESMTP; Wed, 6 Apr 2005 10:00:18 +0100 Received: from erriapo.ftw.local ([192.168.0.47]) by mail.ftw.at with Microsoft SMTPSVC(6.0.3790.211); Wed, 6 Apr 2005 09:40:28 +0200 From: "Martin Petraschek" To: "Dan Nelson" Date: Wed, 06 Apr 2005 09:40:28 +0200 Priority: Normal X-Mailer: PMMail 2000 Professional (2.20.2380) For Windows 2000 (5.1.2600;2) In-Reply-To: <20050405155651.GD64927@dan.emsphone.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-ID: X-OriginalArrivalTime: 06 Apr 2005 07:40:28.0385 (UTC) FILETIME=[E72DBD10:01C53A7B] cc: "freebsd-questions@freebsd.org" Subject: Re: Viewing DNS cache entries X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Martin Petraschek List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Apr 2005 07:38:38 -0000 >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.