[Last Call] Learn how to a build a cloud-first strategyRegister Now


force DHCP clients to use different WINS servers

Posted on 2007-07-25
Medium Priority
Last Modified: 2007-12-19
Hi all,
we are in the process of adding two new WINS servers in our network. right now all clients are configured with DHCP to use the two existing WINS servers, and would like to find a way to force all workstations to start using the new ones without having to wait for the lease duration to expire, which is 2 months.

is there some sort of a script or a ustility that I can use to perform this task?

I appreciate all comments.

Question by:Medquest
  • 3
  • 3
LVL 85

Assisted Solution

oBdA earned 600 total points
ID: 19563456
Assign a startup(!) script to the clients (this will interrupt network traffic during logon, so try this on a test machine in a test OU first).
The script will check if it sees your new WINS server (replace the with the actual IP address) in the IP config, and if not, will do a renew; the results will be written to the log file specified.

@echo off
set NewWINS=
set LogFile=C:\Windows\Temp\DHCPRenew.log
ipconfig /all | find /i "%NewWINS%"
if errorlevel 1 (
  >>"%LogFile%" echo %Date% %Time% New WINS server not found on this system, refreshing IP configuration ...
  ipconfig /release >>"%LogFile%"
  ipconfig /renew >>"%LogFile%"

Author Comment

ID: 19563475
this is a good solution if we were going to reboot the computers, but we're looking for a way of doing it without rebooting, and it was  my bad that I didn't mention that in my original post.

I do appreciate your comment though.

LVL 13

Accepted Solution

bluetab earned 900 total points
ID: 19563508
I'm assuming your using W2K3 or W2K Server as your DHCP server.  Go into your DHCP scope options and change your WINS servers to your new ones.  Then open the DCHP scope and choose the DHCP leases. Delete all the leases that are in there.  Next I would ask that all the clients restart their computers just to make sure they request a new IP address and don't have any problems.  The easiest thing to do would be to have everyone shut down there computers at night.  Then you can make the change and when the computers are powered up in the morning they'll have the new WINS servers.  As a rule of thumb I would recommend you change the lease duration to 4 days, just to help mitigate problems.  You can change the lease duration by opening the properties of the DHCP scope.  

Alternative Solution (although it is not guaranteed):  If there are some computers that you can't restart, open the properties of the DHCP scope.  Change the lease duration of the clients to 30 minutes.  This could force all the workstations to update their IP information sooner.  I'm not sure this solution will work real well though since the clients already have a lease duration that may not be set to expire for a while.  
Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

LVL 13

Expert Comment

ID: 19563526
I just read that you're not going to reboot the computers.  Perform the steps mentioned in the first paragraph above without restarting the computers and it should still work.  Although the client computers may have some brief network connectivity problems while they obtain new IP address info.  It would be best if the users were at least logged off the computers when you did this.  

Author Comment

ID: 19563545
if I would go ahead and delete all the leases, some client machines will continue using the IP Addresses, and some other will obtain what theu think is a new IP Address, and we'll start getting all kind of dublicate IP Address exist on the network.

the other thing is that we have more than 2800 machines and we normally tell users to logoff and leave the computer powered for windows updates, and if we'll reboot any computer it will get the new config, but it's not easy to reboot that many computers for this reason.

we have planned on changing the lease duration to a month, but it was never approved until now.

thanks for the comment.
LVL 13

Expert Comment

ID: 19563757
Sorry for the bad information regarding deleting the DHCP Leases.  I wasn't even thinking about the duplicate IP address problem.  
There are only two ways that I'm aware of to force DHCP client computers will renew their leases automatically:
" Wait until half of the allotted lease time expires. The clients will then renew their leases automatically.  
" Force a DHCP client to renew its lease by doing an ipconfig /release and ipconfig /renew
I beleive you are going to be forced to temporarily change the lease duration, see if it works and then change it back to one month.

Someone else may be able script something for you.

Author Comment

ID: 19563801
it's ok, right now I am defraging exchange databses, and doing some research and I think I found couple scripts on scriptinganswers.com that may do the trick but I am testing them now and if they work I will post them here for everybody.


Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

So you have two Windows Servers and you have a directory/folder/files on one that you'd like to mirror to the other?  You don't really want to deal with DFS or a 3rd party solution like Doubletake. You can use Robocopy from the Windows Server 200…
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
Integration Management Part 2
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question