Local DNS or Not

I have a local “Home” network behind a wifi router connected to my cable modem. The cable modem is setup in pass through mode. The wifi router is running DD-wrt and provides DHCP service via DNSMASQ. I have a SAMBA server that also provides backup for all my other laptops and work station via BackupPC.
Is there an advantage to implementing a DNS server on the wifi router for this use case? The Rocky file server is just a node on the network so not the gateway.

The ‘dnsmasq’ is both DHCP and DNS server. I presume that the default config makes DHCP tell clients that “I’m your DNS” and thus it caches queries for all.

Surely you can configure the instance in DD-wrt to resolve the names of your “Home LAN” too?

Yes, maybe so. But I’m not providing a “fully qualified domain name” for my network. All the non phone devices on my network have static IP’s and I maintain the /hosts file with the respective names on all. The DHCP serves phones and occasional family guests that were previously on the local net.
It’s a dual band router and I maintain a separate network that is isolated from the local net for other guests.
The router points to either my ISP’s DNS or another well known DNS server. I guess I may not be asking the right question based on your response.

I have an Ubiquiti router at home. I think it runs dnsmasq, but frankly I don’t care what is in there as long as I can configure it, which I can. I too have static addresses and the DHCP server config has (MAC, IP, name) triplets for those clients. Additionally, I have/set domainname only known within my LAN. I’m 100% certain that it is unique – no chance to collide with any public domain. That is, every client gets a fqdn from the router and the router also acts as the DNS server. For all queries not in my home LAN, the DNS server queries the ISP’s DNS server and/or whatever I’ve configured the router to use.

In summary, clients in my home LAN do get predictable IP address and name (with dummy domain) from DHCP, have the dummy domain in DNS suffix search list, and use the router as DNS server.

In dnsmasq config the static addresses are set with dhcp-host option. Its syntax:


If you have hostname there, then dnsmasq’s DNS database will get normal entries for that address&name when the client is given a lease. That is, the name resolves only when the client seems to be online.

The alternative is that dnsmasq populates database from /etc/hosts and/or similar files. The names always resolve. Dnsmasq even offers the name found from database for the DHCP client, if the dhcp-host does not have hostname in it.

If you don’t want to or can’t configure DNS server on your router, then you can configure dnsmasq on your Rocky. The router’s DHCP should then offer your Rocky as the DNS server, and the Rocky should ignore that bit, because there you want to refer to the public DNS servers.

I’ll have to chew on this and maybe try somethings out on the router when nobody is home.

So I suppose I should have posted this thread in the Off Topic forum as it is not Rocky related so if the mods want to move it there that is fine with me.
I did set up dnsmasq as the dns server using the guide on dd-wrt wiki. One thing that is not made clear is that direct edits to files on the system do not survive a reboot as all are repopulated from entries saved to nvram via the GUI. There are fields provided for scripts / command entry which I was able to utilize to populate the hosts file with my static ip’s. I didn’t want to go the dhcp-hosts route because it limits you to either the ethernet interface or the wifi interface as you can’t have the same ip for both.
I have not noticed a difference in network functionality and maybe it is too early to tell.

Just set up your router to serve static IPs and names to all your machines (unless they really are stupid and don’t do DHCP) within your local lan - give your local lan a fake ‘fqdn’ like ‘lan’ (eg, mymachine.lan). As said, dnsmasq does DHCP and DNS: anything not local will get shunted upstream to the Internet; anything local will be resolved by dnsmasq (dnsmasq will also cache your most common Internet DNS requests). If you can’t do this in a straight forward way on DD-wrt, install OpenWRT. I think you’re over complicating what you’re trying to do.