One some machines HOST does not resolve container names

Hello,

perhaps someone can enlighten me, on how Docker for Windows handles container name to ip address resolution.

Normally, when starting a container with name TEST I can ping it by both name TEST and container ID even with all network adapters disabled, only virtual nat adapter enabled.

On some of our machines this does not work. We can ping container by IP, DNS resolution works from the container itself, but HOST cannot resolve their names.

What method of resolution is being used? It cannot be DNS, because I tried doing nslookup containername natadapterip on the machines where it works, and it doesn’t resolve. I also can’t see docker listening on port 53, so it’s not exposing it’s internal DNS server to the host. So how does windows know how to resolve the names? It’s not WINS or Netbios either, since those seem to be disabled.

And most importantly, how to fix the machines where this doesnt work?

Thanks.

I found the issue, but don’t know how to fix it yet.

For some reason these machines disable Multicast for Virtual Switch created by Docker, at this location in registry: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces{1d661d44-35a5-4f2e-aab5-9b5b313eaf3a}

I can change it back, and resolution starts working, but after reboot it’s back to 0.

Any idea why this happens?

1 Like