Professional Web Applications Themes

Viewing DNS cache entries - FreeBSD

Hi! 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. Thank you, Martin...

  1. #1

    Default Viewing DNS cache entries

    Hi!

    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.

    Thank you,

    Martin



    Martin Guest

  2. #2

    Default Re: Viewing DNS cache entries

    In the last episode (Apr 05), Martin Petraschek said: 

    You can use the "rndc dump" command, which will create a file that
    contains all of the currently-cached DNS entries. If you are running a
    chrooted named (default in 5.*), add this line to
    /etc/namedb/named.conf in the options{} section:

    dump-file "/var/dump/named_dump.db";

    , then run "rndc reconfig" and "rndc dump". The dumpfile will end up
    in /var/named/var/dump/named_dump.db.

    --
    Dan Nelson
    com
    Dan Guest

  3. #3

    Default Re: Viewing DNS cache entries

    >In the last episode (Apr 05), Martin Petraschek said: 
    >>
    >> The rndc command does not exist on my 4.10 box.[/ref]
    >
    >It was called "ndc" in bind 8 (which is what comes with 4.*).

    >
    >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.[/ref]

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



    Martin Guest

  4. #4

    Default Re: Viewing DNS cache entries

    Martin Petraschek wrote:
    [ ... ] 

    At least some versions of the standard C library will cache the last DNS
    looked up, and reuse that value if the process asks about the same host again.
    That turns out to be almost free to do, and is still reasonably helpful for
    many cases.

    However, FreeBSD does not have a global cache the way Windows does, or things
    like nscd (Solaris) or lookupd (MacOS X)...

    --
    -Chuck
    Chuck Guest

Similar Threads

  1. Log Entries
    By karimushan in forum Macromedia Flash Flashcom
    Replies: 0
    Last Post: February 29th, 03:54 AM
  2. FWF #13--New Entries
    By Kim Cavanaugh in forum Macromedia Fireworks
    Replies: 8
    Last Post: August 16th, 09:51 PM
  3. Start up entries
    By Donald Link in forum Windows XP/2000/ME
    Replies: 0
    Last Post: June 30th, 05:35 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139