Windows Xp – Flush DNS




Tagged Under : , , , ,

Version: 32.1b
Revision: 22 Build 35

Windows Xp – Flush DNS

Introduction:
most “DNS clients” cache the results of name – resolution requests. This technique speeds up individual name resolution if multiple lookups are done to the same address. Nevertheless, it is very common for all browser to cache their results, so that you can enjoy your time – surfing the web without wasting your time!

Windows OS: Windows XP Pro Sp2+ and Home Edition Sp2+

1.] Download notepad++ from the original author or from a mirror and install the software.
——————————-

http://sourceforge.net/projects/notepad-plus/

http://filehippo.com/download_notepad/

——————————-

2.] Choose your desire method…

——————————-
Method One: flush your DNS with CMD command
——————————-


Warning: please close all internet browser before you continue!

1.] Click Start >> Run >> Type: cmd

2.] When “Command Prompt” is loaded, you’ll need to type this command: ipconfig /flushdns

3.] Press Enter and execute the command.

4.] Finish!

——————————-
Method Two: flush your DNS with VBScript file
——————————-


1.] Open your notepad and copy one of these source code…

Windows XP Pro and Home Version
—Copy Source Code—

'Author: Lair360
'Version: 16.6a
'Revision: 36 Build 16
'--------------------------------------------
On Error Resume Next 'This line will cancel the error and direct to the info.
Dim objShell 'This will maintain memory usage when "WS.script.Shell" is activated.
set objShell = createobject("wscript.shell")
objShell.run("%comspec% /k c: & ipconfig /flushdns")
'Results are given and cmd command-line has exit.
WScript.Quit
'End of VBScript command
'-------------------------------------------
WScript.Echo "DNS Caches are flushed!"
objShell = Nothing
'VBScript Ends

—End Source Code—
Copyright 2001-2009 Lair360


Notes: if these script doesn’t work under Windows Xp Home Sp2+, please use the “Portable Version”.

Windows Xp Home Edition
—Copy Source Code—

'Author: Lair360
Version: 17.3a
'Revision: 36 Build 16
'This code flushes the local DNS cache.
'------------------------------------
strCommand = "ipconfig /flushdns"
set objWshShell = WScript.CreateObject("WScript.Shell")
intRC = objWshShell.Run(strCommand, 0, TRUE)
if intRC <> 0 then
   WScript.Echo "There was an error...operation aborted!" & intRC
else
   WScript.Echo "DNS Caches are cleared!"
end if
'------------------------------------
'Url: http://lair360.co.uk

—End Source Code—
Copyright 2001-2009 Lair360

USB portable version.
—Copy Source Code—

'Author: Lair360
Version: 15.3a
'Revision: 32 Build 16
'This code flushes the local DNS cache.
'------------------------------------
On Error Resume Next
Set WshObj = Wscript.CreateObject("WScript.Shell")
WshObj.Run "ipconfig /flushdns", 1, true
set wsObj = Nothing
'------------------------------------
'Url: http://lair360.co.uk

—End Source Code—
Copyright By Lair360


——————————-
Method Three: flush your DNS with Batch file
——————————-


1.] Open your notepad and copy one of these source code…

Notes: you’ll need to save this script as a “.bat” extension.

Windows XP Pro and Home Version
—Copy Source Code—

@echo off
cls
echo.
echo.
echo. Pressing any key to flush your DNS
echo.
echo.
pause>nul
ipconfig /flushdns

ping localhost>nul

ipconfig /registerdns
echo.
echo.
echo. DNS is now flushed. Please see above for any errors
echo. Copyrighted by Lair360
echo.
pause
exit

—End Source Code—
Copyright By Lair360

Alternative Version
—Copy Source Code—

@echo off
cls
echo.
echo. Flush DNS
echo. Author: Lair360
echo. Version 2.1a
echo. Copyrighted by Lair360
echo.
echo. Flushing DNS Cache...
ipconfig /flushdns
echo.
echo. DNS Cache cleared...
pause
exit

—End Source Code—
Copyright 2001-2009 Lair360




How to disable the caching of failed DNS lookups.




Tagged Under : , , ,

Version: 4.32
Revision: 46 Build 78


How to disable the caching of failed DNS lookups.

Windows OS: XP pro, XP home, 2003 and Media Center 2005.

Introduction: Windows 2000/XP/2003 has integrated ability to “cache DNS lookup” ~results in the client’s cache. The cache configuration can be viewed by typing: “ipconfig /displaydns” in the command prompt.

1.] To start command prompt, click Start >> Run >> Type: CMD [cmd]

Code: ipconfig /displaydns

Notes: You can also copy the “Cache DNS” results to your computer.

Type: ipconfig /displaydns >c:\dnscache.txt

2.] You can also manually clean the system cache, by entering this code to the command prompt: ipconfig /flushdns

Code: ipconfig /flushdns

Tips: In order to avoid caching any negative DNS lookup ~results, you can change a string within the registry application.

a.] Open Registry Editor.

Click Start >> Run >> Type: Regedit

b.] In Registry Editor, navigate to the following registry key…

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters

c.] Create the following value (DWORD): NegativeCacheTime

d.] Give it a value of 0 [zero].

e.] Close Registry Editor and reboot your computer.

Notes: Before using the registry, please backup your registry.

Alternative solution: to make thing easier, you can use this “registry script”. But, you’ll need to save this source code as a “.reg” extension.
After that, just execute the script and reboot your computer.

—Copy Source Code—

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters]
"NegativeCacheTime"=dword:00000000
"NetFailureCacheTime"=dword:00000000
"NegativeSOACacheTime"=dword:00000000

—End Source Code—