The solution posted below worked for several days then failed. It's back to bench testing if I put any more time into it.

Trying to move dnsmasq service from a Linux VM to a newly setup DD-WRT router running v3.0-r48810 std 05/06/22.

I'd like to keep the static addresses in ip addr order so instead of entering into DHCP Server/Static Leases I am trying to use dhcp-host in Additional Dnsmasq Options which the DD-WRT Static DHCP documentation suggests is possible - but it is confusing and it's not working correctly on the Linux Mint 19.3 systems that can not ping the Windows systems.

After posting the above question I set up a test network with a DD-WRT router and two laptops - one Windows and one Linux.

After reading forums and extensive testing the following setup seems to work except for the dig command output on the Linux system (more below) [this was resolved by attaching router to WAN].

I tried taking out some of the settings like in Additional Dnsmasq Options but dnsmasq will stop working and systems can't ping each other. I tried what some sites said is to put the router ip address into Static DNS 1 but that wouldn't work with any combination of settings.

DD-WRT version in test setup: v3.0-r44715 std (11/03/20)

Network Setup    [updated - see my answers]

Router IP
    Local IP Address
    Subnet Mask   
    Local DNS     

Network Address Server Settings (DHCP)
    DHCP Type               DHCP Server
    DHCP Server             Enabled  
    Start IP Address
    Maximum DHCP Users      75
    Client Lease Expiration 1440min
    Static DNS 1     <- updated
    Static DNS 2     <- updated
    Static DNS 3  
    Use DNSMasq for DNS     Enabled  
    DHCP-Authoritative      Enabled  

DHCP Server
    Used Domain             LAN & WLAN
    LAN Domain              Mydom
    Add. DHCPd Opts         [none]
    Static Leases           [none]

SmartDNS Resolver
    SmartDNS Resolver       Disabled

    Dnsmasq                 Enabled
    Encrypt DNS             Disabled
    Cache DNSSEC data       Disabled
    Val DNS (DNSSEC)        Disabled
    Chk unsign DNS rep      Disabled
    No DNS Rebind           Enabled
    Qry DNS in Strict Order Enabled
    Add Reqr MAC to DNS Qry Disabled
    RFC4039 Rapid Cmt Spt   Disabled
    Maximum Cached Entries  1500

Additional Dnsmasq Option
    dhcp-option=6,,,   <- updated

With the above settings the Windows and Linux system can ping each other by ip address and by name. Nslookup looks normal on Windows - but the Linux dig command gets answered with a Refused. I don't know what to do about this or how important it is.

$ dig

; <<>> DiG 9.11.3-1ubuntu1.17-Ubuntu <<>>
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: REFUSED, id: 41574
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

; EDNS: version: 0, flags:; udp: 4096
;.              IN  NS

;; Query time: 1 msec
;; WHEN: Wed Jun 01 14:35:00 PDT 2022
;; MSG SIZE  rcvd: 28

3 Answers 3


After posting my answer found that ping by ip and name problems returned if the router was disconnected from or started up without a WAN connection. The fix is to move the Static DNS 1 & 2 settings into the dhcp-option=6 setting, as:

Static DNS 1  
Static DNS 2  

From my experience with dnsmasq in a Linux VM server this makes a little sense. In Linux the DHCP server is never started and dnsmasq provides dhcp and local dns service. But in DD-WRT it seems that dnsmasq is tied to DHCP service. There are some docs at DD-WRT.com suggesting that dhcp service can be disabled and just use dnsmasq for dhcp and local dns service but in my testing that never worked.

This is the best setup from my testing and this has been rolled into my production LAN DD-WRT router and is working as well as dnsmasq did the Linux VM server.

I'll update the original question posting to reflect these changes.


I thought dig might suggest a problem but after connecting the test network to the WAN all now looks normal.

Now dnsmasq on DD-WRT is working as well as it did in the Linux VM.


After running a couple of days it suddenly went haywire. LAN clients lost connection to each other. Pings would hang. I had to turn off DHCP and dnsmasq on the router and start up the VM dnsmasq server.

I'm not sure where to go with this. With the way that dnsmasq was retrofitted into DD-WRT it just may not be usable in a production LAN with Windows and Linux clients.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .