JSI Tip 9988. How can I change the default interval that the DHCP client service uses to dynamically re-registry DNS?
Jerold Schulman
December 19, 2005
1 Min Read
DNS records are dynamically re-registered by the DHCP client every 24 hours for workstations, and every hour for servers.
Using REG.EXE, built into Windows XP and Windows Server 2003, or REG.EXE from the Windows 2000 Support Tools on the CD-ROM, Netdom.exe from your operating system's Support Tools on the CD-ROM, and Numeric.bat, I have scripted DRRI.bat to configure the number of seconds that the DHCP client uses for its' periodic DNS record refresh.
The syntax for using DRRI.bat is:
DRRI Type Seconds
Where:
Type is a W for workstations or a S for servers.Seconds is the number of seconds between DNS registration updates for Type computers.
NOTE: You must restart each computer for the change to become effective.
DRRI.bat contains:
@echo offsetlocalif {%2}=={} goto syntaxset type=%1Set OK=Nfor /f "Tokens=*" %%t in ('@echo %type%^|findstr /i "S W"') do ( set OK=Y)if "%OK%" EQU "N" goto syntaxset seconds=%2call numeric %seconds% ansif "%ans%" EQU "N" goto syntaxif "%seconds:~0,1%" EQU "0" goto syntaxset ctrl=WORKSTATIONif /i "%type%" EQU "S" set ctrl=DCfor /f "Skip=1 Tokens=*" %%c in ('netdom query /d:%USERDNSDOMAIN% %ctrl%^|findstr /I /V /C:"The command completed successfully."') do ( @echo REG ADD "\%%cHKLMSYSTEMCurrentControlSetServicesTcpipParameters" /V DefaultRegistrationRefreshInterval /T REG_DWORD /F /D %seconds% REG ADD "\%%cHKLMSYSTEMCurrentControlSetServicesTcpipParameters" /V DefaultRegistrationRefreshInterval /T REG_DWORD /F /D %seconds%)endlocalgoto :EOF:syntax@echo Syntax: DRRI Type Secondsendlocal
About the Author
Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.
You May Also Like