0

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        192.168.1.1
    Subnet Mask             255.255.255.0
    Gateway                 0.0.0.0
    Local DNS               0.0.0.0

Network Address Server Settings (DHCP)
    DHCP Type               DHCP Server
    DHCP Server             Enabled  
    Start IP Address        192.168.1.100
    Maximum DHCP Users      75
    Client Lease Expiration 1440min
    Static DNS 1            0.0.0.0   <- updated
    Static DNS 2            0.0.0.0   <- updated
    Static DNS 3            0.0.0.0
    WINS                    0.0.0.0
    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
    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
    domain=mydom
    local=/mydom/
    domain-needed
    bogus-priv
    expand-hosts
    dhcp-option=3,192.168.1.1
    dhcp-option=6,192.168.1.1,1.1.1.1,1.0.0.1   <- updated
    dhcp-host=B8:32:E3:AA:EA:5F,C9:F7:33:64:80:39,Winder,192.168.1.100
    dhcp-host=F4:B7:E2:25:5D:F9,Linuxer,192.168.1.130

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

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;.              IN  NS

;; Query time: 1 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: Wed Jun 01 14:35:00 PDT 2022
;; MSG SIZE  rcvd: 28

3 Answers 3

0

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            0.0.0.0
Static DNS 2            0.0.0.0
   
dhcp-option=6,192.168.1.1,1.1.1.1,1.0.0.1

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.

0

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.

0

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 .