Search code examples
dnsdhcpdnsmasq

Can't get DNSMASQ DHCP to configure multiple name servers


Perhaps someone has some help? I am running dnsmasq on Ubuntu 12.04 LTS. This server's address is 192.168.15.3. My gateway's DNS is 192.168.1.254, that takes me out to the Internet. I also have a special-purpose DNS at 192.168.15.2. So I wanted to give those 3 name servers to DHCP clients. This is my dnsmasq.conf server= section:

server=/localnet/192.168.15.3
server=/localnet/192.168.15.2
server=/15.168.192.in-addr.arpa/192.168.1.254

However, when I look at the DHCP allocation on a client, I see only 192.168.15.3 as the sole DNS server. Clients cannot access the Internet (the NIC on .3 is configured correctly and can access the Internet from its console login).

Granted, the first server= line is probably not necessary, but I added it thinking it may help, didn't.

What am I doing wrong? Thanks for your help!


Solution

  • OK, after MUCH experimentation, I found I had to push the option manually. In the dnsmasq.conf file, I added the following line:

    dhcp-option=6,

    like so:

    dhcp-option=6,192.168.15.3,192.168.15.2,192.168.1.254

    This served the correct list of name servers to DHCP clients.