How to clear the DNS Server and Client Caches to Remove Bogus IP Addresses

Home > Blogs > Windows Server > How to clear the DNS Server and Client Caches to Remove Bogus IP Addresses

How to clear the DNS Server and Client Caches to Remove Bogus IP Addresses

Like This Blog 3 Mike Danseglio
Added by April 19, 2013

Have you ever had bogus name resolution data in your DNS cache? This happens when you’re pointed to a DNS server with outdated records, or perhaps a misconfigured server. You might see symptoms like all fully-qualified domain names (FQDNs) resolving to the same IP address, or even all FQDNs resolving to 127.0.0.1 (localhost).

Even when you configure clients and servers to use a properly configured DNS server they will retain previously resolved DNS addresses. The DNS resolution data is usually cached on both the client computer and the DNS server. So until the cache expiration time expires you will continue to see bogus name resolution results.

If you’re using Windows there are quick ways to purge the DNS cache on the client and on the server. I suggest you start with the server.

Purging the DNS Server Cache on a Windows DNS Server
If you’re using Windows Server 2003, Windows Server 2008, or Windows Server 2012 as your DNS server you can easily purge the server-side DNS cache using either a command-line tool or Windows PowerShell.

Purging the DNS Server Cache From the Command Prompt
At the command prompt, run the following command:

Dnscmd /ClearCache

Purging the DNS Server Cache With Windows PowerShell
To clear the DNS server cache using Windows PowerShell, use the following cmdlet from the dnsserver module:

Clear-DnsServerCache

Purging the DNS Cache on Windows Clients
This command purges the DNS client (or resolver) cache on Windows XP, Windows 7, and Windows 8, as well as Windows 2000, Windows Server 2003, Windows Server 2008, and Windows Server 2012.

At a command prompt, run the following command:

Ipconfig /FlushDNS

I hope this helps you resolve DNS resolution issues without needlessly rebooting computers to purge the cache.

Enjoy!

Mike Danseglio -CISSP / CEH
Interface Technical Training – Technical Director and Instructor

Videos You May Like

A Simple Introduction to Cisco CML2

0 3877 0

Mark Jacob, Cisco Instructor, presents an introduction to Cisco Modeling Labs 2.0 or CML2.0, an upgrade to Cisco’s VIRL Personal Edition. Mark demonstrates Terminal Emulator access to console, as well as console access from within the CML2.0 product. Hello, I’m Mark Jacob, a Cisco Instructor and Network Instructor at Interface Technical Training. I’ve been using … Continue reading A Simple Introduction to Cisco CML2

Creating Dynamic DNS in Network Environments

0 638 1

This content is from our CompTIA Network + Video Certification Training Course. Start training today! In this video, CompTIA Network + instructor Rick Trader teaches how to create Dynamic DNS zones in Network Environments. Video Transcription: Now that we’ve installed DNS, we’ve created our DNS zones, the next step is now, how do we produce those … Continue reading Creating Dynamic DNS in Network Environments

Cable Testers and How to Use them in Network Environments

0 724 1

This content is from our CompTIA Network + Video Certification Training Course. Start training today! In this video, CompTIA Network + instructor Rick Trader demonstrates how to use cable testers in network environments. Let’s look at some tools that we can use to test our different cables in our environment. Cable Testers Properly Wired Connectivity … Continue reading Cable Testers and How to Use them in Network Environments

Write a Comment

See what people are saying...

    Share your thoughts...

    Please fill out the comment form below to post a reply.