Most of the time people think of DNS as being the service that helps us to resolve a name to an IP address and that is certainly true, as without this service, the Internet as we know it could not exist today, or at least it would be very “un-user friendly.” ย The other side to DNS however, that it is equally important in its own right, is reverse DNS. ย Reverse DNS allows one to take a known IP address and translate that into a useful “friendly” name. ย This can cause major headaches when it isn’t working properly as the incorrect host name will be used if reverse DNS is stale.
How do you troubleshoot this on your local workstation? ย Well, there is a very useful command that can accomplish leaps and bounds with both forward and reverse DNS look ups. ย By using the ipconfig command with a command line switch, we can effectively clear out our stale DNS cache that exists on our machine. ย If you have an IP address that you KNOW for sure is supposed to link to a specific name and it doesn’t, you can flush your DNS cache to see if this resolves the issue.
By issuing the above command, ipconfig /flushdnsย we are telling our computer to effectively flush out any DNS entries it may have and then get a fresh copy of what your DNS server thinks the hosts should resolve to. ย This way, if something has changed on the server side, you will be sure to get the latest host names from the server instead of from your local machine, which could be stale.
To test and make sure things are resolving correctly, we can issue the trusty ping command with a special switch to test our reverse lookup.
The ping -a %ip% command is the command we can use to test our reverse DNS resolver. ย You should receive the correct host name back if your DNS is pulling the correct settings.
System Administrators
On a DNS server, sometimes what can also happen is that reverse DNS entries can become stale and incorrect entries or many entries for one IP address can sometimes pile up. ย In Microsoft’s DNS server, you can check your reverse DNS entries to verify you only have one host name for the particular IP address in question. ย If not, you have stale entries that may be causing problems with clients who are resolving IP addresses to hostnames.