[Dnsmasq-discuss] Re: Questions about "resolv-file"

Hugo Heden hugoheden at gmail.com
Mon Feb 9 12:16:12 GMT 2009


Adding a third question below..

2009/2/9 Hugo Heden <hugoheden at gmail.com>:
> Good day all,
>
> Total rookie here. I am trying to understand things first by reading
> documentation, i.e without really testing stuff. I have a few
> questions about the "resolv-file" option in the configuration file, as
> explained in:
>
> http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq.conf.example
> http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html
>
> Ok, the example config file says (NOTE the typo in the example-conf
> file: "other that" should be "other than"):
>
> # Change this line if you want dns to get its upstream servers from
> # somewhere other that /etc/resolv.conf
> #resolv-file=
>
>
> Q--1-- Does this mean that
>
> (a) the nameservers specified in [resolv-file] will be *added* to the
> ones in /etc/resolv.conf?
>
> *Or*
>
> (b) will the file(s) specified in [resolv-file] *override* the default
> /etc/resolv.conf (so that dns will use servers specified in
> [resolv-file] *instead of* in /etc/resolv.conf)?
>
>
>
> Q--2-- Can the resolv-file option be used to specify *several* files?
>
> The reason I ask the latter is that the man-page talks about using
> more than one resolv.conf file, but does not specify if dnsmasq can be
> told to do this using the conf-file:
>
> "Dnsmasq can be told to parse more than one resolv.conf file. This is
> useful on a laptop, where both PPP and DHCP may be used: dnsmasq can
> be set to poll both /etc/ppp/resolv.conf and /etc/dhcpc/resolv.conf
> and will use the contents of whichever changed last, giving automatic
> switching between DNS servers."
>


Q--3-- Could the man-page have mentioned the resolv-file option in the
below text? I guess resolv-file can also be used here as well? The man
page says:

  "In order to configure dnsmasq to act as cache for the host on which
  it is running, put "nameserver 127.0.0.1" in /etc/resolv.conf to
  force local processes to send queries to dnsmasq. Then either
  specify the upstream servers directly to dnsmasq using --server
  options or put their addresses real in another file, say
  /etc/resolv.dnsmasq and run dnsmasq with the -r /etc/resolv.dnsmasq
  option."


Best regards

Hugo Heden



More information about the Dnsmasq-discuss mailing list