:: Re: [DNG] how to clear DNS cache
Kezdőlap
Delete this message
Reply to this message
Szerző: Hendrik Boom
Dátum:  
Címzett: dng
Tárgy: Re: [DNG] how to clear DNS cache
On Sun, Jan 01, 2017 at 02:11:27PM -0800, Rick Moen wrote:
> Quoting Simon Hobson (linux@???):
>
> > What do /etc/resolv.conf and /etc/nssswitch.conf have in them ?
> > Though to be honest, other than the systems I have BIND running on,
> > DNS resolution is something of a black box to me.
>
> On Linux systems, there is a DNS 'stub resolver' librery 'libresolv'
> included in the glibc package, that furnishes the system's res_query(),
> res_search(), res_mkquery(), res_send(), res_init(), dn_comp(),
> dn_expand() functions, plus higher-level functions such as
> gethostbyname() and gethostbyaddr(). See:
> https://linux.die.net/man/3/resolver
>
> This is distressingly ancient and crufty code, going all the way back to
> 1980s BSD UNIX. After that, it was inside BIND4, BIND8, and all BIND9
> versions until 9.6.0 as 'libbind'. It was removed from BIND itself
> starting BIND 9.6.0. glibc borrowed as 'libresolv' the version of this
> code during the long BIND8 era, and kept in sync with the BIND8 module
> through BIND 8.2.3-T5B in July 2000, from which point it has continued
> to evolve independently in glibc.
>
> The purpose of a 'stub resolver' is to originate outgoing DNS queries to
> a separate _real_ recursive nameserver[1] on- or off-system (e.g.,
> Unbound, BIND9's recursive functions, MaraDNS, PowerDNS Recursor,
> dnscache, Deadwood).
>
> libresolv is used as a generic glibc interface to all DNS name resolution
> methods - from using /etc/hosts file to DNS/NIS/LDAP services, and
> system its behaviour is controlled by /etc/nsswitch.conf and
> /etc/resolv.conf.
>
> It should be noted that many programs presume to cache DNS, e.g., Web
> browsers do, as does the Java runtime. Also, some systems such as ones
> on NIS or LDAP and NFS tend to run dedicated system caching daemons like
> GNU's nscd[2] for performance purposes (i.e., to make performance suck
> less).


I'll look for the various programs mentioned here, and see if they are
present on my system... But I'm starting to suspect that part of the
problem is that too many programs cache the dns, and once they have
something wrong, they hang onto it.

-- hendrik

>
> Possibly of assistance:
> http://linuxmafia.com/faq/Network_Other/dns-servers.html
>
>
> [1] Or to a forwarder such as Dnsmasq, DNRD, CurveDNS, dproxy, or pdnsd,
> which in turn would need to relay the query to a real recursive nameserver.
>
> [2] http://man7.org/linux/man-pages/man8/nscd.8.html
> _______________________________________________
> Dng mailing list
> Dng@???
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng