Had an interesting hour this morning trying to fiddle our dns on the lan here. I wanted to force a lookup via ip to go to the internal network address rather than the external network address. Here's how I did it (as I know I'm going to need it again one day)
First of all I changed the entry on the firewall - this is normally all I've had to do as all of our clients eventually forward dns requests to the firewall if they don't know about it.
I then tried pinging from my desktop and it was still using the old external address. A ipconfig /flushdns still had the same problem.
A nslookup on server1 had the new address but a nslookup on server2 (we have two dns servers for redundancy) had the old address.
Pinging the ip address from the servers echoed the results above and an ipconfig /flushdns on the servers themselves made no difference.
I then realised that I'd need to change my dns settings on the client frequently to test, so it was time to test netsh....
netsh interface ip set dns "Local Area Connection" static 10.0.0.1 set dns to server 1 and I could then test my nslookups purely on this server.
netsh interface ip set dns "Local Area Connection" static 10.0.0.2 sets the dns to server 2
netsh interface ip set dns "Local Area Connection" dhcp sets it back to the original state of using dhcp.
So now I could switch between the servers easily it was time to compare the differences between server1 and server2. There weren't any configuration changes - BUT I did discover right clicking on the server and selecting clear cache purged the cache properly and then the ip's were resolving correctly on the client - phew.
