In this post, we’ll take a look at the three DNS related options available for the Windows command line utility, ipconfig. They are /displaydns, /flushdns and /registerdns.
When your system needs to determine the IP address of a given host name, the first thing it does is check its local DNS cache. The cache contains name-to-IP mappings for hosts you have visited recently.
Side note: I believe the full name resolution order for a host name (not NETBIOS) is DNS cache (including preloaded Hosts file records), DNS server, NetBIOS cache, WINS, Broadcast and Lmhosts file. Corrections? Leave a comment.
ipconfig /displaydns – The /displaydns option outputs a list of the name-to-IP mappings currently in the cache. (Documentation)
ipconfig /flushdns – This option simply empties the local DNS cache. Nothing more, nothing less. Flushing the cache can be useful in certain network troubleshooting situations and also for getting rid of an erroneous negative entry. (Documentation)
ipconfig /registerdns – This one does not relate to the local cache. The /register dns option contacts the dns server (as configured in the system’s tcp/ip settings), and tells the server its current IP address. This is useful when the DNS server is, for whatever reason, not updating correctly. (Documentation)
I’ve encountered a fair bit of confusion regarding these options. Hopefully this clears it up. Questions, corrections, comments? Use the comment form below.