Question : DNS not resolving internal servers properly all of the time

We are running a Windows 2003 AD network with servers in a central location and 20 remote sites connected via DSL based VPN tunnels.

One of the DC's at head office is primary DNS and a backup DC is acting as secondary DNS.  At our remote sites we have the local router configured as the DHCP server and it broadcasts those two addresses as well as a 3rd DNS server which is the ISP's.  The reason I included the 3rd DNS server is that if the VPN tunnel goes down to the branch office, at least they can still surf the web using the ISP's DNS server.

In our network we have an Exchange server with a registered domain name (like MAIL.COMPANY.COM).  I have updated our internal DNS servers to resolve this domain name to the internal IP address.  The name is also registered with NetSol resolving to the boxes outside IP address.

Periodically I will have issue whereby a branch PC's Outlook client cannot connect to the Exchange box.  Outlook is configured to use MAIL.COMPANY.COM as the server name.  

I can ping the PC and remote desktop into its definately still on our network.  If I drop to a command prompt on the PC and type ping MAIL.COMPANY.COM it will resolve to the outside IP address.  If I run nslookup (on the same machine) it will check with our internal DNS server and resolve to the proper (internal) IP address.

I can't understand why pinging the Exchange box resolves to the external, yet an nslookup resolves to the internal.  For some reason the ping command seems to use the ISP's DNS server, but nslookup uses our internal DNS server.  

The only workaround I have found is to add a static entry to the users HOSTS file ensuring it has the internal IP address.  This process has worked every time, but I don't like having HOSTS files.

Any suggestions??

Answer : DNS not resolving internal servers properly all of the time

Here is the problem you have a external DNS server in the TCP\IP properties this can and will cause you issues. Even though your 2 DNS servers that are listed are internal DNS servers are up and running this does not mean that the third DNS server listed is not being used. If the two first DNS servers do not respond quick enough to the client's request it will send a DNS request to the third DNS server which is then causing you the issue then the DNS server is cached on the client.

Remove the external DNS server run ipconfig /flushdns.
Random Solutions  
programming4us programming4us