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

Creating Dynamic DNS in Network Environments

0 513 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

Configuring Windows Mobility Center and How to Turn it On and Off

1 1402 1

Video transcription Steve Fullmer: In our Windows training courses, we often share information about the Windows 8.1 Mobility Center. Mobility Center was introduced for mobile and laptop devices in Windows 7. It’s present and somewhat enhanced in Windows 8. Since we don’t have mobile devices in our classrooms, I decided to take a little bit … Continue reading Configuring Windows Mobility Center and How to Turn it On and Off

OSPF Adjacency Troubleshooting Solution – Getting Close to the OSPF adj

0 245 1

In this video, Cisco CCNA & CCNP instructor Mark Jacob shows how to troubleshoot OSPF Adjacency issues by showing the distance between routers with the show ip ospf neighbor command.

Write a Comment

See what people are saying...

    Share your thoughts...

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