I have a number of Mac OS X El Capitan and macOS Sierra clients whose DHCP configurations give them the local IP address of a DD-WRT router with DNSMasq setup within my LAN.
This is so I can use
server.example.com and have it go to
192.168.1.3 and not our public IP address, and is far easier to manage than editing the hosts file of every mac, and also doesn't affect portable Macs when they need to connect to the same hostname from outside the building.
However, repeatedly some Macs keep 'forgetting' the local DNS. For example, when the problem occurs, I can ping the server hostname and get the external public IP. I can then clear the DNS cache, run the ping again and it's now the correct local IP address.
Does anyone run a similar setup, and know of any common pitfalls or issues, and how to get around them?
Prior to using DNSMasq on a DD-WRT router, I was using the Mac OS X Server App's DNS ability, but found it to be very slow as the same server was running File Sharing for the studio, so it was moved off.
I have even thought about running a scheduled command (either on each Mac, or via some Remote Desktop Management script) to clear the DNS every few hours or so.