I'm working on a network with ~10 kubuntu desktops (and numerous servers and IP phones) and am trying to get dnsmasq to specify another dns server as a failover. I tried using


but that just added the single dhcp/dns server to /etc/resolv.conf on my test machine (dynamic IP and freshly rebooted with no lease).

3 Answers 3


Answered my own question, thanks to rfc2132


However, RFC2132 specifies option 5 as a list of name servers and option 6 as a list of domain name servers, and I'm not sure what the difference is. Either way, option 6 put them correctly as


in /etc/resolv.conf

  • 1
    Unfortunately /etc/resolv.conf refreshes after restart Nov 20, 2014 at 9:27
  • 5
    @FeridMovsumov use server= in /etc/dnsmasq.conf
    – Tek
    Mar 31, 2016 at 4:43
  • 2
    @Tek Google needs to know everything?
    – ceving
    Aug 7, 2016 at 11:35
  • 1
    @ceving If not google then your ISP
    – Tek
    Aug 7, 2016 at 12:42
  • 1
    For posterity: dnsmasq --help dhcp
    – AnthonyK
    Mar 22, 2020 at 4:38

Posting as a separate answer rather than a comment on yours because that way I can use links.

Option 5 is for IEN 116 nameservers — a ridiculously obsolete protocol that Jon Postel wanted dead over twenty years ago. Solaris still supports it, but won't in the next version.


Another way is to set your dnsmasq server to be the DNS server for DHCP, and use /etc/resolv.conf on the dnsmasq server to specify your list of DNS servers. That way you can easily change DNS (and set aliases) without having to wait for DHCP renewal - just either restart or kill -HUP dnsmasq to reload the config.

  • Andrew, 'kill' command expects process identifier not process name. You should use either kill -HUP pidof dnsmasq or killall -HUP dnsmasq .
    – user213709
    Mar 23, 2014 at 7:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.