Managing and debugging DNS on your Windows XP/Vista/7 clients


Microsoft Windows has all kinds of tools buried throughout the Windows directory. Several of these tools allow you to display and debug DNS and IP issues, which can be handy when you get a call from a customer that they can’t access your systems. If you need to display all of the entries your Windows host is caching, you can open cmd.exe and run the ipconfig utility with the “/displaydns” option:

C:\ ipconfig /displaydns

Windows IP Configuration

1.0.0.127.in-addr.arpa
----------------------------------------
Record Name . . . . . : 1.0.0.127.in-addr.arpa.
Record Type . . . . . : 12
Time To Live . . . . : 84375
Data Length . . . . . : 4
Section . . . . . . . : Answer
PTR Record . . . . . : localhost


google.com
----------------------------------------
Record Name . . . . . : google.com
Record Type . . . . . : 1
Time To Live . . . . : 143
Data Length . . . . . : 4
Section . . . . . . . : Answer
A (Host) Record . . . : 74.125.45.147

To flush the cached DNS settings you can run ipconfig with the “/flushdns” setting:

C:\ ipconfig /flushdns

Windows IP Configuration

Successfully flushed the DNS Resolver Cache.

If your host is configured to register it’s name dynamically with DNS, you can use the the “/registerdns” option to register your host with DNS and to refresh your DHCP lease:

C:\ ipconfig /registerdns

In a follow up post I will discuss Microsoft’s DNS server and some tools you can use to debug it.

This article was posted by Matty on 2011-02-07 23:24:00 -0400 -0400