I have a Windows 2012 server with two interfaces - public internet facing, and private.
The private interface uses our internal DNS servers. This interface has no gateway. Static IP - not DHCP.
I want to disable the public interface, as we use a proxy for outgoing traffic.
Having disabled it, I'm finding DNS resolution failing:
I cannot ping foo.external.com - host cannot be found
However, I can nslookup, notice that it connects to our internal DNS, and successfully resolve foo.external.com
ipconfig /displaydns DOES show the correct entry. I'm utterly confused why ping does not simply use this entry.
If I manually add an entry to local hosts file, for "220.127.116.11 foo", as an experiment, and try ping foo, it fails - cannot resolve host. Same for foo.external.com, and "foo.external.com.". Pinging "foo.external.com", or "foo.external.com." also fails.
If, however, I then re-enable the public interface, it all works. Including the hosts file. I can ping "foo" (the resolution aspect). Disable it, and it stops working again.
I've tried all the reboots, ipconfig /flushdns, nbtstat -R stuff.
a) Why is ping (and our application) not able to properly resolve things when the public interface is disabled, despite Windows being able to speak to its DNS server, and cache the result (as shown in ipconfig /displaydns).
b) Why is the hosts file being ignored for the private interface?