[Dnsmasq-discuss] How to reset cache of dnsmasq?

Albert ARIBAUD albert.aribaud at free.fr
Thu Dec 26 07:20:19 GMT 2013

Le 26/12/2013 04:31, Peng Yu a écrit :
> Hi,
> I can't find a command to reset cache of dnsmasq. Could anybody let me
> know? Thanks.

 From a man dnsmasq:


	-1, --enable-dbus
		Allow  dnsmasq  configuration  to  be  updated  via
		DBus method calls. The configuration which can be
		changed is upstream DNS servers (and corresponding
		domains) and cache clear. Requires that dnsmasq has
		been built with DBus support.


		Whenever /etc/resolv.conf is re-read, clear the DNS
		cache.  This is useful when new nameservers may have
		different data than that held in cache.


	When  it  receives  a  SIGHUP,  dnsmasq clears its cache and
	then re-loads /etc/hosts and /etc/ethers and any file given by
	--dhcp-hostsfile, --dhcp-optsfile or --addn-hosts.  The dhcp
	lease change script is called for all existing DHCP leases. If
	--no-poll is set SIGHUP also re-reads /etc/resolv.conf.  SIGHUP
	does  NOT re-read the configuration file.


	[...] By default, dnsmasq reads /etc/resolv.conf  to  discover
	the  IP  addresses  of  the upstream  nameservers  it  should
	use,  since  the  information  is  typically  stored there.
	Unless --no-poll is used, dnsmasq checks the modification time
	of /etc/resolv.conf (or equivalent if --resolv-file is used)
	and re-reads it if it changes.



More information about the Dnsmasq-discuss mailing list