How do I Flush DNS?

Most DNS clients cache the results of name resolution requests. This speeds up name resolution if multiple lookups are done to the same address, such as is common when browsing the web.

Sometimes a bad DNS entry will be cached and you will need to either flush the DNS cache to get rid of it, or wait up to 24 hours for it to be dropped from the cache automatically.

How to Flush DNS in Microsoft Windows

In Microsoft Windows, you can use the command ipconfig /flushdns to flush the DNS resolver cache:


C:\>ipconfig /flushdns

Windows IP Configuration

Successfully flushed the DNS Resolver Cache.

You can also use the command ipconfig /displaydns to view the DNS resolver cache.

Turning off DNS Caching under Microsoft Windows

If you experience frequent issues with DNS caching under Microsoft Windows, you can disable client-side DNS caching with either of these two commands:

This will disable DNS caching until the next reboot. To make the change permanent, use the Service Controller tool or the Services tool to set the DNS Client service startup type to Disabled.

Tuning DNS Caching under Microsoft Windows

You can modify the behavior of the Microsoft Windows DNS caching algorithm by setting two registry entries in the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters registry key.

The MaxCacheTtl represents the maximum time that the results of a DNS lookup will be cached. The default value is 86,400 seconds. If you set this value to 1, DNS entries will only be cashed for a single second.

MaxNegativeCacheTtl represents the maximim time that the results of a failed DNS lookup will be cached. The default value is 900 seconds. If you set this value to 0, failed DNS lookups will not be cached.

How to Flush DNS in Mac OSX

In Mac OSX Leopard, you can use the command dscacheutil -flushcache to flush the DNS resolver cache:


bash-2.05a$ dscacheutil -flushcache

In Mac OSX versions 10.5.1 and before, the command lookupd -flushcache performed the same task:


bash-2.05a$ lookupd -flushcache

How to Flush DNS in Linux

In Linux, the nscd daemon manages the DNS cache.

To flush the DNS cache, restart the nscd daemon.

To restart the nscd daemon, use the command `/etc/init.d/nscd restart`.

Further Reading on How do I Flush DNS?



Top 5 Free Networking Tools

Free White Papers on Networking

Books on DNS

DNS and BIND
DNS and BIND

DNS and BIND is about one of the Internet's fundamental building blocks: the distributed host information database that's responsible for translating names into addresses, routing mail to its proper destination, and many other services. As the authors say in the preface, if you're using the Internet, you're already using DNS--even if you don't know it.

This edition brings you up to date on the new 9.1.0 and 8.2.3 versions of BIND along with the older 4.9 version. There's also more extensive coverage of NOTIFY, IPv6 forward and reverse mapping, transaction signatures, and the new DNS Security Extensions; and a new section on accommodating Windows 2000 clients, servers and Domain Controllers.

Whether you're an administrator involved daily with DNS or a user who wants to be more informed about the Internet and how it works, you'll find this book essential reading.

Topics include:

DNS & BIND Cookbook
DNS & BIND Cookbook

The DNS & BIND Cookbook presents solutions to the many problems faced by network administrators responsible for a name server. Following O'Reilly's popular problem-and-solution cookbook format, this title is an indispensable companion to DNS & BIND, 4th Edition, the definitive guide to the critical task of name server administration. The cookbook contains dozens of code recipes showing solutions to everyday problems, ranging from simple questions, like, "How do I get BIND?" to more advanced topics like providing name service for IPv6 addresses. It's full of BIND configuration files that you can adapt to your sites requirements.

With the wide range of recipes in this book, you'll be able to

DNS on Windows Server 2003
DNS on Windows Server 2003

While computers and other devices identify each other on networks or the Internet by using unique addresses made up of numbers, humans rely on the Domain Name System (DNS), the distributed database that allows us to identify machines by name. DNS does the work of translating domain names into numerical IP addresses, routing mail to its proper destination, and many other services, so that users require little or no knowledge of the system. If you're a network or system administrator, however, configuring, implementing, and maintaining DNS zones can be a formidable challenge. And now, with Windows Server 2003, an understanding of the workings of DNS is even more critical.

DNS on Windows Server 20003 is a special Windows-oriented edition of the classic DNS and BIND, newly updated to document the many changes to DNS, large and small, found in Windows Server 2003. Veteran O'Reilly authors, Cricket Liu, Matt Larson, and Robbie Allen explain the whole system in terms of the new Windows Server 2003, from starting and stopping a DNS service to establishing an organization's namespace in the global hierarchy.

Besides covering general issues like installing, setting up, and maintaining the server, DNS on Windows Server 2003 tackles the many issues specific to the new Windows environment, including the use of the dnscmd program to manage the Microsoft DNS Server from the command line and development using the WMI DNS provider to manage the name server programmatically. The book also documents new features of the Microsoft DNS Server in Windows Server 2003, including conditional forwarding and zone storage in Active Directory (AD) application partitions.

DNS on Windows Server 2003 provides grounding in:

If you're a Windows administrator, DNS on Windows Server 2003 is the operations manual you need for working with DNS every day. If you're a Windows user who simply wants to take the mystery out of the Internet, this book is a readable introduction to the Internet's architecture and inner workings.

Related Articles on DNS

Bookmark How do I Flush DNS?

Latest Blog Posts


English English GermanGerman SpanishSpanish FrenchFrench ItalianItalian PortuguesePortuguese RussianRussian DutchDutch
GreekGreek HindiHindi JapaneseJapanese KoreanKorean ChineseChinese Chinese (Simplified)Chinese (Simplified) ArabicArabic

Copyright 2009 Tech-FAQ. All rights reserved. Privacy Policy.