I have a Windows application that publishes itself with a DNS multicast record. Let's say myapp.local.
When it is installed, it stores a record in hosts file under systemroot/drivers/etc folder.
127.0.0.1 myapp
This configuration has worked for most of my customers. Locally the server resolves "myapp" with local loopback (127.0.0.1), and all other computers in the LAN can reach the application from multicast record.
Yesterday, for the first time, I had a problem. There were 2 computers in the same LAN with myapp installed, both were publishing their names in multicast way, but the strangest thing is that one of the two computers was resolving myapp name using multicast and ignoring its local hosts file.
I thought the DNS resolution precedence in Windows was:
- Host name
- Network DNS server
- Multicast
But it has to be wrong, otherwise I cannot explain the multicast precedence vs hosts.
A ping command like: ping myapp
answered with "myapp.local".
I checked the hostname was well formed and it was the correct file in tcpip DataBasePath (Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
)
I also tried to disable multicast resolution from GPO settings:
After a reboot and a dns and netbios cache cleanup, it did not change.
Is the DNS resolving order wrong? How can I force to ignore multicast and set hosts with highest priority?