[Dnsmasq-discuss] Override DNS servers in DHCP packet

richardvoigt at gmail.com richardvoigt at gmail.com
Fri Oct 3 18:09:39 BST 2008

On Wed, Sep 24, 2008 at 12:51 AM, A C <agcme at hotmail.com> wrote:
>> Date: Tue, 23 Sep 2008 18:02:13 -0400
>> From: chekh at pcbi.upenn.edu
>> To: agcme at hotmail.com
>> CC: dnsmasq-discuss at thekelleys.org.uk
>> Subject: Re: [Dnsmasq-discuss] Override DNS servers in DHCP packet
>> On Tue, 23 Sep 2008 15:45:24 -0400
>> A C <agcme at hotmail.com> wrote:
>> >
>> > Does dnsmasq use the DNS servers listed in /etc/resolv.conf over those
>> > listed in a DHCP packet? I was forced to use DHCP for my public connection
>> > but I don't want to use the provided DNS servers as they are slower than the
>> > ones I had manually configured.
>> I think typically the DHCP client would write /etc/resolv.conf with the
>> information it is provided by the DHCP server. Then dnsmasq looks
>> there, unless you configure it otherwise.
>> If you're talking about serving up different DNS servers via dnsmasq's
>> bult-in DHCP server, then take a look at: dnsmasq --help dhcp
> I was indeed talking about the first situation and not serving up alternate
> DNS servers.  As it turns out, my installation is using udhcpd and writing

udhcpc more likely

> the data to /tmp/resolv.conf while dnsmasq is still looking at
> /etc/resolv.conf.  Since I don't have any directives to look at any other
> resolv.conf that I can see, I think it's safe to assume that dnsmasq is
> honoring my own /etc/resolv.conf and ignoring the DHCP packet.

Sounds like OpenWRT, where /etc/resolv.conf and /tmp/resolv.conf are
actually the same file (symlinked) by default.

Note that there's a dnsmasq configuration option to have it look at a
file other than /etc/resolv.conf ... surely no dhcp client is going to
tamper with a file named /etc/resolv.dnsmasq for instance.

> ________________________________
> See how Windows Mobile brings your life together—at home, work, or on the
> go. See Now
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss

More information about the Dnsmasq-discuss mailing list